NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/56276: exit hangs with vfork waiting



The following reply was made to PR kern/56276; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/56276: exit hangs with vfork waiting
Date: Sun, 27 Jun 2021 18:49:47 +0000

 On Fri, Jun 25, 2021 at 07:20:02AM +0000, Michael van Elst wrote:
  >  >   > When a process calls vfork(), it is suspended until the child exits
  >  >   > or calls execve().
  >  >   > 
  >  >   > When in this situation, a second thread of the parent calls exit()
  >  >   > the parent doesn't exit but waits uninterruptibly for the child.
  >  >  
  >  >  Shouldn't all threads be suspended for vfork? (as for regular fork)
  >  
  >  I would guess exit() races with vfork(). The second thread was almost
  >  done and waits for the other threads to finish so that it can then
  >  release the process resources.
 
 Hrm. It looks like we don't actually suspend other threads during
 fork. That is likely wrong (we can get an inconsistent copy of the
 memory space) but maybe apart from this case it doesn't matter...
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index