public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "llucax at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/4737] fork is not async-signal-safe Date: Thu, 13 Oct 2011 17:53:00 -0000 [thread overview] Message-ID: <bug-4737-131-Z6GoIdhtNW@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-4737-131@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=4737 --- Comment #20 from Leandro Lucarella <llucax at gmail dot com> 2011-10-13 17:52:35 UTC --- Created attachment 5987 --> http://sourceware.org/bugzilla/attachment.cgi?id=5987 Test case for what could be a related problem I'm having a problem with a rare interaction between fork() and malloc() that looks like it could be related to this issue. The test case attached is the most reduced test case I could came up with. This is based on some trickery done to implement a concurrent garbage collector. The program eventually hangs and this is the backtrace I get: Thread 3 (Thread 0x7ffff7028700 (LWP 10504)): #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97 #1 0x00007ffff78a837e in _L_lock_36 () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff78a067c in ptmalloc_lock_all () at arena.c:288 #3 0x00007ffff78d7635 in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:95 #4 0x0000000000400c3b in do_fork () #5 0x00007ffff7bc4d8c in start_thread (arg=0x7ffff7028700) at pthread_create.c:304 #6 0x00007ffff791004d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #7 0x0000000000000000 in ?? () Thread 2 (Thread 0x7ffff7829700 (LWP 10503)): #0 0x00007ffff785e084 in do_sigsuspend (set=<value optimized out>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:63 #1 __sigsuspend (set=<value optimized out>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:78 #2 0x0000000000400bc1 in signal_handler () #3 <signal handler called> #4 0x00007ffff78a222f in _int_free (av=0x7ffff7bb91c0, p=0x603240) at malloc.c:4780 #5 0x00007ffff78a68e3 in __libc_free (mem=<value optimized out>) at malloc.c:3738 #6 0x0000000000400d3e in do_malloc () #7 0x00007ffff7bc4d8c in start_thread (arg=0x7ffff7829700) at pthread_create.c:304 #8 0x00007ffff791004d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #9 0x0000000000000000 in ?? () Thread 1 (Thread 0x7ffff7fd7720 (LWP 10500)): #0 0x00007ffff7bc606d in pthread_join (threadid=140737345918720, thread_return=0x0) at pthread_join.c:89 #1 0x0000000000400f82 in main () Is this related to the same lock that prevents fork() from being async-safe? If this is the case, I think it won't be considered a bug, right? TIA -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next parent reply other threads:[~2011-10-13 17:53 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-4737-131@http.sourceware.org/bugzilla/> 2011-10-13 17:53 ` llucax at gmail dot com [this message] 2011-10-13 17:54 ` llucax at gmail dot com 2011-10-13 17:56 ` llucax at gmail dot com 2011-10-14 14:06 ` bugdal at aerifal dot cx 2012-03-27 13:43 ` krebbel1 at de dot ibm.com 2012-04-11 7:58 ` aj at suse dot de 2014-02-16 19:42 ` jackie.rosen at hushmail dot com 2014-05-28 19:41 ` schwab at sourceware dot org 2014-08-25 2:25 ` naesten at gmail dot com 2015-05-07 15:27 ` gbenson at redhat dot com 2021-06-28 19:00 ` adhemerval.zanella at linaro dot org 2007-07-04 1:35 [Bug libc/4737] New: " nmiell at comcast dot net 2008-10-11 18:47 ` [Bug libc/4737] " morten+sources dot redhat dot com at afdelingp dot dk 2008-10-20 11:47 ` morten+sources dot redhat dot com at afdelingp dot dk 2008-10-21 5:13 ` nmiell at comcast dot net 2008-10-30 14:55 ` morten+sources dot redhat dot com at afdelingp dot dk 2008-11-05 9:00 ` tom dot honermann at oracle dot com 2008-11-05 9:57 ` tom dot honermann at oracle dot com 2008-11-06 23:10 ` nmiell at comcast dot net 2008-11-07 1:10 ` morten+sources dot redhat dot com at afdelingp dot dk 2008-11-11 21:35 ` tom dot honermann at oracle dot com 2008-11-11 21:41 ` tom dot honermann at oracle dot com 2008-11-11 22:04 ` tom dot honermann at oracle dot com 2008-11-18 22:30 ` tom dot honermann at oracle dot com 2008-11-18 23:45 ` rsa at us dot ibm dot com 2008-11-18 23:57 ` rsa at us dot ibm dot com 2008-11-19 1:39 ` tom dot honermann at oracle dot com 2008-11-19 16:23 ` rsa at us dot ibm dot com 2009-01-14 1:22 ` tom dot honermann at oracle dot com 2009-01-14 8:46 ` jakub at redhat dot com 2009-01-14 9:44 ` tom dot honermann at oracle dot com 2009-01-16 17:19 ` tom dot honermann at oracle dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-4737-131-Z6GoIdhtNW@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).