php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29153 PHP exits after running with for exactly 7 days.
Submitted: 2004-07-14 16:21 UTC Modified: 2004-07-22 01:00 UTC
Votes:4
Avg. Score:4.0 ± 1.7
Reproduced:3 of 4 (75.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: chris at starglade dot org Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.0.0RC3 OS: Linux (2.4)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chris at starglade dot org
New email:
PHP Version: OS:

 

 [2004-07-14 16:21 UTC] chris at starglade dot org
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-14 21:07 UTC] php at fungusmovies dot com
PHP version 5.0.0 has been out only 1 day.  It is impossible for you to reproduce this issue (7 day crash) since it was released.  Please fix your Version entry in the bug report to the ACTUAL VERSION of php you are using.
 [2004-07-14 21:09 UTC] chris at starglade dot org
Updated the version.
 [2004-07-14 21:29 UTC] wez@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


We need a lot more info to do anything about this.
For instance, try running your script from strace and see what system level events are occuring.

 [2004-07-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 06:01:32 2024 UTC