This is the mail archive of the cygwin-developers 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: [Cygwin64] dash segfault


On 2013-03-10 21:41, Corinna Vinschen wrote:
> On Mar 10 21:10, Peter Rosin wrote:
>> On 2013-03-10 20:38, Peter Rosin wrote:
>>> On 2013-03-10 20:20, Peter Rosin wrote:
>>>> Ok, here's a crash with the dll from release, still with home-built dash
>>>> w/o -O2.
>>>
>>> Below is another one, looking more similar to the ones I got with the
>>> dll from the install area...
>>>
>>> Every time that it has happened (or, I should say, every time I have
>>> checked), it has been a libtool script linking a dll (either as a
>>> library or as a module), that has crashed dash.
>>
>> I of course only needed to whisper that for it to happen elsewhere, this
>> time when running my not-overly-complicated build script. Still dash though.
>>
>> And now again in libtool --mode=install (not relinking).
>>
>> I have also seen a couple of instances of dash simply exiting w/o triggering
>> error_start (sadly wasn't sane enough to harvest an exit-code).
>>
>> Let me know if you want more backtraces, I get the feeling they're pretty
>> useless? I'd also appreciate further debugging tips.
> 
> I don't know.  I've tried myself but hadn't much time and fun to debug
> this more closely today.  The most interesting snippet I got was another
> stackdump with my local non-optimized Cygwin DLL which again pointed to
> ptmalloc3.cc, line 792, so there seems to be some free on an invalid
> address.  The rest of the information I could gather so far was not very
> helpful either.  I have this on my plate for tomorrow and most of next
> week, but I would naturally appreciate if others would help debugging 
> this, too.  It seems a rather tricky one.  If worst comes to the worst,
> I rip out ptmalloc3, and we can try again with the old malloc code.

I got what looks like a better backtrace, no time to look at it immediately
though. I did rebuild dash with .../configure DFLAGS=-g CPPFLAGS=-DDEBUG,
but don't know if that was instrumental in getting the backtrace. I will
let this one sit in gdb for a while, so if anyone want me to examine
something specific, let me know.

Cheers,
Peter

Reading symbols from /usr/bin/dash.exe...done.
Attaching to program `/usr/bin/dash.exe', process 9636
[New Thread 9636.0xb268]
[New Thread 9636.0xb660]
[New Thread 9636.0x9c88]
[New Thread 9636.0xb4f0]
[New Thread 9636.0xb6e8]
[New Thread 9636.0xb608]
(gdb) t a a bt

Thread 6 (Thread 9636.0xb608):
#0  0x0000000076eb0531 in ntdll!DbgBreakPoint ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x0000000076f57ef8 in ntdll!DbgUiRemoteBreakin ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#2  0x0000000000000000 in ?? ()

Thread 5 (Thread 9636.0xb6e8):
#0  0x0000000076eb135a in ntdll!ZwWaitForSingleObject ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x000007fefd4b10dc in WaitForSingleObjectEx ()
   from /cygdrive/c/Windows/system32/KERNELBASE.dll
#2  0x0000000000000000 in ?? ()

Thread 4 (Thread 9636.0xb4f0):
#0  0x0000000076eb135a in ntdll!ZwWaitForSingleObject ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x000007fefd4b10dc in WaitForSingleObjectEx ()
   from /cygdrive/c/Windows/system32/KERNELBASE.dll
#2  0x0000000000000000 in ?? ()

Thread 3 (Thread 9636.0x9c88):
#0  0x0000000076eb135a in ntdll!ZwWaitForSingleObject ()
---Type <return> to continue, or q <return> to quit---
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x000007fefd4b10dc in WaitForSingleObjectEx ()
   from /cygdrive/c/Windows/system32/KERNELBASE.dll
#2  0x0000000000000000 in ?? ()

Thread 2 (Thread 9636.0xb660):
#0  0x0000000076eb137a in ntdll!ZwReadFile ()
   from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
#1  0x000007fefd4b1a7a in ReadFile ()
   from /cygdrive/c/Windows/system32/KERNELBASE.dll
#2  0x0000000000000000 in ?? ()

Thread 1 (Thread 9636.0xb268):
#0  strlen (str=0x1 <Address 0x1 out of bounds>)
    at /usr/src/debug/cygwin-1.7.18-2/newlib/libc/string/strlen.c:68
#1  0x00000001800bf65e in strdup (s=0x1 <Address 0x1 out of bounds>)
    at /usr/src/debug/cygwin-1.7.18-2/winsup/cygwin/malloc_wrapper.cc:213
#2  0x00000001801114eb in _sigfe () from /usr/bin/cygwin1.dll
#3  0x0000000000229d70 in ?? ()
#4  0x0000000100416a31 in findvar (vpp=0x6fffff841c8,
    name=0x6fffff841c8 "old_library=") at ../../src/var.c:700
#5  0x0000000100415dd7 in setvareq (s=0x6fffff841c8 "old_library=", flags=4)
    at ../../src/var.c:298
#6  0x0000000100416474 in mklocal (name=0x6fffff841c8 "old_library=")
---Type <return> to continue, or q <return> to quit---
    at ../../src/var.c:513
#7  0x00000001004040ed in evalcommand (cmd=0x6ffffea1900, flags=0)
    at ../../src/eval.c:745
#8  0x000000010040321a in evaltree (n=0x6ffffea1900, flags=0)
    at ../../src/eval.c:280
#9  0x000000010040321a in evaltree (n=0x6ffffea1900, flags=0)
    at ../../src/eval.c:280
#10 0x00000001004031ce in evaltree (n=0x6ffffea1890, flags=0)
    at ../../src/eval.c:269
#11 0x00000001004031ce in evaltree (n=0x6ffffe96448, flags=0)
    at ../../src/eval.c:269
#12 0x0000000100403711 in evalcase (n=0x6ffffe95ab0, flags=0)
    at ../../src/eval.c:434
#13 0x000000010040321a in evaltree (n=0x6ffffe95ab0, flags=0)
    at ../../src/eval.c:280
#14 0x000000010040321a in evaltree (n=0x6ffffe95ab0, flags=0)
    at ../../src/eval.c:280
#15 0x00000001004031ce in evaltree (n=0x6ffffe92d70, flags=0)
    at ../../src/eval.c:269
#16 0x00000001004031ce in evaltree (n=0x6ffffe92c60, flags=0)
    at ../../src/eval.c:269
#17 0x00000001004031ce in evaltree (n=0x6ffffe900a8, flags=0)
    at ../../src/eval.c:269
#18 0x00000001004031ce in evaltree (n=0x6ffffe90030, flags=0)
---Type <return> to continue, or q <return> to quit---
    at ../../src/eval.c:269
#19 0x000000010040486a in evalfun (func=0x6ffffe90010, argc=42,
    argv=0x6fffffbfd10, flags=0) at ../../src/eval.c:948
#20 0x0000000100404514 in evalcommand (cmd=0x6fffffbbf18, flags=0)
    at ../../src/eval.c:871
#21 0x000000010040321a in evaltree (n=0x6fffffbbf18, flags=0)
    at ../../src/eval.c:280
#22 0x000000010040321a in evaltree (n=0x6fffffbbf18, flags=0)
    at ../../src/eval.c:280
#23 0x000000010040c359 in cmdloop (top=1) at ../../src/main.c:238
#24 0x000000010040c229 in main (argc=46, argv=0x22a9c0)
    at ../../src/main.c:178
(gdb)


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