This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash is crashing


-----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@byu.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]