[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pthread] Intermittent crashes in __errno_location() on Red Hat Linux 7
From: |
Wan-Teh Chang |
Subject: |
[pthread] Intermittent crashes in __errno_location() on Red Hat Linux 7.1 |
Date: |
Tue, 31 Jul 2001 21:03:10 -0700 |
Re: http://bugzilla.mozilla.org/show_bug.cgi?id=92497
OS: Red Hat Linux 7.1
Kernel: 2.4.2-2smp on a 2-processor i686
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
glibc version 2.2.2
Description
Our project is a set of C libraries and command-line tools.
Although we are not using the -pthread flag, all the C files
are compiled with -D_REENTRANT and all the executables are
linked with -lpthread before any other system libraries.
We are having intermittent segmentation faults when running
our command-line tools or test programs on Red Hat Linux 7.1.
(Both of our Red Hat Linux 7.1 systems are dual-processors.)
The frequency of the core dump is about 1/10 - 2/10. Almost
all of the core files have a stack trace that looks like this:
gdb) where
#0 __errno_location () at errno.c:25
#1 0x4016a484 in __socket () from /lib/i686/libc.so.6
#2 0x4002f5de in _pr_init_ipv6 () at pripv6.c:330
#3 0x4003e11f in _PR_InitStuff () at prinit.c:244
#4 0x4003e137 in _PR_ImplicitInitialization () at prinit.c:252
#5 0x4003e174 in PR_Init (type=PR_SYSTEM_THREAD,
priority=PR_PRIORITY_NORMAL,
maxPTDs=1) at prinit.c:303
#6 0x0805188a in main (argc=6, argv=0xbffff54c) at certutil.c:2468
#7 0x4009f177 in __libc_start_main (main=0x8050ba8 <main>, argc=6,
ubp_av=0xbffff54c, init=0x804be8c <_init>, fini=0x80eb140 <_fini>,
rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffff53c)
at ../sysdeps/generic/libc-start.c:129
(gdb)
We also have a core file with this stack trace:
(gdb) where
#0 __pthread_alt_lock (lock=0x402dd9d0, self=0x0) at spinlock.c:407
#1 0x401a0c86 in __pthread_mutex_lock (mutex=0x402dd9c0) at mutex.c:120
#2 0x401e2328 in __new_exitfn () at cxa_atexit.c:55
#3 0x401e22cb in __on_exit (func=0x401a22f0 <pthread_onexit_process>,
arg=0x0)
at on_exit.c:26
#4 0x401a1539 in pthread_initialize () at pthread.c:449
#5 0x401a5d25 in __do_global_ctors_aux () at eval.c:41
#6 0x4019da1a in _init () at eval.c:41
#7 0x4000e0f7 in _dl_init () at eval.c:41
(gdb)
The output of the 'ldd' command on one of our executables
shows that we link with -lpthread before -lc:
% ldd certutil
libplc4.so => not found
libplds4.so => not found
libnspr4.so => not found
libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40021000)
libdl.so.2 => /lib/libdl.so.2 (0x40036000)
libc.so.6 => /lib/i686/libc.so.6 (0x4003a000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Is this a known bug, or did we build our code incorrectly?
Thanks,
Wan-Teh
- [pthread] Intermittent crashes in __errno_location() on Red Hat Linux 7.1,
Wan-Teh Chang <=