Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2008 20:50:24 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern kern_exec.c kern_exit.c kern_fork.c kern_proc.c src/sys/sys proc.h
Message-ID:  <200812052051.mB5KpFEY043164@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812052051.mB5KpFEY043164>