Some requests cause Apache to crash/restart
| Bug #25570 | Some requests cause Apache to crash/restart | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2003-09-17 03:24 UTC | Modified: | 2004-10-26 14:30 UTC |
|
||||||||||
| From: | robert at profundis dot se | Assigned: | jorton (profile) | |||||||||||
| Status: | Closed | Package: | Apache2 related | |||||||||||
| PHP Version: | 5CVS-2004-04-22 (dev) | OS: | WinXP SP1 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2003-09-17 04:39 UTC] lys_007 at yahoo dot it
<?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; ?>[2003-09-17 05:48 UTC] robert at profundis dot se
[2003-09-17 06:43 UTC] robert at profundis dot se
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 Andersson[2003-09-17 18:57 UTC] iliaa@php.net
[2003-09-17 19:19 UTC] robert at profundis dot se
[2003-09-18 05:08 UTC] robert at profundis dot se
[2003-09-18 08:54 UTC] robert at profundis dot se
By 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.[2003-09-18 20:43 UTC] iliaa@php.net
[2004-10-14 16:52 UTC] christopher_theunissen at hotmail dot com
[2004-10-14 17:09 UTC] robert at profundis dot se
[2004-10-14 17:20 UTC] robert at profundis dot se
[2004-10-14 18:38 UTC] jorton@php.net
[2004-10-14 20:34 UTC] robert at profundis dot se
[2004-10-15 14:40 UTC] jonathan at schwarzelan dot de
[2004-10-15 14:42 UTC] jonathan at schwarzelan dot de
[2004-10-17 18:55 UTC] mwhitlock at whitsoftdev dot com
[2004-10-20 10:47 UTC] jorton@php.net
[2004-10-21 11:00 UTC] robert at profundis dot se
[2004-10-21 11:31 UTC] jorton@php.net
[2004-10-21 16:35 UTC] joel at preacherboy dot net
[2004-10-21 20:53 UTC] aaron at gwmicro dot com
[2004-10-21 21:44 UTC] jorton@php.net
[2004-10-22 17:02 UTC] sintemaa at hotmail dot com
[2004-10-25 20:06 UTC] FaithPast at gmail dot com
[2004-10-26 13:58 UTC] suco at felisuco dot com