From: pts at fazekas dot hu Operating system: Linux 2.6 PHP version: 5.1.4 PHP Bug Type: Output Control Bug description: PHP FastCGI dies with segmentation fault wgen the HTTP clients aborts the conn
Description: ------------ The FastCGI process dies (SIGSEGV) when the HTTP client aborts the connection, but PHP wants to echo() more. The ignore_user_abort() state doesn't matter, PHP dies anyway. See the code below. To reproduce it, run wget http://.../code_below.php, and abort wget with Ctrl-<C>. See the Apache error log for the error message. I think this is a serious bug that prevents normal use of PHP FastCGI. Reproduce code: --------------- <?php # PHP 5.1.4 and PHP 4.3.10 are both affected with Apache 1.3.33 + FastCGI # vvv from Apache error log: # [Sat Aug 12 15:50:40 2006] [warn] FastCGI: (dynamic) server "/foo/php-cgi" (pid 3279) terminated due to uncaught signal '11' (Segmentation fault) # [Sat Aug 12 15:50:40 2006] [warn] FastCGI: (dynamic) server "/foo/php-cgi" restarted (pid 3284) function foo() { } register_shutdown_function('foo'); ignore_user_abort(TRUE); #ignore_user_abort(FALSE); # Dat: this doesn't help either # phpinfo(); exit; $A="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; $A.=$A; $A.=$A; $A.=$A; $A.=$A; $A.=$A; $A.=$A; $str=".$A"; for ($I=1; $I<1000; $I++) { echo $str; #sleep(1); # this doesn't prevent the bug, only delays it } Expected result: ---------------- The PHP FastCGI process should continue running and wait for more requests. Actual result: -------------- The PHP FastCGI process dies with SIGSEGV (Segmentation fault, signal 11). -- Edit bug report at http://bugs.php.net/?id=38435&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38435&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38435&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38435&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38435&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38435&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38435&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38435&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38435&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38435&r=support Expected behavior: http://bugs.php.net/fix.php?id=38435&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38435&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38435&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38435&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38435&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38435&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38435&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38435&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38435&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38435&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38435&r=mysqlcfg
