This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Proposed fix for cancellation bug found by Neal Ferguson.


On 26 Sep 2000, Ulrich Drepper wrote:

> Date: 26 Sep 2000 17:05:59 -0700
> From: Ulrich Drepper <drepper@redhat.com>
> Reply-To: Ulrich Drepper <drepper@cygnus.com>
> To: Kaz Kylheku <kaz@ashi.footprints.net>
> Cc: libc-alpha@sources.redhat.com
> Subject: Re: Proposed fix for cancellation bug found by Neal Ferguson.
> 
> Kaz Kylheku <kaz@ashi.footprints.net> writes:
> 
> >   /* Only store a non-null peif if the thread has cancellation enabled. 
> >      Otherwise pthread_cancel will unconditionally call the extricate handler,
> >      and restart the thread giving rise to forbidden spurious wakeups. */
> > [...]
> > How is that?
> 
> I think it is only problematic if the user does something forbidden
> (like setting the cancelation state in an interrupt handler).  In this

It happens *always* whenever a thread disables its cancellation and then
executes waits during which someone calls pthread_cancel on it. E.g.  create a
thread, have it disable cancellation and call pthread_join(), then cancel that
thread.  Spurious wakeup.  No signals involved.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]