This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Signal handler not executed


On Thu, 9 Aug 2007, Ernie Coskrey wrote:

> > -----Original Message-----
> > From: cygwin-patches-owner@XXXXXX.XXX
> > [mailto:cygwin-patches-owner@XXXXXX.XXX] On Behalf Of Christopher Faylor
> > Sent: Thursday, August 09, 2007 1:19 PM
> > To: cygwin-patches@XXXXXX.XXX

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

> > Subject: Re: Signal handler not executed
> >
> > On Thu, Aug 09, 2007 at 01:09:48PM -0400, Ernie Coskrey wrote:
> > >There's a very small window of vulnerability in _sigbe,
> > which can lead
> > >to signal handlers not being executed.  In _sigbe, the
> > _cygtls lock is
> > >released before incyg is decremented.  If setup_handler acquires the
> > >lock just after _sigbe releases it, but before incyg is decremented,
> > >setup_handler will mistakenly believe that the thread is in Cygwin
> > >code, and will set up the interrupt using the tls stack.
> > >
> > >_sigbe should decrement incyg before releasing the lock.
> >
> > I'll apply this but are you saying that this actually fixes
> > your problem or that you think it fixes your problem?
> >
> > Thanks for the patch.
>
> It's hard to say definitively that it fixes the problem, since the
> problem is so hard to reproduce.  I've been running stress scripts for
> three days on six different systems, and haven't seen it occur.  But I
> feel pretty sure that this fixes it - it certainly matches the symptoms
> we see when we do happen to encounter the problem.

Ernie, I just wanted to say thanks for tracking this down.  Nice bit of
detective work.  I'm somewhat relieved that the problem was not with pdksh
code.  If it were in my power, I'd give out a gold star for this. :-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Belief can be manipulated.  Only knowledge is dangerous.  -- Frank Herbert


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