From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27391 invoked by alias); 28 Dec 2013 06:21:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27378 invoked by uid 89); 28 Dec 2013 06:21:56 -0000 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 Received: from mho-03-ewr.mailhop.org (HELO mho-01-ewr.mailhop.org) (204.13.248.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 28 Dec 2013 06:21:55 +0000 Received: from pool-98-110-186-157.bstnma.fios.verizon.net ([98.110.186.157] helo=cgf.cx) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1VwnHV-000Nc2-B8 for cygwin@cygwin.com; Sat, 28 Dec 2013 06:21:53 +0000 Received: from ednor (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with SMTP id BF58A600D6 for ; Sat, 28 Dec 2013 01:21:51 -0500 (EST) Received: by ednor (sSMTP sendmail emulation); Sat, 28 Dec 2013 01:21:51 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18FDxvxEYkyqyavxhITKezp Date: Sat, 28 Dec 2013 06:21:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: ps shows same process more than once Message-ID: <20131228062151.GA4604@ednor.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20131128130813.GH2449@calimero.vinschen.de> <20131128155504.GC5063@ednor.casa.cgf.cx> <20131128160243.GB5803@ednor.casa.cgf.cx> <20131202152455.GC5464@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131202152455.GC5464@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-12/txt/msg00390.txt.bz2 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 >>>>>> >>>>>> >>>>>> >>>>>> 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