python-cryptography ftbfs in 18.04 LTS

Bug #1813592 reported by Matthias Klose
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-cryptography (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Unassigned

Bug Description

according to
http://people.canonical.com/~doko/ftbfs-report/test-rebuild-20181222-bionic.html

python-cryptography ftbfs.

=================================== FAILURES ===================================
__________ TestOpenSSLMemoryLeaks.test_ec_private_numbers_private_key __________

self = <tests.hazmat.backends.test_openssl_memleak.TestOpenSSLMemoryLeaks object at 0x7f07f9dccf90>

    def test_ec_private_numbers_private_key(self):
        assert_no_memory_leaks(textwrap.dedent("""
            def func():
                from cryptography.hazmat.backends.openssl import backend
                from cryptography.hazmat.primitives.asymmetric import ec

                ec.EllipticCurvePrivateNumbers(
                    private_value=int(
                        '280814107134858470598753916394807521398239633534281633982576099083'
                        '35787109896602102090002196616273211495718603965098'
                    ),
                    public_numbers=ec.EllipticCurvePublicNumbers(
                        curve=ec.SECP384R1(),
                        x=int(
                            '10036914308591746758780165503819213553101287571902957054148542'
                            '504671046744460374996612408381962208627004841444205030'
                        ),
                        y=int(
                            '17337335659928075994560513699823544906448896792102247714689323'
                            '575406618073069185107088229463828921069465902299522926'
                        )
                    )
                ).private_key(backend)
> """))

../../../tests/hazmat/backends/test_openssl_memleak.py:216:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

s = "\ndef func():\n from cryptography.hazmat.backends.openssl import backend\n from cryptography.hazmat.primitives.... '575406618073069185107088229463828921069465902299522926'\n )\n )\n ).private_key(backend)\n"
argv = ['/usr/bin/python2.7', '-c', '\ndef func():\n from cryptography.hazmat.backends.openssl import backend\n from cr...n for ptr in remaining\n )))\n sys.stdout.flush()\n sys.exit(255)\n\nmain(sys.argv)\n']

    def assert_no_memory_leaks(s, argv=[]):
        env = os.environ.copy()
        env["PYTHONPATH"] = os.pathsep.join(sys.path)
        argv = [
            sys.executable, "-c", "{0}\n\n{1}".format(s, MEMORY_LEAK_SCRIPT)
        ] + argv
        # Shell out to a fresh Python process because OpenSSL does not allow you to
        # install new memory hooks after the first malloc/free occurs.
        proc = subprocess.Popen(
            argv,
            env=env,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
        )
        try:
            proc.wait()
            if proc.returncode == 255:
                # 255 means there was a leak, load the info about what mallocs
                # weren't freed.
                out = json.loads(proc.stdout.read().decode())
> raise AssertionError(out)
E AssertionError: {u'94745199970880': {u'path': u'../crypto/threads_pthread.c', u'line': 21, u'size': 56}, u'94745199970816': {u'path': u'../crypto/threads_pthread.c', u'line': 21, u'size': 56}}

../../../tests/hazmat/backends/test_openssl_memleak.py:111: AssertionError
============ 1 failed, 93357 passed, 4177 skipped in 448.23 seconds ============
E: pybuild pybuild:336: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython2_2.7_cryptography/build; python2.7 -m pytest {dir}/tests/
dh_auto_test: pybuild --test -i python{version} -p 2.7 returned exit code 13
debian/rules:17: recipe for target 'build' failed
make: *** [build] Error 25

Matthias Klose (doko)
Changed in python-cryptography (Ubuntu):
importance: Undecided → High
Changed in python-cryptography (Ubuntu Bionic):
importance: Undecided → High
tags: added: ftbfs rls-bb-incoming
tags: added: id-5c50dd6970bac4371706f91e
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-cryptography (Ubuntu Bionic):
status: New → Confirmed
Changed in python-cryptography (Ubuntu):
status: New → Confirmed
Changed in python-cryptography (Ubuntu Bionic):
status: Confirmed → Fix Released
Changed in python-cryptography (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.