delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/26/18:40:18

X-Spam-Check-By: sourceware.org
Date: Wed, 26 Apr 2006 17:40:08 -0500
From: mwoehlke <mwoehlke-nospam AT tibco DOT com>
Subject: Re: "Ghost" processes on Cygwin
In-reply-to: <444FF238.40906@scytek.de>
To: cygwin AT cygwin DOT com
Reply-to: cygwin AT cygwin DOT com
Message-id: <444FF6C8.50707@tibco.com>
MIME-version: 1.0
User-Agent: Thunderbird 1.5 (X11/20051201)
References: <444FF04F DOT 20109 AT tibco DOT com> <444FF238 DOT 40906 AT scytek DOT de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019