• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kevents, waitpid() with WNOHANG race
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kevents, waitpid() with WNOHANG race


  • Subject: Re: kevents, waitpid() with WNOHANG race
  • From: Godfrey van der Linden <email@hidden>
  • Date: Sun, 22 Nov 2009 17:26:07 +1100

Yes, please.  A kernel race between kevent engine and the process state is really important to understand, especially if you have a test case.  The hardest part of fixing a race is a solid test case.

Godfrey

PS.  I've been waxing philosophical on race conditions for a while.  The nature of a race condition is that it hides until you uncover it by changing the timing between a pair of threads, a classic case of "you milage may vary".  (I've been exploring evolutionary metaphors for a while in which a programmer is the mutagens; sorry I can be a boring on this subject)


On 2009-11-22, at 15:27 , Damien Sorresso wrote:

> On Nov 21, 2009, at 8:23 PM, Dave Keck wrote:
>> For the archives:
>>
>> After some stress testing, I've found that there is in fact a race
>> between when kevent() reports that a process exited, and when
>> waitpid() can successfully reap the process. Therefore, it is not safe
>> to use the WNOHANG option with waitpid() and friends to reap a child
>> process, after observing that the child process exited using kevent().
>
>
> Could you file a bug on this and attach a test case?
> --
> Damien Sorresso
> BSD Engineering
> Apple Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: kevents, waitpid() with WNOHANG race (From: Dave Keck <email@hidden>)
 >Re: kevents, waitpid() with WNOHANG race (From: Damien Sorresso <email@hidden>)

  • Prev by Date: Re: kevents, waitpid() with WNOHANG race
  • Next by Date: Re: Open Source Releases
  • Previous by thread: Re: kevents, waitpid() with WNOHANG race
  • Next by thread: Re: kevents, waitpid() with WNOHANG race
  • Index(es):
    • Date
    • Thread