Req #14233 [Opn->WFx]: Add a timeout to __get() to prevennt indefinite block

From: Date: Sat, 05 Jun 2010 20:05:46 +0000
Subject: Req #14233 [Opn->WFx]: Add a timeout to __get() to prevennt indefinite block
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3882@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=14233&edit=1 ID: 14233 Updated by: hostmaster@shupp.org Reported By: phatduckk at yahoo dot com Summary: Add a timeout to __get() to prevennt indefinite block -Status: Open +Status: Wont fix Type: Feature/Change Request Package: Services_Digg Operating System: OS X 10.5 Package Version: 0.4.4 PHP Version: 5.2.6 -Assigned To: +Assigned To: shupp Roadmap Versions: New Comment: -Status: Open +Status: Wont fix -Assigned To: +Assigned To: shupp This package is being deprecated, and superseded by Services_Digg2. Previous Comments: ------------------------------------------------------------------------ [2008-07-26 09:42:18] doconnor Hey Arin, Has this happened to you much in the real world? I ask because I'm inclined at first glance to say ... 'well, just let it hang' until the max execution time of the script is reached - ie, don't re-invent what's at a network stack level in PHP. That being said, if it's happened repeatably... ------------------------------------------------------------------------ [2008-06-25 03:11:43] arin Description: ------------ There's a possibility for this class to hang in __get. If the socket actually gets created in the initialize method there's no guarantee that it won't "hang" during the socket_read call(s) in __get. socket_read doesn't have a timeout... so you could sit around waiting forever. Test script: --------------- Pass __construct an endpoint that you control. In the endpoint's executing script just enter something like this: <?php sleep (500); echo "hello"; ?> When the Services_Digg_Request's __get method is executed you'll see that the socket_read will wait until the endpoint's script is done sleeping for 500 seconds. Expected result: ---------------- The __get method should timeout after some specified # of seconds. Actual result: -------------- __get just sits around waiting for the endpoint to respond. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=14233&edit=1

« previous php.pear.bugs (#3882) next »