malloc/free deadlock bug
David Schultz
das at FreeBSD.ORG
Wed Feb 2 10:11:06 PST 2005
On Tue, Feb 01, 2005, Gergely, KOVACS (VBuster) wrote:
> The hardware environment is a dual Xeon 3Ghz, and the OS is FreeBSD 5.3
> with SMP enabled kernel.
>
> The problem is that around in every 10th hour (100000 mail process) a
> deadlock has been happened. According to gdb all threads are waiting in
> malloc's, or free's mutex handler function:
>
> #0 0x280b3c93 in pthread_mutexattr_init () from
> /usr/lib/libpthread.so.1
> #1 0x280b3be5 in pthread_mutexattr_init () from
> /usr/lib/libpthread.so.1
> #2 0x280b04bb in _pthread_mutex_trylock () from
> /usr/lib/libpthread.so.1
> #3 0x280b15e7 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
> #4 0x280a9b87 in _spinlock () from /usr/lib/libpthread.so.1
> #5 0x2811c4a1 in ldexp () from /lib/libc.so.5
^^^^^
> #6 0x2811c6d8 in malloc () from /lib/libc.so.5
Something is fishy about this backtrace; malloc() doesn't call
ldexp(), and ldexp() doesn't call _spinlock(). Perhaps you're
using the wrong debugging symbols, or there's some sort of signal
handler weirdness or gdb bug at fault here. (BTW, a full
backtrace from an unstripped libc might be more helpful.)
More information about the freebsd-bugs
mailing list