#25570 [Opn]: Some requests cause Apache to crash/restart
| From: | robert at profundis dot se | Date: | Thu, 18 Sep 2003 09:08:28 +0000 |
| Subject: | #25570 [Opn]: Some requests cause Apache to crash/restart | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47750@lists.php.net to get a copy of this message | ||
ID: 25570
User updated by: robert@profundis.se
Reported By: robert at profundis dot se
Status: Open
Bug Type: Apache2 related
Operating System: Windows XP Professional SP1
PHP Version: 4.3.4-dev (20030917)
New Comment:
I did some debugging on my own, and concluded that if two requests
overlap, it will crash. I did some primitive logging in
apache2handler/sapi_apache2.c/php_handler(), and noticed that the last
function to be called was php_handle_aborted_connection(), then Apache
crashed and restarted. This was in cases where the second request
entered php_handler() before the first had left it.
While looking through changes of this source file in the CVS, I noticed
diff 1.1.2.17-18
(http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?login=2&r1=1.1.2.17&r2=1.1.2.18&ty=h)
which was commit just after 4.3.3RC2 (which doesn't crash). Could it
possibly be related? I do currently not have the ability to revert the
change and recompile, but I will do so later.
Previous Comments:
------------------------------------------------------------------------
[2003-09-17 19:19:30] robert at profundis dot se
> Do you have output buffering enabled?
No. My tests has been with fresh/default installations of both Apache
and PHP.
I did now test to set output_buffering = On, in php.ini. phpinfo()
reports it to set to '1' (rather than 'On'). The problem remains, and
perhaps somewhat more frequent with this setting.
Any pointers as how to debug PHP under Windows are welcome, I haven't
been able to find any information about this.
------------------------------------------------------------------------
[2003-09-17 18:57:40] iliaa@php.net
Do you have output buffering enabled?
------------------------------------------------------------------------
[2003-09-17 06:43:58] 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 05:48:38] robert at profundis dot se
After some investigation it seems as this bug was introduced in PHP
4.3.3RC3. I have tested the following versions:
4.3.2 -- OK
4.3.3RC1 -- ?
4.3.3RC2 -- OK
4.3.3RC3 -- Crash
4.3.3RC4 -- Crash
4.3.3 -- Crash
4.3.4-dev -- Crash
With the versions designated 'OK', I was unable to reproduce the bug.
The '?', I didn't test.
I performed the test by constantly reloading (holding down F5) on a
<?php phpinfo(); ?> document.
------------------------------------------------------------------------
[2003-09-17 04:39:10] 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;
?>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/25570
--
Edit this bug report at http://bugs.php.net/?id=25570&edit=1