Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 29 Aug 2005 09:50:44 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Latest findings on zsh hang was Re: Re: zsh: command not found => hangs Message-ID: <20050829135044.GD32580@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <20050828193433 DOT GA25584 AT trixie DOT casa DOT cgf DOT cx> <18425 DOT 1125260276 AT www86 DOT gmx DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i On Mon, Aug 29, 2005 at 01:45:43PM +0300, Pavel Tsekov wrote: >Hello, > >> in cancelable_wait(). The signal handler returns to the wrong place (?) and >> ends up in WaitForMultipleObjects() instead after the sigsuspend() call in >> zsh. I'll see what I can find out. If I find out something which makes more >> sense that what I currently know I'll post. > >I have new information on this matter. This time I think I found the real >reason for the hang. > >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. 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. cgf -- 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/