svn commit: r185647 - in head/sys: kern sys

Kostik Belousov kostikbel at gmail.com
Fri Dec 5 13:03:57 PST 2008


On Fri, Dec 05, 2008 at 12:54:40PM -0800, Julian Elischer wrote:
> Konstantin Belousov wrote:
> >Author: kib
> >Date: Fri Dec  5 20:50:24 2008
> >New Revision: 185647
> >URL: http://svn.freebsd.org/changeset/base/185647
> >
> >Log:
> >  Several threads in a process may do vfork() simultaneously. Then, all
> >  parent threads sleep on the parent' struct proc until corresponding
> >  child releases the vmspace. Each sleep is interlocked with proc mutex of
> >  the child, that triggers assertion in the sleepq_add(). The assertion
> >  requires that at any time, all simultaneous sleepers for the channel use
> >  the same interlock.
> 
> We DID have a thread_single() in the fork code so that
> only one thread would proceed through the fork itself at a time.
> However it was removed last year as it proved to be a problem in some 
> cases. Maybe we need to look at replacing it in some way.

Yes, I know, and I considered restoring conditional single-threading
for the vfork(). But it would immediately bring back all NFS client
problems, associated with this (at least sleeping with vnode lock held
and nfsbiod creation deadlocks).

This is a second problem caused by removal of the single-threading.
Nonetheless, I think that your change was right, and we shall just
fix a corner cases.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20081205/450e717a/attachment.pgp


More information about the svn-src-head mailing list