[32299] in Perl-Users-Digest
Perl-Users Digest, Issue: 3566 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 13 09:09:18 2011
Date: Tue, 13 Dec 2011 06:09:02 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 13 Dec 2011 Volume: 11 Number: 3566
Today's topics:
Re: Command invoked by backticks hangs, silently: how t <hjp-usenet2@hjp.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 12 Dec 2011 22:29:41 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Command invoked by backticks hangs, silently: how to diagnose?
Message-Id: <slrnjecsi5.u3f.hjp-usenet2@hrunkner.hjp.at>
On 2011-12-04 23:59, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth Henry Law <news@lawshouse.org>:
>> Nearly all the time it works flawlessly, but every so often the gzip
>> command hangs and never returns. It's not consuming CPU, and it's not
>> just slow: I've left it for an hour and more, monitoring the size of the
>> .gz file and it doesn't change.
[...]
> A simpler but cruder way to see what's going on is to look at the
> syscall interface. If gzip isn't using any CPU it must be stuck in a
> syscall: which one? You can find that from the WCHAN or MWCHAN field in
> ps. If you change the perl program to run all the gzip commands under
> strace (I believe strace has an option to send the trace output to a
> file?) you will be able to see what exactly gzip was trying to do when
> it failed.
You can also use strace after gzip is hung. Just run
strace -p $pid_of_gzip
to see in which system call it hangs. It is also quite useful to invoke
lsof -p $pid_of_gzip
to find out which file descriptor refers to which file.
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3566
***************************************