delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/09/08:57:17

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <42F8A819.50208@byu.net>
Date: Tue, 09 Aug 2005 06:56:57 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: Cary Jamison <Cary_Jamison AT Symantec DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: bash is crashing
References: <080420051614 DOT 24258 DOT 42F23EF20001988C00005EC222007507440A050E040D0C079D0A AT comcast DOT net> <dcti13$rrc$1 AT sea DOT gmane DOT org> <dd10ut$ppj$1 AT sea DOT gmane DOT org> <42F4B48E DOT 5010303 AT byu DOT net> <dd8sde$8tp$1 AT sea DOT gmane DOT org>
In-Reply-To: <dd8sde$8tp$1@sea.gmane.org>
X-IsSubscribed: yes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Cary Jamison on 8/8/2005 6:12 PM:
> Here's the trace from the last twenty seconds of the following command :
> 
>    strace -t bash test.sh | tee strace.out
> 
> where test.sh is simply :
> 
>    while true ; do sleep 10 ; done
> 
> it died after about twenty minutes.

Hmmm, your strace shows that just before the stackdump was created, bash
called fork(), then entered cygwin_except_handler sig 11, which is EAGAIN
(associated with no more processes).  Your system was probably loaded with
stale processes, so when windows tried to fork() into a new bash before
calling the next sleep, it failed.  From that point, bash may be crashing
because it tried to dereference NULL or something like that, that's where
a stack trace would be nice.  I don't know why your system ran out of
processes, when mine is not.  Maybe I can find a way to fake a fork()
failure while running bash in a debugger, and see what happens next.  At
any rate, bash should gracefully report an error when fork() fails, rather
than crashing.

> 
> I noticed that with the -t option, strace was occasionally printing out a 
> time that was about 10 minutes ahead of the real time.  You'll see a few of 
> these in the log.  I don't know what could be throwing it off like that, or 
> if it could somehow be related?

07:03:49 [main] bash 5008! pinfo::maybe_set_exit_code_from_windows: pid
5008, exit value - old 0x0, windows 0xDEADBEEF, cygwin 0x0
06:42:35 [main] sleep 5008 child_info::ready: signalled 0x680 that I was ready

I am seeing the same thing, too.  My computer reported the time was 6:42
when I grabbed these two consecutive lines from the running strace, so I
have no idea why strace is reporting timestamps 20 minutes into the future
after running for a while.  I doubt it has anything to do with the crash,
though, since my trial run has not crashed after more than 30 minutes of
execution as I type this.

> 
> It appears to be getting some access violations, but I haven't looked too 
> closely at it.  As I said earlier, I'll be gone for the next couple days and 
> check back then to see if I need to try a debug version of bash or whatever.

Are you running any sort of background program (virus scanner or desktop
search engine) that might be interfering with cygwin, so that cygwin runs
out of available Windows processes sooner?  What does 'ps -eaf' show, when
run from another console while your strace is running?  Are there a lot of
<defunct> cygwin processes hanging around?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC+KgY84KuGfSFAYARAoXHAKDQzPA/u5hadHQAHvUkzBm5tUghkACfTW4U
Kz5ur/+jXs76TKbiRE4Gx9k=
=f5vZ
-----END PGP SIGNATURE-----

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019