threads/76690: fork hang in child for (-lc_r & -lthr)
Marc Olzheim
marcolz at stack.nl
Mon Oct 24 09:58:54 PDT 2005
On Mon, Oct 24, 2005 at 12:41:01PM -0400, Daniel Eischen wrote:
> > But then the free() in the child process may be using an unstable
> > state of the malloc system (because if you don't acquire the lock
> > before the fork(), malloc() may be busy in the middle of the fork()).
>
> I don't think that can happen because libc_r will not switch out
> a thread that is in a critical region (and libc locks are critical
> regions) until it leaves the region.
Well, that would be the idea, but GDB traces prove otherwise... :P
And that's why the patch prevents the test program in the PR from
hanging.
Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-threads/attachments/20051024/22cce0a4/attachment.bin
More information about the freebsd-threads
mailing list