Shells hang during script execution
Christopher Faylor
cgf-no-personal-reply-please@cygwin.com
Thu Feb 23 22:07:00 GMT 2006
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/
More information about the Cygwin
mailing list