From: jdw at nearlyfreespeech dot net Operating system: FreeBSD PHP version: 4.3.10 PHP Bug Type: Reproducible crash Bug description: FATAL: erealloc(): Unable to allocate ### bytes
Description: ------------ We have seen this error under the following conditions - FreeBSD 4-STABLE - Using Apache 1.3.33 - PHP 4.3.10 - multiple servers - servers have hundreds of megs of available RAM and gigs of free swap - httpd processes are well within resource limits - happens with random PHP scripts, even simple pages that don't use much memory - pages that generate the error may work if immediately reloaded (unchanged with respect to code and data), suggesting that this is not a per-request memory limit being exceeded - almost always happens *before* headers are sent - occurs on pages not using gzip or zlib or output compression or anything else that would defer content output - happens with alloc amounts from 7500 bytes to about 1meg, averaging between 100-300k. - happens in repetitive "clusters" Problem persists across "apachectl graceful" but "goes away" (for awhile at least) after "apachectl restart" so the Apache parent process may tie in somehow. Is there a way I can obtain more helpful debug information about this in a production environment? Thanks for any help with this! Reproduce code: --------------- n/a... virtually any PHP page appears susceptible, which is consistent with the observation that it occurs before headers are sent. Expected result: ---------------- PHP script should run. Actual result: -------------- Example from Apache error log: (all messages appear in immediate succession) FATAL: erealloc(): Unable to allocate 7500 bytes FATAL: erealloc(): Unable to allocate 7500 bytes FATAL: erealloc(): Unable to allocate 7500 bytes FATAL: erealloc(): Unable to allocate 7500 bytes FATAL: erealloc(): Unable to allocate 7500 bytes FATAL: erealloc(): Unable to allocate 7500 bytes -- Edit bug report at http://bugs.php.net/?id=31558&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31558&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31558&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31558&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31558&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31558&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31558&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31558&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31558&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31558&r=support Expected behavior: http://bugs.php.net/fix.php?id=31558&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31558&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31558&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31558&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31558&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31558&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31558&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31558&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31558&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31558&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31558&r=mysqlcfg