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: "Ghost" processes on Cygwin


Volker Quetschke wrote:
mwoehlke wrote:
I'm seeing something funny. While trying to build a large program on Cygwin using cl.exe (i.e. I am building a non-Cygwin app; just using Cygwin to drive 'make'), every now and then, cl.exe hangs. Before you tell me I'm on the wrong list :-), here's the funny part. If I do 'ps' in Cygwin, I can see the 'cl' process, along with its WINPID. However, it doesn't show up in task manager! Also, there are about five processes that are clearly Cygwin processes (bash.exe or sh.exe) that do NOT show up in Cygwin's 'ps'.
Can you enter
$ ls /proc/*/fd
in another cygwin console and report if it helps? It might unhang the stuck
process.

Hmm... nope. In fact, that got stuck too. 'ls /proc/2072' dies and must be 'kill -9'd. 'ps | grep 2072' says:
PID PPID PGID WINPID TTY UID STIME COMMAND
2072 1 1876 2072 con 1003 Apr 21 /usr/bin/bash


'ls /proc/<pid of cl.exe>/fd' failed to revive it. If I cat it's cmdline (in its /proc), I see that it matches what 'make' is claiming it ran. Something a little suspicious(?); fd's 5-7 are all pointing at the same place and that place is a directory. Also, 255 is pointing at the shell script (/w32dev/cl32.exe) that launched (exec()'d) the process. If it's relevant, 'make' (which does show up as the parent) actually launched 'cl'; it exec()'d through 3-4 scripts to get to the actual binary.

Is there any logic to this that I'm missing? I want to attach a debugger (probably devenv, since gdb - unsurprisingly - doesn't seem to work) to cl.exe to try to find out why it's hung, but I can't find the pid to attach to!

(Also, for the sake of brevity, please don't quote my cygcheck.out! :-) Um... PCYMTNQTA? ;-) (TA=Text Attachments))


--
Matthew
All of my signatures are 100% original. Including this one.

--
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]