delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/28/01:22:15

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=V5/M4LiOxL2H3juIwh4/mdWBTOWVIQmtn8vWvj5vI/tj+i8Ic1QB+
6e4X7h2UtzNVV05V/Cabx1l4VjDoftq3Qq2boomOwLkeBv3Bsn/KLZXQOY+zKzmK
SA2TaDPTlyApFWDsOvA/b7NEyIFEhX70iAxKOYUllc8D6/e/e4jvXU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=WowUOq8s/TOD0TRta6jIF9ELQPQ=; b=BvxaubyiV5o7KeAdPuiVQdjD6+ql
26x9nNc38J3WsIat6USI0Cts7Fy3LUxLWxyFB5ndcJNtc2zYW81B6DlZlQYRSr9e
DpQ9D/TSrF+0aUQE5uZqK3fQC5qCnLtlNDOTTgQBtS7tcr5ThFp/EO1xoBKyX1cO
yQzwGvBeVLnwsBQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mho-01-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX18FDxvxEYkyqyavxhITKezp
Date: Sat, 28 Dec 2013 01:21:51 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ps shows same process more than once
Message-ID: <20131228062151.GA4604@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAGaO6c9rxafNajvdzQhngOjTQn+fjjAp9NRLTpYbbgcKHe8R5A AT mail DOT gmail DOT com> <20131128130813 DOT GH2449 AT calimero DOT vinschen DOT de> <20131128155504 DOT GC5063 AT ednor DOT casa DOT cgf DOT cx> <20131128160243 DOT GB5803 AT ednor DOT casa DOT cgf DOT cx> <CAGaO6c8EBBzQvdEkUFEOb4=npHXsdwgOYaUiL=WHO3iVsufZBg AT mail DOT gmail DOT com> <20131202152455 DOT GC5464 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20131202152455.GC5464@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Mon, Dec 02, 2013 at 10:24:55AM -0500, Christopher Faylor wrote:
>On Mon, Dec 02, 2013 at 01:47:09PM +0800, George M. Florendo wrote:
>>On 11/29/13, Christopher Faylor wrote:
>>> On Thu, Nov 28, 2013 at 10:55:04AM -0500, Christopher Faylor wrote:
>>>>On Thu, Nov 28, 2013 at 02:08:13PM +0100, Corinna Vinschen wrote:
>>>>>On Nov 28 15:20, George M. Florendo wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I run a non cygwin apache process named httpd.exe.  Checking it with
>>>>>> "ps -W" shows a listing of the same process (with PID 4560 in this
>>>>>> case) twice.
>>>>>>
>>>>>> $ ps -W | grep httpd
>>>>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>>>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>>>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>>>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>>>>>      7508       0       0       7508  ?          0 15:09:50
>>>>>> C:\cygwin\home\georgeflorendo\wamp\bin\apache\Apache2.4.4\bin\httpd.exe
>>>>>>
>>>>>> Doing a "ps aux" shows it only once.
>>>>>>
>>>>>> $ ps aux
>>>>>>       PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
>>>>>>      1340    7856    1340       5720  pty5    1000 15:13:50 /usr/bin/ps
>>>>>>      1604    4008    1604       2292  pty0    1000 09:17:01
>>>>>> /usr/bin/bash
>>>>>>      4008       1    4008       4008  ?       1000 09:17:00
>>>>>> /usr/bin/mintty
>>>>>>      4560    1604    4560       5304  pty0    1000 09:55:21
>>>>>> /home/georgeflorendo/wamp/bin/apache/Apache2.4.4/bin/httpd
>>>>>>
>>>>>> <snipped>
>>>>>>
>>>>>> Is it correct that ps -W shows the same process twice?
>>>>>
>>>>>Not exactly but it could happen.  Can you try the latest snapshot Cygwin
>>>>>DLL from http://cygwin.com/snapshots/ and see if it fixes the problem?
>>>>
>>>>I don't see anything in the ChangeLog which would affect this and I'd
>>>>be concerned if there was.
>>>>
>>>>There are scenarios where two different windows pids can be associated
>>>>with the same Cygwin pid.  You should only see it when you do a "ps -W".
>>>>
>>>>So, AFAICT, the correct answer to the "Is it correct" is "Yes'.
>>>
>>> Oops.  Sorry.  Just noticed that the pids weren't "different".  There
>>> are still pathological situations where a pid can show up twice when
>>> doing a "ps -W".  I've seen the issue before but fixing it would involve
>>> a global process lock which would slow down Cygwin for the benefit of
>>> a more accurate "ps -W".
>>
>>Oh, I'm sorry too.  Didn't get to read your first sentence earlier.
>>I'd rather have a faster cygwin more than a more accurate "ps -W".
>>
>>Thanks for all your help.
>
>Thanks for understanding.  I will try to revisit this code sometime in
>the near future to see if I can do something about this case.  I had a
>glimmer of an idea about how to fix this in the thinking room recently.

This problem should be fixed in the latest snapshot.

cgf

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

- Raw text -


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