On Mar 3, 8:33 pm, Chris Lieb <chris.l...@gmail.com> wrote: > I am building Python 2.6.4 on a shared server and am encountering test > failures in test_hashlib.py and test_hmac.py, specifically concerning > sha512. I recompiled Python with --with-pydebug and CLFAGS=CPPFLAGS="- > g" and ran the tests in GDB and got the following results: > > ---------------------------------------------------------------------------- > > GNU gdb 6.6.50.20070726-cvs > Copyright (C) 2007 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and > you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "x86_64-suse-linux"... > Using host libthread_db library "/lib64/libthread_db.so.1". > (gdb) run test_hashlib.py > Starting program: /export/users1/chris.lieb/packages/python/bin/ > python2.6 test_hashlib.py > test_case_md5_0 (__main__.HashLibTestCase) ... ok > test_case_md5_1 (__main__.HashLibTestCase) ... ok > test_case_md5_2 (__main__.HashLibTestCase) ... ok > test_case_md5_huge (__main__.HashLibTestCase) ... ok > test_case_md5_uintmax (__main__.HashLibTestCase) ... ok > test_case_sha1_0 (__main__.HashLibTestCase) ... ok > test_case_sha1_1 (__main__.HashLibTestCase) ... ok > test_case_sha1_2 (__main__.HashLibTestCase) ... ok > test_case_sha1_3 (__main__.HashLibTestCase) ... ok > test_case_sha224_0 (__main__.HashLibTestCase) ... ok > test_case_sha224_1 (__main__.HashLibTestCase) ... ok > test_case_sha224_2 (__main__.HashLibTestCase) ... ok > test_case_sha224_3 (__main__.HashLibTestCase) ... ok > test_case_sha256_0 (__main__.HashLibTestCase) ... ok > test_case_sha256_1 (__main__.HashLibTestCase) ... ok > test_case_sha256_2 (__main__.HashLibTestCase) ... ok > test_case_sha256_3 (__main__.HashLibTestCase) ... ok > test_case_sha384_0 (__main__.HashLibTestCase) ... ok > test_case_sha384_1 (__main__.HashLibTestCase) ... ok > test_case_sha384_2 (__main__.HashLibTestCase) ... ok > test_case_sha384_3 (__main__.HashLibTestCase) ... ok > test_case_sha512_0 (__main__.HashLibTestCase) ... FAIL > test_case_sha512_1 (__main__.HashLibTestCase) ... FAIL > test_case_sha512_2 (__main__.HashLibTestCase) ... FAIL > test_case_sha512_3 (__main__.HashLibTestCase) ... FAIL > test_hexdigest (__main__.HashLibTestCase) ... > Program received signal SIGSEGV, Segmentation fault. > Cannot remove breakpoints because program is no longer writable. > It might be running in another process. > Further execution is probably impossible. > 0x00002ba86ffbb463 in ?? () > (gdb) bt > #0 0x00002ba86ffbb463 in ?? () > #1 0x000000000046993d in PyString_FromStringAndSize ( > str=0x7fff71c67800 " \203 5~︽ T(P m\200\a \005\vW > \025 \203 ! l G <] > \205 5 > \203\030 \207~ /c 1 GAz\201 82z ' > x q \177", > size=1054484473) > at Objects/stringobject.c:90 > #2 0x00002ba87030d59a in ?? () > #3 0x0000000000000000 in ?? () > > ----------------------------------------------------------------------------------------- > > GNU gdb 6.6.50.20070726-cvs > Copyright (C) 2007 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and > you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "x86_64-suse-linux"... > Using host libthread_db library "/lib64/libthread_db.so.1". > (gdb) run test_hmac.py > Starting program: /export/users1/chris.lieb/packages/python/bin/ > python2.6 test_hmac.py > test_legacy_block_size_warnings (__main__.TestVectorsTestCase) ... ok > test_md5_vectors (__main__.TestVectorsTestCase) ... ok > test_sha224_rfc4231 (__main__.TestVectorsTestCase) ... ok > test_sha256_rfc4231 (__main__.TestVectorsTestCase) ... ok > test_sha384_rfc4231 (__main__.TestVectorsTestCase) ... ok > test_sha512_rfc4231 (__main__.TestVectorsTestCase) ... > Program received signal SIGSEGV, Segmentation fault. > Cannot remove breakpoints because program is no longer writable. > It might be running in another process. > Further execution is probably impossible. > 0x00002b483844e4c7 in ?? () > (gdb) bt > #0 0x00002b483844e4c7 in ?? () > #1 0x000000000046993d in PyString_FromStringAndSize ( > str=0x7ffff84f6730 "\026C3D \235D\t \025 [ G > \032bGץ ~ \235\t\233aP", > size=4108309188) at Objects/stringobject.c:90 > #2 0x00002b48387e159a in ?? () > #3 0x0000000000000000 in ?? () > > -------------------------------------------------------------------- > > In the case of test_hashlib.py, it segfaulted on the first sha512 test > when I didn't have the debugging options enabled. Only after enabling > debugging did I get FAIL's for the sha512 tests. > > Does anyone know what is causing these failures?
Does anyone have any tips or insights for trying to debug this issue? Any help is greatly appreciated. -- Chris Lieb -- http://mail.python.org/mailman/listinfo/python-list