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: Cygwin 1.7: Concurrency Issue with Shared State Initialization


Hi Christopher,

> Is echo being run under a bash shell?  From the command prompt?  In a
> .bat file?  Repeatedly in a loop?

I experienced it in the same scenario described in my original report:
A non-Cygwin shell calling a non-Cygwin 'gnumake -j' processing Makefiles
with rules calling Cygwin programs. Echo.exe is the most called Cygwin
program as our rules contain quite some logging stuff.

> [...] cygwin1-*.dbg.bz2 [...]
> c:\>c:\cygwin\bin\gdb /bin/echo.exe <pid>
> (gdb) bt
> (gdb) x/80x $esp
> (gdb) <just hit enter here>

Thanks for the by no means at all too detailed instructions :-)

The good news are that I was again able to reproduce the "echo hang". The
bad news are however that the debugging doesn't work.

As you gave the instructions above for the cmd prompt I presumed that <pid>
refers to the "Windows PID":

C:\>c:\cygwin\bin\gdb /bin/echo.exe 3684
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(no debugging symbols found)
Attaching to program `/bin/echo.exe', process 3684
[New thread 3684.0xe70]
[New thread 3684.0x120]
[New thread 3684.0x988]

At this point gdb "hanged" and I didn't know how to get it to bringing up the
(gdb) prompt so I had to kill it.

> If it is happening in my code it will, once again, be tricky to debug
> since you actually can't attach a debugger to the process at this point
> in process initialization.

Seems we're in this situation :-(

Regards, Oliver

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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