This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Deadlock in multithreaded application when doing IO andfork.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 1 Feb 2013 10:51:51 -0800 (PST)
- Subject: Re: RFC: Deadlock in multithreaded application when doing IO andfork.
- References: <510AF80E.5020400@redhat.com><20130201000524.A140F2C069@topped-with-meat.com><510BE232.7060903@redhat.com>
> The fix actually requires two things:
> (a) Run all atfork prepare handlers.
> (b) Lock list_all_lock to prevent more IO.
> (c) After (b) run malloc atfork handler e.g. run handler last.
I don't understand the (b) requirement. It's not required to fix the
deadlock test case I described (there is no stdio use at all in that case).
Whatever it's about, it seems like it should be a follow-up change after
the basic change to run malloc atfork last.