From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17571 invoked by alias); 30 Oct 2008 14:55:30 -0000 Received: (qmail 15665 invoked by uid 48); 30 Oct 2008 14:53:18 -0000 Date: Thu, 30 Oct 2008 14:55:00 -0000 Message-ID: <20081030145318.15664.qmail@sourceware.org> From: "morten+sources dot redhat dot com at afdelingp dot dk" To: glibc-bugs@sources.redhat.com In-Reply-To: <20070704013541.4737.nmiell@comcast.net> References: <20070704013541.4737.nmiell@comcast.net> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/4737] fork is not async-signal-safe X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00082.txt.bz2 ------- Additional Comments From morten+sources dot redhat dot com at afdelingp dot dk 2008-10-30 14:53 ------- Here is a bit more information. It appears that this is more than one bug (or at least more than one lock). The bug I hit is caused by __GI__IO_list_lock(). The bug which Nicholas Miell hit is caused by ptmalloc_lock_all(), which is called via thread_atfork(). The following stack traces are from Ubuntu's libc6-2.7-10ubuntu3 glibc package. When the deadlock is provoked by a fork() in the main loop: #0 0xb7f3d410 in __kernel_vsyscall () #1 0xb7ebc033 in __lll_lock_wait_private () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7e40a2d in _L_lock_2616 () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7e3fd7d in __GI__IO_list_lock () from /lib/tls/i686/cmov/libc.so.6 #4 0xb7e6dd45 in fork () from /lib/tls/i686/cmov/libc.so.6 #5 0x080484ae in sighandler () #6 #7 0xb7e3fd77 in __GI__IO_list_lock () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7e6dd45 in fork () from /lib/tls/i686/cmov/libc.so.6 #9 0x08048591 in main () When the deadlock is provoked by malloc()/free() in the main loop: #0 0xb7f93410 in __kernel_vsyscall () #1 0xb7f12033 in __lll_lock_wait_private () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7e9db4f in _L_lock_48 () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7e9728b in ptmalloc_lock_all () from /lib/tls/i686/cmov/libc.so.6 #4 0xb7ec3f7f in fork () from /lib/tls/i686/cmov/libc.so.6 #5 0x0804850e in sighandler () #6 #7 0xb7e9971a in _int_free () from /lib/tls/i686/cmov/libc.so.6 #8 0xb7e9d4f0 in free () from /lib/tls/i686/cmov/libc.so.6 #9 0x08048600 in main () -- What |Removed |Added ---------------------------------------------------------------------------- CC| |morten+sources dot redhat | |dot com at afdelingp dot dk http://sourceware.org/bugzilla/show_bug.cgi?id=4737 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.