|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-09-17 03:24 UTC] robert at profundis dot se
Description: ------------ Platform: Apache 2.0.47 / PHP 4.3.3 Windows XP Pro SP 1 Problem: It is similar to bug 24958 (http://bugs.php.net/bug.php?id=24958), reportedly fixed a while ago, but... In short: Sometimes a request cause Apache/PHP to crash, and restart itself. This first came to my attention when a visitor complained that very often two pages failed to load (the notorious IE "error" message). I noticed that these two pages where the largest PHP generated ones, 12 & 14k while others were about 5-6k. A sniff revealed that the TCP session was terminated immediately after the request to these pages. I then noticed in Apache's error log a frequent line: "[notice] Parent: child process exited with status 4294967295 -- Restarting" I now understood that this happens from time to time to others as well, but that the request was resubmitted so it simply produced a little delay while Apache was restarting. However, I cause Apache to crash perhaps 1 time in 20 requests to this page, while this visitor seem to do it 3 times in 4 requests. No clue what would make this difference. I am now usually able to reproduce this myself, by quickly reloading the page; the bigger the output, the more likely it is to cause the crash. A document like this: <?php for($i; $i < 15000; ++$i) echo '-'; ?> And requesting it two times in perhaps 2/10 second, will in almost all cases cause the crash. I have also verified this behaviour in the latest stable 4.3.4-dev build (php4-win32-STABLE-200309170430.zip). I cannot trace this crashing (in the log) before a few days ago when I upgraded from 4.3.1-dev to 4.3.3. Regards, Robert Andersson PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 20:00:01 2025 UTC |
<?php // OS: Win 2000 Professional // Apache 2.0.47 // PHP 4.3.3 // It worked on older versions of PHP/Apache, // on PHP 4.3.3/Apache 2.0.47 it causes a browser // crash $todisplay = ""; for($i = 0; $i < 300000; $i++) { $todisplay .= "Hello word<br>\n"; } echo $todisplay; ?>Another piece of info. While testing a script like: for($i = 0; $i < 15000; ++$i) $output .= '-'; echo $output; The script (and server) dies inside the echo() function. Still it occurs seldom, usually when the script hasn't been executed for a while, or when brutally reloading the page. Regards, Robert AnderssonBy changing three lines in sapi/apache2handler/sapi_apache2.c, back to how they were in rev. 1.1.2.17, it would not crash anymore on overlapping requests. Ie: // in 1.1.2.18 if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || r->connection->aborted) // in 1.1.2.17 if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS) I cannot really guess what implications that change has, but I assume the extra expression had a purpose. However, with this change I cannot generate a crash anymore.