[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#454183: libc6: deadlock in syslog() after fork



Package: libc6
Version: 2.5-7
Severity: important

the syslog() funktion seems sometimes to end in a deadlock, if a 
multithreaded process, where are threads logging to syslog, at the
same time does a fork() and the child trys to log something to syslog.
the child process hangs in the syslog call. the gdb backtrace is:

#0  0xb7e46b64 in __pthread_sigsuspend (set=0xbf8b7b3c) at
../linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c:54
#1  0xb7e45728 in __pthread_wait_for_restart_signal (self=0x806c8c0) at
pthread.c:1224
#2  0xb7e47fe6 in __pthread_alt_lock (lock=0xb7e3bd5c, self=0x806c8c0)
at restart.h:34
#3  0xb7e451dc in *__GI___pthread_mutex_lock (mutex=0xb7e3bd4c) at
mutex.c:123
#4  0xb7d9f8d0 in __tz_convert (timer=0xbf8b7d20, use_localtime=1,
tp=0xbf8b7c98) at tzset.c:570
#5  0xb7d9e00d in __localtime_r (t=0xbf8b7d20, tp=0xbf8b7c98) at
localtime.c:33
#6  0xb7dd98c8 in *__GI_vsyslog (pri=6, fmt=0x8063bae "session:%d -1",
ap=0xbf8b7d58 "\034\003") at ../sysdeps/generic/syslog.c:197
#7  0xb7dd97f2 in *__GI_syslog (pri=6, fmt=0x8063bae "session:%d -1") at
../sysdeps/generic/syslog.c:127

it seems as if the mutex is locked before the fork and not unlocked in
the child.

-- System Information:
Debian Release: lenny/sid
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18.3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

-- no debconf information




Reply to: