This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author frohman
Recipients frohman
Date 2010-03-05.16:07:30
SpamBayes Score 1.9499267e-09
Marked as misclassified No
Message-id <1267805255.09.0.582618430445.issue8073@psf.upfronthosting.co.za>
In-reply-to
Content
I am building Python 2.6.4 with GCC 4.2.1 (SUSE Linux, kernel  2.6.22.19-0.4-default) 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? 

---------------------------------------------------------------------

CPUINFO

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 5
model name      : AMD Opteron(tm) Processor 246
stepping        : 8
cpu MHz         : 1992.106
cache size      : 1024 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow
bogomips        : 3988.23
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 5
model name      : AMD Opteron(tm) Processor 246
stepping        : 8
cpu MHz         : 1992.106
cache size      : 1024 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow
bogomips        : 3990.71
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp
History
Date User Action Args
2010-03-05 16:07:35frohmansetrecipients: + frohman
2010-03-05 16:07:35frohmansetmessageid: <1267805255.09.0.582618430445.issue8073@psf.upfronthosting.co.za>
2010-03-05 16:07:32frohmanlinkissue8073 messages
2010-03-05 16:07:30frohmancreate