ID: 40479
Comment by: tulio dot silva at mpt dot gov dot br
Reported By: rrossi at maggioli dot it
Status: No Feedback
Bug Type: Reproducible crash
Operating System: Suse Linux 9.0
PHP Version: 5.2.1
New Comment:
Hi all,
in answer to sriram above, here we go:
-bash-3.00$ /usr/local/apache2/bin/httpd -V
Server version: Apache/2.2.13 (Unix)
Server built: Oct 5 2009 10:20:45
Server's Module Magic Number: 20051115:23
Server loaded: APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
So it is prefork. If ZTS is enabled with --enable-maintainer-zts, then
it´s off. Also, from phpinfo(),
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
and it seems USE_ZEND_ALLOC=0 does nothing for me. I´m on CentOS 4.6 on
multi-core AMD64, with nearly 1GB RAM and a very busy server. There are
plenty of custom systems in this machine, so I can´t tell what is
causing it, but it started after we began using Elxis 2009.0 in
production state (about 15 hits/second).
My configure lines includes a lot of other parameters, like oci and
MySQLi, but if of any use, I´ll compare the relevant items with rrossi´s
(bug opener) config.nice:
'./configure' \
'--with-apxs' \ # idem
'--with-mysql=/usr/local/mysql' \ #'--with-mysql=/usr' (CentOS rpm)
'--with-bz2' \ # no
'--with-mcrypt' \ #no
'--with-pgsql' \ #no
'--without-pear' \ # --with-pear
Apache also includes a lot of modules. The most relevant, I guess, are
rewrite, proxy (http & ajp), ssl, and cache. If any other info needed,
feel free (and please) contact me. It´s been a serious problem down
here.
Previous Comments:
------------------------------------------------------------------------
[2009-09-18 08:24:48] tdikarim at hotmail dot com
Hi ,
I have tested with the version 5.3 of PHP with no success.
I have this error:
Fatal error: Out of memory (allocated 564920320) (tried to allocate
39063398 bytes) in I:\srvDevPHP\PHP_PEAR\File\PDF.php on line 3191
zend_mm_heap corrupted
The line 3191 is << $this->_buffer .= $s . "\n"; >> of the _out
function.
How can i use the USE_ZEND_ALLOC parameter. I don't find any file for
do that.
Somme info:
EasyPhp 2.0.0.0
php 5.3.0
Apache 2.2.13
Thanks
Karim
------------------------------------------------------------------------
[2009-09-18 07:39:11] tdikarim at hotmail dot com
I bring some additional information.
The error occurred with the version of PHP 5.2.1 and version 2.2.13 of
Apache.
This is done by creating a large PDF to do more than 35,000 pages using
File_pdf (last release) PEAR.
I just installed version 5.3 and I'm going with this test without using
USE_ZEND_ALLOC.
For your information, I find pale apachectl.bat file in my apache
directory.
I install apache and php via EasyPhp v2.0.0.0
I advise you to install something else?
I will keep you informed of my test with version 5.3. It will take a
few hours
Again thank you
Karim
------------------------------------------------------------------------
[2009-09-17 18:13:48] sriram dot natarajan at gmail dot com
to answer tdikarim at hotmail dot com's question, you can probably add
set USE_ZEND_ALLOC=0 within your apachectl.bat under your apache
installation directory /bin. not, for this to work, you should start
apache from command line and not as a 'service'. also, may I suggest
that you probably try to run with php 5.2.10 or php 5.3 (from
windows.php.net) and see if you are able to reproduce this issue
before you consider using the work around (using USE_ZEND_ALLOC).
please note that using USE_ZEND_ALLOC=0 will have some performance
penalty.
now, looking closely into this bug, as Rasmus mentioned earler, this
bug has become a catch-all for memory corruption.
looking at the some of the stack traces and with so many people have
reported this , this is probably a valid bug and we would love to fix
this issue provided some one can provide us a script (even if it is
complicated) that any one of us can reproduce. this would quickly help
us to get to a solution.
some of the folks have mentioned that they use redhat / fedora but
have failed to mention whether they are using php with apache's pre-
fork (which is fortunately the default )mpm or worker mpm .
(note: if you don't know what is worker mpm, you are most likely using
the default pre-fork mpm !).
why is this important ? - this is because if you are running your
apache in threaded mode but if php is not compiled with 'thread-
safety' option, then one can run into lot of weird race condition. but
with pre-fork apache, you very rarely run into a race condition.
so, please when you report this crash, please provide us the php
version and is it compiled with ZTS (zend thread safety) enabled and
is your web server multi-threaded. for example, you can get apache's
server information by running 'httpd -V' from your linux box.
------------------------------------------------------------------------
[2009-09-17 15:32:34] tdikarim at hotmail dot com
Hi all,
Someone have the solution for os windows XP
thanks
------------------------------------------------------------------------
[2009-08-10 20:53:45] asilentpenguin at yahoo dot com
On Fedora / centOS
edit:
/usr/local/apache2/bin/apachectl
and add:
export USE_ZEND_ALLOC=0
and stop & start apache.
P.S.: i think you are underestimating the number of occurences for this
bug and, as so, the frustration amongst PHP developers
------------------------------------------------------------------------
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/40479
--
Edit this bug report at http://bugs.php.net/?id=40479&edit=1