This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Shells hang during script execution
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 23 Feb 2006 16:59:35 -0500
- Subject: Re: Shells hang during script execution
- References: <A7E7241463A43B46B90F37197A667AE3055186@STEELPO.steeleye.com>
- Reply-to: cygwin at cygwin dot com
On Thu, Feb 23, 2006 at 04:35:12PM -0500, Ernie Coskrey wrote:
>Here's a description of a second hang condition we were encountering, along with a patch for it.
>
>
>The application (pdksh in this case) does a read on a pipe, which eventually calls pipe.cc fhandler_pipe::read in Thread 1. This creates a new cygthread with "read_pipe()" as the function. Then it calls th->detach(read_state).
>
>When the hang occurs, the new thread gets terminated early, before
>cygthread::stub() can call "callfunc()". You see the error message
>"erroneous thread activation". I'm not sure what's causing the thread
>to fail activation, but the result is, the read_state semaphore never
>gets signalled.
Sorry but this is another band-aid around a problem. The real problem
is that the code shouldn't get into the state that you are describing.
That's why cygwin prints an error message - it is a serious problem.
Making the code deal gracefully with a problem like this isn't going
to solve the underlying issue.
If you can figure out what's causing the erroneous thread activation
then that will be the real culprit.
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/