delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/23/11:54:23

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 23 May 2012 17:53:27 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: procps and pgrep hang
Message-ID: <20120523155327.GJ9200@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <201205161650 DOT q4GGoiv3000900 AT localhost DOT localdomain> <201205170146 DOT q4H1k9AJ001926 AT localhost DOT localdomain> <20120517020441 DOT GA10314 AT ednor DOT casa DOT cgf DOT cx> <201205211640 DOT q4LGeucD023330 AT localhost DOT localdomain>
MIME-Version: 1.0
In-Reply-To: <201205211640.q4LGeucD023330@localhost.localdomain>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

On May 21 11:40, Tom Rodman wrote:
> On Wed 5/16/12 22:04 EDT Christopher Faylor wrote:
> > On Wed, May 16, 2012 at 08:46:09PM -0500, Tom Rodman wrote:
> > >  $ pgrep bash
> --snip
> > >   $ procps -o pid,args
> > >   PID COMMAND
> > >  4580 procps -o pid,args
> > >  --note: above command hangs, ended up killing it
> >
> > Try a snapshot.
> 
> Thanks.  It seems better, but still hangs, on this box (and 1 other).
> 
> Examples ran tonight w/20120517 snapshot:
> 
>   http://pastebin.com/xQbtChsJ

Looking into your strace I'm wondering if you really mean hanging in
the sense of "hanging indefinitely until killed", or if you mean it
hangs for about half a second.  Since that's what the strace shows.
For some of the information about a process under /proc, the requesting
process has to open a pipe and then, by using a special signal, informs
that process that it requests information which in turn is send over
the pipe back to the requester.  The timeout for each of the read 
operations on the pipe is restricted to 500ms to avoid indefinite
hangs.

Unfortunately I can't reproduce this effect, neither on XP nor on W7.

Hmm, puzzeling.  I'm wondering though, if this may be a result of using
message type pipes.  Nothing else comes to mind which has changed in
this piece of code lately.  For testing you could set the environment
variable CYGWIN to "pipe_byte" and try again.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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