Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Authenticated: #14308112
Date: Mon, 29 Aug 2005 19:19:12 +0300
From: Pavel Tsekov <ptsekov@gmx.net>
X-X-Sender: ptsekov@mordor
To: cygwin@cygwin.com
Subject: Re: Latest findings on zsh hang was Re: Re: zsh: command not found  =>  hangs
In-Reply-To: <20050829135044.GD32580@trixie.casa.cgf.cx>
Message-ID: <Pine.CYG.4.58.0508291905400.1704@mordor>
References: <20050828193433.GA25584@trixie.casa.cgf.cx> <18425.1125260276@www86.gmx.net>  <Pine.CYG.4.58.0508291305290.616@mordor> <20050829135044.GD32580@trixie.casa.cgf.cx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Y-GMX-Trusted: 0
X-IsSubscribed: yes

Hello,

On Mon, 29 Aug 2005, Christopher Faylor wrote:

> >The sigsuspend() function does one simple thing - it calls handle_sigsuspend().
> >handle_sigsuspend() sets the signal mask to the one passed to sigsuspend()
> >and then calls cancelable_wait() to wait for a signal which is not in the
> >mask just set. As part of its setup cancelable_wait() ends up calling
> >_cygtls::setup_fault() (via pthread::is_good_object()). _cygtls::setup_fault()
> >ends up calling the assembly routine stabilize_sig_stack() (via setjmp).
> >stabilize_sig_stack() will call a signal handler if there is a signal to
> >be processed. This check is used to determine if there is signal to process:
> >
> >2:      cmpl    $0,-1040(%ebx)
> >
> >The check is quering the `sig' member of the _cygtls structure. This
> >member is filled by the interrupt_setup() routine.
>
> Nice analysis of the problem.

It took me a while to understand what's going on. Cygwin changes over the
time and since I don't follow the changes closely I have to refresh my
memory each time I try debug something which is not trivial. And then at
the end everything seems so obvious once you've seen the whole picture :)

> This seems to be the same problem that Volker Quetschke reported here:
> http://sources.redhat.com/ml/cygwin/2005-08/msg01287.html
>
> AFAIK, I fixed that yesterday:
> http://sources.redhat.com/ml/cygwin/2005-08/msg01287.html
>
> FWIW, this doesn't fix the hang that *I* see, but I wouldn't have expected
> it to because that code didn't exist in 1.5.18 and zsh still hangs in
> 1.5.18.

I could reproduce the hang with your testcase but I didn't try to
trace it still. I'll try to debug if noone beats me.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

