This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: procps and pgrep hang


On Wed 5/23/12 17:53 +0200 Corinna wrote:
> 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", 

That's what I mean - I have to kill it, it hangs forever.

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

On my laptop, only the pgrep bug shows up, here is the 'forever hang'
strace w/CYGWIN set to pipe_byte:

http://pastebin.com/t3ULQ5dC

Attachment: cygcheck-out.txt
Description: Text document

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]