tech-userlevel archive

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

Re: pthread_cond_timedwait() returns ESRCH



On Fri, 18 Mar 2011 15:20:56 +0000
Andrew Doran <ad%netbsd.org@localhost> wrote:

> On Thu, Mar 17, 2011 at 05:02:46PM +0000, Sad Clouds wrote:
> > Hi, I'm trying to figure out why pthread_cond_timedwait() sometimes
> > returns error code 3 (ESRCH). Anyone knows under what circumstances
> > this can happen?
> 
> I think that could only come from a call to _lwp_park or _lwp_unpark
> or _lwp_unpark_all.  Those syscalls should be changed to wake up as
> many threads as possible, and then propogate back any error code.
> libpthread should be changed to judiciously ignore ESRCH errors
> returned from them. There are, I think, cases where we can try to
> unpark a thread that has already exited which would lead to ESRCH.
> Can you please file a PR?
> 

Hi, it's been assigned PR 44756. There is a listing for a test program
that shows how to trigger this error.


Home | Main Index | Thread Index | Old Index