delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/10/21/18:10:31

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:from:mime-version:content-type
:content-transfer-encoding:message-id:date:to:subject; q=dns; s=
default; b=fiPpUHKKzoQ36mi8eyZ5KfqyVY4MzvOrqCUBsbkP5NG7h1E07aAeE
sNFsKyfEhtQOeD2CXvQERJj+JtYAc3VT9+niHQW5C0QWm/Qga+4qV7zOQFUsEcNY
LVv6V7vienO80TWicAQQHmIP5ZF7+M1p1z87r+MhrycUhhsSyFvK9o=
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:from:mime-version:content-type
:content-transfer-encoding:message-id:date:to:subject; s=
default; bh=8OgNodLyrAzWMXec+XXO8MaZxlg=; b=BvzBYIlMuSgkmSYlSGYt
lWEsUcxUBPjb755dpgh2A1AOJV7s8BlJibuf0YbgVnPuOfV7LebZlPaZeBzAV3Iq
zaTO+95i1/LVoWETM1o8y8r9mmXI+//T30vlm6DQz8pL9KKhLSzR8X+VUbRgjARv
70VUHwQ48E7E/JdaKEwClVM=
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=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_MANY_HDRS_LCASE autolearn=ham version=3.3.2
X-HELO: vms173007pub.verizon.net
From: <cygwin AT kosowsky DOT org>
MIME-version: 1.0
Message-id: <21093.42532.550364.992074@consult.pretender>
Date: Mon, 21 Oct 2013 18:09:40 -0400
To: cygwin AT cygwin DOT com
Subject: ps weirdness...
X-IsSubscribed: yes

When I type 'ps', I get as expected the following processes:

      PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
    18036    3188   18036      17792  pty0    1001 16:54:33 /usr/bin/ps
     3188    1688    3188       3212  pty0    1001 06:59:16 /usr/bin/bash
     1688       1    1688       1688  ?       1001 06:59:15 /usr/bin/mintty
     2392       1    2392       2392  ?       1001 11:00:03 /usr/bin/ssh-agent

When I type 'ps | grep bash', about 2/3 of the time, I get:
 	 3188    1688    3188       3212  pty0    1001 06:59:16 /usr/bin/bash

HOWEVER, about 1/3 of the time, I get:
  16832    3188   17792      16832  pty0    1001 16:56:44 /usr/bin/bash
  3188    1688    3188       3212  pty0    1001 06:59:16 /usr/bin/bash

And there is no bash process launched in the interim. Moreover, this second PID jumps around (both up and down) wildly rather than being constant or even relatively sequential.


In such cases, ps -W, similarly generates 2 bash processes:

     3188    1688    3188       3212  pty0    1001 06:59:16 /usr/bin/bash
    16460       0       0      16460  pty0    1001 17:44:29 C:\cygwin\bin\bash.exe

Even more interesting, when I type 'ps | grep ssh-agent', about 2/3 of the time, I get:
  2392       1    2392       2392  ?       1001 11:00:03 /usr/bin/ssh-agent

HOWEVER, about 1/3 of the time, I get:
  2392       1    2392       2392  ?       1001 11:00:03 /usr/bin/ssh-agent
  19176       0       0      19176  pty0    1001   Dec 31 /usr/bin/ssh-agent

This makes no sense, since I rebooted the machine less than 24 hours
ago (and the date is correct). Again the PID jumps around wildly
though here (as opposed to the bash case), the stime remains stuck on
Dec 31, whereas in the 'grep bash' case the stime seems to correspond
to the time the 'ps' command is run.

Interestingly, in the 'grep ssh-agent' case, 'ps -W | grep ssh-agent', never seems to generate a spurious 2nd process (despite dozens of trials).

Note that grepping for mintty, gives the same behavior as for 'ssh-agent' -- including the spurious Dec 31 date.

So, what is going on here with ps (inconsistently) generating "phanton" processes?

Note: I am running the latest 17.25 x86-64 under Win7 on an Intel i5.

Jeff

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