public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: procps and pgrep hang
Date: Wed, 23 May 2012 15:57:00 -0000	[thread overview]
Message-ID: <20120523155327.GJ9200@calimero.vinschen.de> (raw)
In-Reply-To: <201205211640.q4LGeucD023330@localhost.localdomain>

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

  reply	other threads:[~2012-05-23 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 16:51 procps and pgrep Tom Rodman
2012-05-17  1:47 ` procps and pgrep hang Tom Rodman
2012-05-17  2:04   ` Christopher Faylor
2012-05-21 16:42     ` Tom Rodman
2012-05-23 15:57       ` Corinna Vinschen [this message]
2012-05-30 14:13         ` Tom Rodman
2012-05-30 15:58           ` Corinna Vinschen
2012-06-06  1:32             ` Tom Rodman
2012-06-06  8:10               ` Corinna Vinschen
2012-06-06 12:10                 ` Tom Rodman
2012-06-06 14:04                   ` Christopher Faylor
2012-06-07  0:54                     ` Tom Rodman
2012-06-07 13:29                       ` Tom Rodman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120523155327.GJ9200@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).