This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/19703] Do not run malloc/libio fork handlers in a signal handler
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 11 May 2016 12:42:57 +0000
- Subject: [Bug nptl/19703] Do not run malloc/libio fork handlers in a signal handler
- Auto-submitted: auto-generated
- References: <bug-19703-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19703
--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Created attachment 9252
--> https://sourceware.org/bugzilla/attachment.cgi?id=9252&action=edit
tst-mallocfork2.c
This is a variant of the existing tst-mallocfork test case which shows that the
current and previous fork handlers for malloc are not thread safe. In my
tests, the process self-deadlocks fairly soon. On an old glibc (Red Hat
Enterprise Linux 7.2 which does not have the recent changes in this area), the
backtrace looks like this:
#0 0x00007f3995ed1c4c in __lll_lock_wait_private () from /lib64/libc.so.6
#1 0x00007f3995e4ffed in _L_lock_59 () from /lib64/libc.so.6
#2 0x00007f3995e4869c in ptmalloc_lock_all () from /lib64/libc.so.6
#3 0x00007f3995e8b522 in fork () from /lib64/libc.so.6
#4 0x0000000000400e78 in sigusr1_handler (signo=<optimized out>) at
tst-mallocfork2.c:69
#5 <signal handler called>
#6 0x00007f3995e4c705 in _int_malloc () from /lib64/libc.so.6
#7 0x00007f3995e4d8dc in malloc () from /lib64/libc.so.6
#8 0x0000000000400bf6 in main () at tst-mallocfork2.c:163
--
You are receiving this mail because:
You are on the CC list for the bug.