From owner-cvs-src-old@FreeBSD.ORG Fri Dec 5 20:51:16 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20B811065670 for ; Fri, 5 Dec 2008 20:51:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5F78FC08 for ; Fri, 5 Dec 2008 20:51:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mB5KpFvj043165 for ; Fri, 5 Dec 2008 20:51:15 GMT (envelope-from kib@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mB5KpFEY043164 for cvs-src-old@freebsd.org; Fri, 5 Dec 2008 20:51:15 GMT (envelope-from kib@repoman.freebsd.org) Message-Id: <200812052051.mB5KpFEY043164@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to kib@repoman.freebsd.org using -f From: Konstantin Belousov Date: Fri, 5 Dec 2008 20:50:24 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_exec.c kern_exit.c kern_fork.c kern_proc.c src/sys/sys proc.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2008 20:51:16 -0000 kib 2008-12-05 20:50:24 UTC FreeBSD src repository Modified files: sys/kern kern_exec.c kern_exit.c kern_fork.c kern_proc.c sys/sys proc.h Log: SVN rev 185647 on 2008-12-05 20:50:24Z by kib 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. Silent the assertion by using conditional variable allocated in the child. Broadcast the variable event on exec() and exit(). Since struct proc * sleep wait channel is overloaded for several unrelated events, I was unable to remove wakeups from the places where cv_broadcast() is added, except exec(). Reported and tested by: ganbold Suggested and reviewed by: jhb MFC after: 2 week Revision Changes Path 1.327 +1 -1 src/sys/kern/kern_exec.c 1.317 +2 -0 src/sys/kern/kern_exit.c 1.298 +1 -1 src/sys/kern/kern_fork.c 1.274 +1 -0 src/sys/kern/kern_proc.c 1.525 +2 -0 src/sys/sys/proc.h