On Sun, Dec 16, 2007 at 01:39:46PM +0000, Rémi Denis-Courmont wrote: > Subject: libc6: strerror_r() not thread-safe > Package: libc6 > Version: 2.7-4 > Severity: important > > Hello, > > strerror_r() crashes pseudo-randomly when multiple threads invoke it > simultaneously. It appears the problem never occurs when using the C/POSIX > locale, and seems to be gettext-related. > > Test code attached. > > Interestingly, I once had the crash with the first error message in C locale: like said, I'd like to have: * your libc6 version ; * your libc6-i686 version ; * a valgrind trace, gdb is quite useless here. > # gdb ./a.out > (...) > (gdb) run > (...) > Connexion terminée par > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x86bd0b90 (LWP 10614)] > 0xb7e599d8 in strcmp () from /lib/i686/cmov/libc.so.6 > (gdb) bt > #0 0xb7e599d8 in strcmp () from /lib/i686/cmov/libc.so.6 > #1 0xb7e0d473 in _nl_find_msg () from /lib/i686/cmov/libc.so.6 > #2 0xb7e0e122 in __dcigettext () from /lib/i686/cmov/libc.so.6 > #3 0xb7e0ceb3 in dcgettext () from /lib/i686/cmov/libc.so.6 > #4 0xb7e59ee9 in strerror_r () from /lib/i686/cmov/libc.so.6 > #5 0xb7e27c9f in vfprintf () from /lib/i686/cmov/libc.so.6 > #6 0xb7e4a874 in vsnprintf () from /lib/i686/cmov/libc.so.6 > #7 0xb7e2f1d5 in snprintf () from /lib/i686/cmov/libc.so.6 > #8 0x080485f0 in run () > #9 0xb7f3a4fb in start_thread () from /lib/i686/cmov/libpthread.so.0 > #10 0xb7ebe60e in clone () from /lib/i686/cmov/libc.so.6 at least give a bt full or whatever trace that gives line numbers. dcigettext is huge, I won't spot a bug just by reading it. -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org
Attachment:
pgpxGNjvbr9Dk.pgp
Description: PGP signature