Ask a Question related to PHP Bugs, Design and Development.
-
php at edwardk dot info #1
#40770 [NEW]: Apache child exits when PHP memory limit reached
From: php at edwardk dot info
Operating system: Windows 2003
PHP version: 5.2.1
PHP Bug Type: Reproducible crash
Bug description: Apache child exits when PHP memory limit reached
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a TCP
connection reset and no page loaded.
--
Edit bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40770&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40770&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40770&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40770&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40770&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40770&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40770&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40770&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40770&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40770&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40770&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40770&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40770&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40770&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40770&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40770&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40770&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40770&r=mysqlcfg[/url]
php at edwardk dot info Guest
-
"lipping path limit reached for TIFF Preview" error message
Has anyone encounter the error, "Clipping path limit reached for TIFF Preview," when saving and Illustrator CD file as EPS? I've created a fairly... -
Reached Fireworks Limit??
Please refer to your post message. I make a few suggestion. Try NOT to duplicate posts for same topic and try to be more specific next time around!... -
The network BIOS command limit has been reached??
When i add a virtual directory, a warning come up in event log. "The Server was unable to add the virtual root '/cgi-bin' for the directory... -
The server has reached the maximum recovery limit for the application during...
Hi NG, sometimes I bekome a "Server Application Error" on my w2k Server when call a ASP page The server has reached the maximum recovery limit... -
function exits/returns - does it free up memory?
Randell D. wrote: If you're passing around large amounts of data you may want to read up on using references, which are functionaly analygous to... -
iliaa@php.net #2
#40770 [Opn->Fbk]: Apache child exits when PHP memory limit reached
ID: 40770
Updated by: [email]iliaa@php.net[/email]
Reported By: php at edwardk dot info
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows 2003
PHP Version: 5.2.1
New Comment:
Are you running debug build of PHP by any chance?
Previous Comments:
------------------------------------------------------------------------
[2007-03-10 03:24:58] php at edwardk dot info
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a
TCP connection reset and no page loaded.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
iliaa@php.net Guest
-
php at edwardk dot info #3
#40770 [Fbk->Opn]: Apache child exits when PHP memory limit reached
ID: 40770
User updated by: php at edwardk dot info
Reported By: php at edwardk dot info
-Status: Feedback
+Status: Open
Bug Type: Reproducible crash
Operating System: Windows 2003
PHP Version: 5.2.1
New Comment:
I don't believe so. It should be the official PHP 5.2.1 windows binary
release.
phpinfo() reports:
PHP Version 5.2.1
Build Date Feb 7 2007 23:10:31
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Previous Comments:
------------------------------------------------------------------------
[2007-03-11 14:52:57] [email]iliaa@php.net[/email]
Are you running debug build of PHP by any chance?
------------------------------------------------------------------------
[2007-03-10 03:24:58] php at edwardk dot info
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a
TCP connection reset and no page loaded.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
php at edwardk dot info Guest
-
edink@php.net #4
#40770 [Opn->Ver]: Apache child exits when PHP memory limit reached
ID: 40770
Updated by: [email]edink@php.net[/email]
Reported By: php at edwardk dot info
-Status: Open
+Status: Verified
Bug Type: Reproducible crash
Operating System: Windows 2003
PHP Version: 5.2.1
New Comment:
I can reproduce the problem. When running this example in CLI PHP
aborts with:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
line 12
zend_mm_heap corrupted
Previous Comments:
------------------------------------------------------------------------
[2007-03-11 21:35:14] php at edwardk dot info
I don't believe so. It should be the official PHP 5.2.1 windows binary
release.
phpinfo() reports:
PHP Version 5.2.1
Build Date Feb 7 2007 23:10:31
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
------------------------------------------------------------------------
[2007-03-11 14:52:57] [email]iliaa@php.net[/email]
Are you running debug build of PHP by any chance?
------------------------------------------------------------------------
[2007-03-10 03:24:58] php at edwardk dot info
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a
TCP connection reset and no page loaded.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
edink@php.net Guest
-
edink@php.net #5
#40770 [Ver->Asn]: Apache child exits when PHP memory limit reached
ID: 40770
Updated by: [email]edink@php.net[/email]
Reported By: php at edwardk dot info
-Status: Verified
+Status: Assigned
Bug Type: Reproducible crash
Operating System: Windows 2003
PHP Version: 5.2.1
-Assigned To:
+Assigned To: dmitry
New Comment:
Also happens in the latest 5.2 with both win32 and malloc
ZEND_MM_MEM_TYPE.
USE_ZEND_ALLOC=0 makes the problem disappear, but then no memory limit
is enforced.
Previous Comments:
------------------------------------------------------------------------
[2007-03-12 03:27:43] [email]edink@php.net[/email]
I can reproduce the problem. When running this example in CLI PHP
aborts with:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
line 12
zend_mm_heap corrupted
------------------------------------------------------------------------
[2007-03-11 21:35:14] php at edwardk dot info
I don't believe so. It should be the official PHP 5.2.1 windows binary
release.
phpinfo() reports:
PHP Version 5.2.1
Build Date Feb 7 2007 23:10:31
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
------------------------------------------------------------------------
[2007-03-11 14:52:57] [email]iliaa@php.net[/email]
Are you running debug build of PHP by any chance?
------------------------------------------------------------------------
[2007-03-10 03:24:58] php at edwardk dot info
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a
TCP connection reset and no page loaded.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
edink@php.net Guest
-
dmitry@php.net #6
#40770 [Asn->Csd]: Apache child exits when PHP memory limit reached
ID: 40770
Updated by: [email]dmitry@php.net[/email]
Reported By: php at edwardk dot info
-Status: Assigned
+Status: Closed
Bug Type: Reproducible crash
Operating System: Windows 2003
PHP Version: 5.2.1
Assigned To: dmitry
New Comment:
Fixed in CVS HEAD and PHP_5_2
Previous Comments:
------------------------------------------------------------------------
[2007-03-12 03:36:29] [email]edink@php.net[/email]
Also happens in the latest 5.2 with both win32 and malloc
ZEND_MM_MEM_TYPE.
USE_ZEND_ALLOC=0 makes the problem disappear, but then no memory limit
is enforced.
------------------------------------------------------------------------
[2007-03-12 03:27:43] [email]edink@php.net[/email]
I can reproduce the problem. When running this example in CLI PHP
aborts with:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 133169153 bytes) in C:\php4build\PHP_5_2\Release_TS\t.php on
line 12
zend_mm_heap corrupted
------------------------------------------------------------------------
[2007-03-11 21:35:14] php at edwardk dot info
I don't believe so. It should be the official PHP 5.2.1 windows binary
release.
phpinfo() reports:
PHP Version 5.2.1
Build Date Feb 7 2007 23:10:31
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
------------------------------------------------------------------------
[2007-03-11 14:52:57] [email]iliaa@php.net[/email]
Are you running debug build of PHP by any chance?
------------------------------------------------------------------------
[2007-03-10 03:24:58] php at edwardk dot info
Description:
------------
Running Apache 1.3.37 with PHP 5.2.1 on Windows 2003 Standard 32bit
The following PHP code was called from a browser with the size=149 (to
simulate 149MB use) and the PHP memory limit is 160M.
Reproduce code:
---------------
<?
ini_set('display_errors',true);
if (isset($_GET['size']) && $_GET['size'] < 200) {
$mb = intval($_GET['size']);
}
else {
$mb=5;
}
$var = '';
echo 'Memory limit: '.ini_get('memory_limit').'<br>';
for ($i=0; $i<=$mb; $i++) {
$var.= str_repeat('a',1*1024*1024);
echo memory_get_usage().'<br>';
}
echo 'String length: '. strlen($var);
?>
Expected result:
----------------
PHP should, if it did run out of memory, exit with something along the
lines of
Fatal error: Allowed memory size of xxx bytes exhausted (tried to
allocate yyy bytes)
otherwise, the script should execute without crashing.
Actual result:
--------------
Apache child exits, browser waiting for the result of the page get a
TCP connection reset and no page loaded.
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=40770&edit=1[/url]
dmitry@php.net Guest



Reply With Quote

