From:             chris at starglade dot org
Operating system: Linux (2.4)
PHP version:      5.0.0
PHP Bug Type:     Reproducible crash
Bug description:  PHP exits after running with for exactly 7 days.

Description:
------------
I am running a PHP script as a daemon, and it stops running after exactly
7 days. The script forks then enters a while loop, which should always
return true if the socket is open. It is not a problem with the remote
server closing the socket as other clients can connect for long periods of
time. Data is constantly being sent down the socket (every 90 seconds).

Reproduce code:
---------------
$pid = pcntl_fork();

while(false !== ($text = fgets($sock, 2048)))
{
handle_text($text);
}



Expected result:
----------------
I expect the script to fork and run until the socket is closed by the
server, the script is terminated by a signal, or the socket pings out. 

Actual result:
--------------
The script stops running after exactly 7 days as if it had closed the
connection, and returns to the command line. There are no error messages
given.

-- 
Edit bug report at http://bugs.php.net/?id=29153&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29153&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29153&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29153&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29153&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29153&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29153&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29153&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29153&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29153&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29153&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29153&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29153&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29153&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29153&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29153&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29153&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29153&r=float

Reply via email to