#32508 [Ver->Fbk]: ob_gzhandler w/ chunking can crash Apache 2
| From: | iliaa@php.net | Date: | Mon, 29 Aug 2005 23:15:02 +0000 |
| Subject: | #32508 [Ver->Fbk]: ob_gzhandler w/ chunking can crash Apache 2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84161@lists.php.net to get a copy of this message | ||
ID: 32508
Updated by: iliaa@php.net
Reported By: myronwu at gmail dot com
-Status: Verified
+Status: Feedback
Bug Type: Output Control
Operating System: *
PHP Version: 5CVS, 4CVS (2005-03-31)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-03-31 21:15:16] sniper@php.net
Also this was there:
PHP Fatal error: Allowed memory size of 725463920 bytes exhausted at
/usr/src/php/php5/main/output.c:229
------------------------------------------------------------------------
[2005-03-31 21:12:50] sniper@php.net
Nobody should try this at home. :)
Definately eats all memory and eventually crashes.
Here's what I got in error_log:
PHP Fatal error: Allowed memory size of 1603177144 bytes exhausted at
/usr/src/php/php5/ext/zlib/zlib.c:623
------------------------------------------------------------------------
[2005-03-31 19:27:56] myronwu at gmail dot com
Let me clarify some more, here's some more ob_start
calls that you can substitute into the reproduce code
given:
These work OK:
ob_start();
ob_start(null, 2048);
ob_start(null, 1024);
ob_start('ob_gzhandler');
These don't work:
ob_start('ob_gzhandler', 1024);
ob_start('ob_gzhandler', 2048);
ob_start('ob_gzhandler', 1);
------------------------------------------------------------------------
[2005-03-31 19:22:10] myronwu at gmail dot com
Pretty convinced this occurs whenever chunking occurs,
irrespective of what the chunk size is. Setting it to
something silly like 1 also has the same problem, for
example.
I also confirmed again the same behaviour on a Mac OS X
(10.3.8) machine, with its default php 4.3.10 setup over
Apache 1.3.33, zlib 1.1.4. Configure command is just
what's default on os x, but if you don't have an os x
machine handy, it's:
'/SourceCache/apache_mod_php/apache_mod_php-17.5/php/
configure' '--prefix=/usr' '--mandir=/usr/share/man' '--
infodir=/usr/share/info' '--with-apxs' '--with-ldap=/
usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-
dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-
exif' '--enable-ftp' '--enable-mbstring' '--enable-
mbregex' '--enable-dbx' '--enable-sockets' '--with-
iodbc=/usr' '--with-curl=/usr' '--with-config-file-
path=/etc' '--sysconfdir=/private/etc'
The php.ini is untouched from defaults.
------------------------------------------------------------------------
[2005-03-31 09:34:17] sniper@php.net
You can always make the chunk size smaller than 2048?
Or doesn't this problem occur then?
------------------------------------------------------------------------
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/32508
--
Edit this bug report at http://bugs.php.net/?id=32508&edit=1