Re: Minimal test case for Make crash bug

2004-03-26 Thread Joshua Daniel Franklin
On Sat, Mar 20, 2004 at 02:19:55PM -0500, Igor Pechtchanski wrote: > On Sat, 20 Mar 2004, Dan Kegel wrote: > > Sadly, error_start didn't seem to be able to start gdb: > > > > $ export CYGWIN=error_start:/usr/bin/gdb > > $ make > > *** starting debugger for pid 2156, tid 496 > >4 [main] make

Re: Minimal test case for Make crash bug

2004-03-23 Thread Dan Kegel
Dan Kegel wrote: (gdb) p alloc_sz $3 = 0 Bingo. That's the problem. I've checked in a fix for this and have uploaded a new snapshot. Can you confirm that it fixes the problem? Yep, fixes my little test case. I'll run more exhaustive tests tomorrow. It handled my real-world case well, but when I

Re: Minimal test case for Make crash bug

2004-03-22 Thread Christopher Faylor
On Sun, Mar 21, 2004 at 11:00:08PM -0800, Dan Kegel wrote: >cgf wrote: >>On Sun, Mar 21, 2004 at 11:04:29AM -0800, Dan Kegel wrote: >>>Here's the gdb stuff you asked for; >>>[snip] >>>(gdb) p alloc_sz >>>$3 = 0 >> >>Bingo. That's the problem. I've checked in a fix for this and have >>uploaded a

Re: Minimal test case for Make crash bug

2004-03-21 Thread Dan Kegel
cgf wrote: On Sun, Mar 21, 2004 at 11:04:29AM -0800, Dan Kegel wrote: Here's the gdb stuff you asked for; [snip] (gdb) p alloc_sz $3 = 0 Bingo. That's the problem. I've checked in a fix for this and have uploaded a new snapshot. Can you confirm that it fixes the problem? Yep, fixes my little te

Re: Minimal test case for Make crash bug

2004-03-21 Thread Christopher Faylor
On Sun, Mar 21, 2004 at 11:04:29AM -0800, Dan Kegel wrote: >Here's the gdb stuff you asked for; >[snip] >(gdb) p alloc_sz >$3 = 0 Bingo. That's the problem. I've checked in a fix for this and have uploaded a new snapshot. Can you confirm that it fixes the problem? -- Christopher Faylor Cygwin P

Re: Minimal test case for Make crash bug

2004-03-21 Thread Dan Kegel
Hannu wrote: FWIW; using the previously posted fds.c, slightly modified: I can reproduce this with 1.5.9-1 (ususally 133 iterations and a core dump). Switching to 1.5.8-1 cygwin1.dll rasies the limit to some 3200 iterations (no dump). Excellent, thanks for the info. I just downloaded ftp://ftp.lu

RE: Minimal test case for Make crash bug

2004-03-21 Thread Hannu E K Nevalainen
> From: Dan Kegel > Dan Kegel wrote: > > Got it. I'm attaching a minimal test case. glibc's makefile > > requires that Make be able to handle 140 levels of include recursion, > > but cygwin Make crashes after about 130 -- unless you're running > > under gdb or strace, in which case it works fine

Re: Minimal test case for Make crash bug

2004-03-21 Thread Dan Kegel
cgf wrote: OK, I built a debugging version of cygwin1.dll and dropped it on top of the normal one, then ran my test program with export CYGWIN=error_start:C:\\cygwin\\bin\\gdb.exe ./foo and hit 'c' and then 'bt' as suggested. Looks like the debugger is a bit happier with the debugging build. I

Re: Minimal test case for Make crash bug

2004-03-21 Thread Christopher Faylor
On Sat, Mar 20, 2004 at 10:57:46PM -0800, Dan Kegel wrote: >Dan Kegel wrote: >>int main(int argc, char **argv) >>{ >>int i; >>for (i=0; ; i++) { >>int fd = open("foo.c", O_RDONLY); >>printf("fd #%d is %d\n", i, fd); >>} >>} >> >>This crashes f

Re: Minimal test case for Make crash bug

2004-03-21 Thread Dan Kegel
I just reproduced the crash on a second system, this time on a WinME box, where my foo.c open-lots-of-fds program made it up to 180 or so fds before crashing. Before I updated from ftp.lug.udel.edu, I tried the (six-month-old?) cygwin that was already on the WinME box; it worked fine with foo.c. T

Re: Minimal test case for Make crash bug

2004-03-20 Thread Dan Kegel
Dan Kegel wrote: int main(int argc, char **argv) { int i; for (i=0; ; i++) { int fd = open("foo.c", O_RDONLY); printf("fd #%d is %d\n", i, fd); } } This crashes for me at the 133rd fd unless I run it under gdb ... OK, I built a debugging versi

Re: Minimal test case for Make crash bug

2004-03-20 Thread Christopher Faylor
On Sat, Mar 20, 2004 at 08:32:13PM -0800, Dan Kegel wrote: >It's all a bit mysterious. Where's a good place to look for clues? >I've already tried shutting down as many systray programs as I can... Build a debugging version of cygwin, use CYGWIN=error_start:..., type 'c' when gdb pops up, and the

Re: Minimal test case for Make crash bug

2004-03-20 Thread Dan Kegel
Dan Kegel wrote: Got it. I'm attaching a minimal test case. glibc's makefile requires that Make be able to handle 140 levels of include recursion, but cygwin Make crashes after about 130 -- unless you're running under gdb or strace, in which case it works fine. Turns out the smallest test case is

Re: Minimal test case for Make crash bug

2004-03-20 Thread Christopher Faylor
On Sat, Mar 20, 2004 at 12:55:20PM -0800, Dan Kegel wrote: >Dan Kegel wrote: >>Sadly, error_start didn't seem to be able to start gdb: > >Thanks to Igor for pointing out that error_start must be a >DOS path. Here's what I see once I correct that: > >$ export CYGWIN=error_start:C:\\cygwin\\bin\\gdb

Re: Minimal test case for Make crash bug

2004-03-20 Thread Dan Kegel
Dan Kegel wrote: Sadly, error_start didn't seem to be able to start gdb: Thanks to Igor for pointing out that error_start must be a DOS path. Here's what I see once I correct that: $ export CYGWIN=error_start:C:\\cygwin\\bin\\gdb.exe $ make ... (gdb) bt #0 0x77f75a59 in ntdll!DbgUiConnectToDbg ()

Re: Minimal test case for Make crash bug

2004-03-20 Thread Igor Pechtchanski
On Sat, 20 Mar 2004, Dan Kegel wrote: Dan Kegel wrote: > Got it. I'm attaching a minimal test case. glibc's makefile > requires that Make be able to handle 140 levels of include recursion, > but cygwin Make crashes after about 130 -- unless you're running > under gdb or strace, in which case it

Re: Minimal test case for Make crash bug

2004-03-20 Thread Dan Kegel
Dan Kegel wrote: Got it. I'm attaching a minimal test case. glibc's makefile requires that Make be able to handle 140 levels of include recursion, but cygwin Make crashes after about 130 -- unless you're running under gdb or strace, in which case it works fine. To repeat the bug, just unpack the

Minimal test case for Make crash bug (was: Re: make segfault building cross-glibc with latest cygwin)

2004-03-20 Thread Dan Kegel
Dan Kegel wrote: Aha. Using 'make -d' shows more detail: ... so the recursion in extra-module.mk (which is expected, though I don't know how many repeats are normal) is going awry somehow. Got it. I'm attaching a minimal test case. glibc's makefile requires that Make be able to handle 140 levels