Bug #15941 [Opn->Bgs]: exec() never returns when pinging firewalled host
| From: | craig at constantine dot name | Date: | Wed, 01 Apr 2009 16:13:03 +0000 |
| Subject: | Bug #15941 [Opn->Bgs]: exec() never returns when pinging firewalled host | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-292@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=15941&edit=1
ID: 15941
Updated by: craig@constantine.name
Reported By: babineau at gmail dot com
Summary: exec() never returns when pinging firewalled host
-Status: Open
+Status: Bogus
Type: Bug
Package: Net_Ping
Operating System: Linux (Gentoo)
PHP Version: 5.2.8
Roadmap Versions:
New Comment:
-Status: Open
+Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is
not the
appropriate forum for asking support questions.
Thank you for your interest in PEAR.
Having seen no evidence beyond a single instance report from one user.
I
believe this is/was a problem with that instance's system.
Previous Comments:
------------------------------------------------------------------------
[2009-03-02 14:15:52] cconstantine
Maybe there's something specific with the system Steve is using?? I
vaguely recall being able to tell the shell to trap and ignore signals.
Maybe
something unusual is configured with the web server's environment?
Steve, do you know how to use the PCNTL extension in PHP? Can you try a
quick PHP script to set a SIGALRM and see if PHP can schedule and
receive
signals?
------------------------------------------------------------------------
[2009-03-01 22:32:59] doconnor
Steve, the not-receiving-from-kernel sounds a bit out of the hands of
Net_Ping - I don't suppose you can find an existing bug report somewhere
upstream and link these two together?
------------------------------------------------------------------------
[2009-02-25 23:34:47] babineau
Here's a little more debug info. It looks like ping running from
exec() never receives a SIGARLM from the kernel. I wonder if there is a
workaround that can be built into Net_Ping?
http://shifteightgeneration.com/tmp/strace.from.commandline.gz
http://shifteightgeneration.com/tmp/strace.from.php.gz
------------------------------------------------------------------------
[2009-02-25 15:37:38] babineau
Sure. Here's the State flag info (-j didn't work, but BSD ps does it
anyway)
$ ps ax |grep ping
26810 ? S 0:00 sh -c cd '/prj/htdocs/net' ; /bin/ping -c 4
-t 60 microsoft.com
26811 ? S 0:00 /bin/ping -c 4 -t 60 microsoft.com
checkHost() hangs as well.
# $ping->checkHost("microsoft.com");
$ ps ax |grep ping
27012 ? S 0:00 sh -c cd '/prj/htdocs/net' ; /bin/ping -q
-w 10 -c 10 -s 32 microsoft.com
27013 ? S 0:00 /bin/ping -q -w 10 -c 10 -s 32
microsoft.com
And the code:
$ping = Net_Ping::factory();
if(!PEAR::isError($ping))
{
$ping->setArgs(array(
'count' => 4,
'ttl' => 60,
));
//$response = $ping->ping('microsoft.com');
$response = $ping->checkHost('microsoft.com');
}
else
{
$errors[] = $ping->getMessage();
}
------------------------------------------------------------------------
[2009-02-25 14:44:56] cconstantine
Request for additional info:
...can you redo your 'ps' info with the 'j' flag. I'm curious about the
Ping
process' "STAT" flags.
...does the checkHost() method work [not hang]? The checkHost() method
attempts to set ping's "deadline" argument based on its idea of how
your
system's ping works.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=15941
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=15941&edit=1