X-Spam-Check-By: sourceware.org
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Subject: RE: cygwin 1.5.20-1, spinning pdksh, 100% CPU
Date: Mon, 6 Aug 2007 17:20:04 -0400
Message-ID: <76087731258D2545B1016BB958F00ADA123876@STEELPO.steeleye.com>
In-Reply-To: <76087731258D2545B1016BB958F00ADA123580@STEELPO.steeleye.com>
From: "Ernie Coskrey" <Ernie.Coskrey@steeleye.com>
To: <cygwin@cygwin.com>, <pechtcha@cs.nyu.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
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
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l76LMSDv013503

 
> Quite possibly.  There were changes to signal handling since 1.5.20, 
> IIRC.
> Unless I'm mistaken, there's even a patch for a race condition in 
> process handling code (though it's not in 1.5.24, I think).
> 

I just want to make sure I understand this - are you talking about a
change that has been made since 1.5.24-2 was released, which is in the
snapshot view now?  Or did you mean a fix that was made sometime between
1.5.20-1 and 1.5.24-2.

> > >
> > > Any suggestions would be appreciated!
> > 
> > Posting a sequence of steps that reliably reproduces the 
> problem for 
> > you would be great (but not necessarily easy).
> 

We've seen the issue happen with the following scripts.  Run a few
instances of "tst.sh".  Occasionally, one will become hung - if you
terminate the other tst.sh with Ctrl-C, you'll see that there's a
subtest.sh shell that is using up all the CPU.

First - generate "tstfile" by running
ls -l /bin > tstfile

tst.sh
======
while true
do
        for ltr in a b c d e f g
        do
                out=`./subtest.sh $ltr`
                echo Found $out
                date
        done
done

subtest.sh
==========
for i in `seq 1 100`
do
        f=`awk '{if(NR == i)print}' i=$i tstfile`
        m=`/bin/echo $f | grep $1`
        if [ ! -z "$m" ]
        then
                echo $i: $m
        fi
done


---------
Ernie Coskrey
SteelEye Technology, Inc.

--
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/


