public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "morten+sources dot redhat dot com at afdelingp dot dk" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/4737] fork is not async-signal-safe
Date: Thu, 30 Oct 2008 14:55:00 -0000	[thread overview]
Message-ID: <20081030145318.15664.qmail@sourceware.org> (raw)
In-Reply-To: <20070704013541.4737.nmiell@comcast.net>


------- 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  <signal handler called>
#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  <signal handler called>
#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.


  parent reply	other threads:[~2008-10-30 14:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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
     [not found] <bug-4737-131@http.sourceware.org/bugzilla/>
2011-10-13 17:53 ` llucax at gmail dot com
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

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=20081030145318.15664.qmail@sourceware.org \
    --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: link
Be 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).