Mail Archives: cygwin-developers/2001/09/08/02:15:45
This is a multi-part message in MIME format.
--------------040604070800060505000606
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
> I told Chuck in private email that I was *just* able to duplicate his
> make problem exactly once. This happened, of course, just as I had
> uploaded 1.3.3 to sources.redhat.com.
>
> The program segv'ed while building the winsup directory. Since cygwin
> was stripped, I couldn't easily see where it had died.
>
> I haven't been able to get it to fail ever since.
>
> So, I think I'm going to release it as is. If there is a bug, it
> seems to be extremely sporadic.
>
> I will wait to see if Chuck can duplicate any problems first, though.
So, after building cygwin (-g -O2 -fnative-struct) and installing it,
AND building cygwin (-g -O2 -fnative-struct) with the NEW kernel
running, I then stripped the active DLL, (cp cygwin1.dll to tmp.dll,
strip, exit all cygwin, command.com->copy tmp.dll cygwin1.dll)
And rebuilt cygwin (-g -O2 -fnative-struct) AGAIN.
The first time (with unstripped kernel in use) --> no error. This time
(with stripped kernel in use) --> error. Sigh.
I've attached the backtrace and everything else I could think of (no
rhyme or reason -- I just went thru my email and tried to do all of the
gdb things that had been asked of me before.)
The good news is, after quitting gdb, the build continued successfully.
I *think* the error is happening when a sub-process of make is just
terminating because it is finished in a certain directory. It "Leaves
directory X" and coredumps. But, this is perfect stopping place. When
when gdb returns (successfully) the parent make picks right up and
continues, unaware that anything bad happened -- because the child make
was terminating anyway! (Without JIT, the child make would return an
error code after stackdumping and the parent make quits; With JIT, gdb
returns success and the parent make continues!)
Anyway, after that build finished, I tried to build again (after
cleaning out my build directory)...it's still running; I'll report back
later. (Perhaps I too can join Chris in the "it failed ONCE" category).
To tell you the truth, I think 1.3.3 ought to go out regardless. It
aint perfect, but this bug seems to be tickled quite rarely--after the
recent (semi)fixes--and there's lots of improvements/fixes in the
current CVS begging for a release. (And don't forget, no errors at all
if the running kernel has symbols. I'm not sure why that would be, but...)
--Chuck
--------------040604070800060505000606
Content-Type: text/plain;
name="backtrace"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
filename="backtrace"
Program received signal SIGSEGV, Segmentation fault.
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) bt
#0 0x00410732 in exec_command (argv=0x5, envp=0xa242b00)
at /usr/src/make/src/job.c:2317
#1 0x61081eca in _libkernel32_a_iname ()
#2 0x0040a5cb in func_shell (o=0xa242ca8 "", argv=0x22d4bc,
funcname=0x40a7dd "shell") at /usr/src/make/src/function.c:1448
#3 0x0040a9f9 in expand_builtin_function (o=0xa242ca8 "", argc=1,
argv=0x22d4bc, entry_p=0x42f0b4) at /usr/src/make/src/function.c:1703
#4 0x0040ace0 in handle_function (op=0x22d5a0, stringp=0x22d59c)
at /usr/src/make/src/function.c:1803
#5 0x00404b53 in variable_expand_string (line=0x0,
string=0xa242250 "${shell cd $(here)/..; pwd}", length=-1)
at /usr/src/make/src/expand.c:235
#6 0x00404ffe in variable_expand (
line=0xa242250 "${shell cd $(here)/..; pwd}")
at /usr/src/make/src/expand.c:415
#7 0x004050d2 in variable_expand_for_file (
line=0xa242250 "${shell cd $(here)/..; pwd}", file=0x0)
at /usr/src/make/src/expand.c:457
#8 0x00405338 in allocated_variable_expand_for_file (
line=0xa242250 "${shell cd $(here)/..; pwd}", file=0x0)
at /usr/src/make/src/expand.c:535
#9 0x00426617 in try_variable_definition (flocp=0x22d784,
line=0xa242248 "bupdir:=${shell cd $(here)/..; pwd}", origin=o_file,
---Type <return> to continue, or q <return> to quit---
target_var=0) at /usr/src/make/src/variable.c:888
#10 0x0041a09d in read_makefile (
filename=0xa241d40 "/usr/src/cygwin/cygwin/winsup/doc/../Makefile.common",
flags=10) at /usr/src/make/src/read.c:723
#11 0x00419fd6 in read_makefile (filename=0xa241358 "Makefile", flags=0)
at /usr/src/make/src/read.c:702
#12 0x00418912 in read_all_makefiles (makefiles=0x0)
at /usr/src/make/src/read.c:234
#13 0x00413d6c in main (argc=4, argv=0x614e1e30, envp=0xa22a008)
at /usr/src/make/src/main.c:1503
#14 0x61003e3e in _libkernel32_a_iname ()
#15 0x6100403d in _libkernel32_a_iname ()
#16 0x6100407c in _libkernel32_a_iname ()
#17 0x0042dcb7 in cygwin_crt0 ()
(gdb) select-frame 0
(gdb) p argv
$1 = (char **) 0x5
(gdb) p envp
$2 = (char **) 0xa242b00
(gdb) p *envp
$3 = 0x61095b30 "([\ta([\ta0[\ta0[\ta8[\ta8[\ta@[\ta@[\taH[\taH[\taP[\taP[\taX[\
taX[\ta`[\ta`[\tah[\tah[\tap[\tap[\tax[\tax[\ta\200[\ta\200[\ta\210[\ta\210[\ta\
220[\ta\220[\ta\230[\ta\230[\taá[\taá[\ta¿[\ta¿[\ta¦[\ta¦[\ta+[\ta+[\ta+[\ta+[\t
a+[\ta+[\ta-[\ta-[\ta+[\ta+[\taa[\taa[\taF[\taF[\ta"...
(gdb) p /x $ebp
$4 = 0x22d394
(gdb) f 0
#0 0x00410732 in exec_command (argv=0x5, envp=0xa242b00)
at /usr/src/make/src/job.c:2317
2317 perror_with_name ("execvp: ", argv[0]);
(gdb) select-frame 3
(gdb) p *o
$5 = 0 '\000'
(gdb) p *argv
$6 = 0xa243d30 "cd /usr/src/cygwin/obj/i686-pc-cygwin/winsup/cygwin/..; pwd"
(gdb) p *entry_p
$7 = {name = 0x40a7dd "shell", len = 5 '\005', minimum_args = 0 '\000',
maximum_args = 1 '\001', expand_args = 1 '\001',
func_ptr = 0x40a3e8 <func_shell>}
(gdb) select-frame 4
(gdb) p *op
$8 = 0xa242ca8 ""
(gdb) p *stringp
$9 = 0xa24226a "}"Command name abbreviations are allowed if unambiguous.
(gdb) select-frame 2
(gdb) p maxlen
$10 = 200
(gdb) p i
$11 = 0
(gdb) p cc
$12 = 2282580
(gdb) p buf
No symbol "buf" in current context.
(gdb) select-frame 0
(gdb) info all-registers
eax 0x5 5
ecx 0x610992b8 1628017336
edx 0x61095020 1628000288
ebx 0x614e5690 1632523920
esp 0x22d364 0x22d364
ebp 0x22d394 0x22d394
esi 0xffffffff -1
edi 0x0 0
eip 0x410732 0x410732
eflags 0x10213 66067
cs 0x1b 27
ss 0x23 35
ds 0x23 35
es 0x23 35
fs 0x3b 59
gs 0x0 0
st0 0 (raw 0x00100022e68000000000)
st1 -nan(0x77e87d3b0022e6cc) (raw 0xffff77e87d3b0022e6cc)
st2 0 (raw 0x10000022e2d800000000)
st3 0 (raw 0x3000614e00000a22a000)
st4 -Inf (raw 0xf0000022e29c00000000)
st5 -nan(0x77e87d6077e8615b) (raw 0xffff77e87d6077e8615b)
st6 Inf (raw 0x7000ffffffff77e87cda)
---Type <return> to continue, or q <return> to quit---
st7 -Inf (raw 0xe3240000000400001000)
fctrl 0xffff037f -64641
fstat 0xffff0000 -65536
ftag 0xffffffff -1
fiseg 0x0 0
fioff 0x0 0
foseg 0xffff0000 -65536
fooff 0x0 0
fop 0x0 0
(gdb) info f
Stack level 0, frame at 0x22d394:
eip = 0x410732 in exec_command (/usr/src/make/src/job.c:2317);
saved eip 0x61081eca
called by frame at 0x22d3b4
source language c.
Arglist at 0x22d394, args: argv=0x5, envp=0xa242b00
Locals at 0x22d394, Previous frame's sp is 0x0
Saved registers:
ebp at 0x22d394, eip at 0x22d398
--------------040604070800060505000606--
- Raw text -