| delorie.com/archives/browse.cgi | search | 
| X-Spam-Check-By: | sourceware.org | 
| Date: | Thu, 23 Feb 2006 16:59:35 -0500 | 
| From: | Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com> | 
| To: | cygwin AT cygwin DOT com | 
| Subject: | Re: Shells hang during script execution | 
| Message-ID: | <20060223215935.GC20944@trixie.casa.cgf.cx> | 
| Reply-To: | cygwin AT cygwin DOT com | 
| References: | <A7E7241463A43B46B90F37197A667AE3055186 AT STEELPO DOT steeleye DOT com> | 
| Mime-Version: | 1.0 | 
| In-Reply-To: | <A7E7241463A43B46B90F37197A667AE3055186@STEELPO.steeleye.com> | 
| User-Agent: | Mutt/1.5.11 | 
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm | 
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> | 
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> | 
| List-Archive: | <http://sourceware.org/ml/cygwin/> | 
| List-Post: | <mailto:cygwin AT cygwin DOT com> | 
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> | 
| Sender: | cygwin-owner AT cygwin DOT com | 
| Mail-Followup-To: | cygwin AT cygwin DOT com | 
| Delivered-To: | mailing list 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/
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |