php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20838 Script hangs (endless loop) after shutdown
Submitted: 2002-12-05 15:22 UTC Modified: 2002-12-12 15:55 UTC
From: rs6079 at nbtsc dot org Assigned:
Status: Closed Package: Output Control
PHP Version: 4.2.3 OS: Redhat Linux 7.1
Private report: No CVE-ID: None
 [2002-12-05 15:22 UTC] rs6079 at nbtsc dot org
I think that Bug #11346 applies to 4.2.3 as well, and #17672 as well.

I have a script using lots of output-buffer functions that seems to hang, eating 100% CPU, and occasionally truncates output.

The error log shows:

[Thu Dec  5 14:08:42 2002] [error] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in Unknown on line 0

for each process, and there are several HTTP processes running full-tilt, executing no system nor library calls. (strace and ltrace show nothing).

Configure Command './configure' '--sysconfdir=/etc/httpd' '--with-mysql=/src/mysql/mysql-404-php' '--with-snmp' '--with-gd' '--with-jpeg-dir=/src/jpeg/jpeg-6b' '--with-png-dir=/src/png/libpng-1.0.12' '--with-zlib-dir=/src/zlib/zlib-1.1.3' '--with-gdbm' '--with-db3' '--enable-ftp' '--with-imap' '--enable-sockets' '--with-kerberos' '--with-imap-ssl' '--with-openssl' '--cache-file=/dev/null' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xmlrpc'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-05 15:29 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-12-11 13:10 UTC] rs6079 at nbtsc dot org
Haven't had time to test against the latest, but I have a simple testcase:

<?php

function obfunc($s) {
   $s = str_replace('foo', 'bar', $s);
   return $s;
}

ob_start('obfunc');

print('this is really foo bar baz wat');

?>

-- basically, any modification to the incoming data in-place, instead of copying to a new variable causes a hang.
 [2002-12-12 15:55 UTC] moriyoshi@php.net
See PR #12227 (http://bugs.php.net/12227)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC