ID: 13806 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Summary: zlib compression is broken? Status: Open Old Bug Type: Zlib Related Bug Type: Reproducible crash Old Operating System: Linux 2.4.4/glibc 2.2.2 Operating System: Linux 2.4.14-pre3/glibc 2.2.2 Old PHP Version: 4.0CVS-2001-10-24 PHP Version: 4.1.0 RC CVS-2001-10-24 New Comment:
via-rihine chipset NIC dvriver seems to be fixed in 2.4.13, finanlly :) I could upgrade kernel from 2.4.4 to 2.4.14-pre3. It seems many *.c files are not modified for new asm/*.h files, yet. (It was the same, when I tried 2.4.13) Therefore, I couldn't use the same config as 2.4.4. I was using 2.4.4 kernel that comes with my distribution. Most of kernel drivers/options are compiled in or compiled as module. I'm using kernel optimized for my test PC now. Kernel may crash with other options/modules... Anyway, PHP behaves much better with newer kernel. New behavior is as follows. * PHP outputs the top part of the test script "<?php phpinfo(); ?>" correctly. * PHP sends a lot of garbages with the test script. * Kernel seems to stop freezing. + PHP stopped complaining about many memory leaks at shutdown. Problem: * When memory limit is enabled, PHP do not terminate script execution even if it is already exhausted memory. (I get multiple error message for a single execution as attached apache error log) * PHP can't send proper phpinfo() output. * PHP segfaults with my scripts. I changed bug type form Zlib Related to Reproducible crash. If your PHP does not segfault easily, please let me know. I'll send back trace. == apache error log start == /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) /home/yohgaki/public_html/test/phpinfo.php(1) : Fatal error - Allowed memory size of 8388608 bytes exhausted at zlib.c:995 (tried to allocate 2915587 bytes) == end == Previous Comments: ------------------------------------------------------------------------ [2001-10-27 16:24:56] [EMAIL PROTECTED] Just an update. Better procedure to reproduce this bug. I can reproduce this bug on RedHat 7.1(kernel 2.4.7) and Kondara 2.0(Kernel 2.4.4) I think this bug is *critical* and better to be fixed/workarounded before 4.1.0 release.... (Or disable zlib.output_compression?) Caution: This can crash your linux kernel and may crash filesystem. 1) Get 4.1.0RC CVS source 2) Copy php.ini-recommend to php.ini and enable zlib.output_compression zlib.output_compression=On 3) configure/build/install PHP 4.1.0RC './configure' \ '--with-apxs' \ '--disable-short-tags' \ '--without-mysql' \ '--without-pear' \ '--with-zlib' \ '--enable-debug' 4) Create test php script containing <?php phpinfo(); ?> 5) restart httpd, diplay the test script 6) Stop httpd and check apache error log see if memory leak is reported or not. ------------------------------------------------------------------------ [2001-10-27 16:09:07] [EMAIL PROTECTED] This bug may be related to following bugs. http://bugs.php.net/bug.php?id=12270 http://bugs.php.net/bug.php?id=13698 ------------------------------------------------------------------------ [2001-10-24 08:46:19] [EMAIL PROTECTED] This is not exactly what I've reported, but if following problem is fixed, this bug may be fixed. Fixing this may fix bug #13698, also. (CGI version segfaults at shutdown) php.ini: php.ini-recommened. Only change I've made is enable ZLIB compression. If zlib compression is off, it seems working. Script: <?php phpinfo(); ?> Configure: './configure' \ '--with-apxs' \ '--disable-short-tags' \ '--without-mysql' \ '--without-pear' \ '--with-zlib' \ '--enable-debug' PHP: 4.1.0RC CVS (today) Env: Linux 2.4.4/glibc 2.2.2/zlib 1.1.3 Apache 1.3.20/modssl 2.8.4 Apache error log: Unknown(0) : Fatal error - Maximum execution time of 30 seconds exceeded output.c(307) : Freeing 0x418D502C (9105409 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zlib.c(995) : Freeing 0x4147A02C (4565991 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 10 times output.c(289) : Freeing 0x081ADD4C (6144 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_stack.c(45) : Freeing 0x081AC4BC (40 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_stack.c(27) : Freeing 0x081AC38C (256 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 7 times zend_hash.c(176) : Freeing 0x081AC2F4 (32 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 9 times zend_hash.c(260) : Freeing 0x081AC244 (44 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 40 times main.c(1159) : Freeing 0x081AC194 (44 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_API.c(561) : Actual location (location was relayed) main.c(1158) : Freeing 0x081AC154 (12 bytes), script=/home/yohgaki/public_html/test/phpinfo.php main.c(1141) : Freeing 0x081ABC04 (44 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_API.c(561) : Actual location (location was relayed) main.c(1140) : Freeing 0x081ABBC4 (12 bytes), script=/home/yohgaki/public_html/test/phpinfo.php php_variables.c(170) : Freeing 0x081ABB24 (12 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 27 times php_variables.c(47) : Freeing 0x081ABAD4 (27 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 27 times zend_hash.c(438) : Freeing 0x081AB10C (128 bytes), script=/home/yohgaki/public_html/test/phpinfo.php main.c(1022) : Freeing 0x081AA11C (44 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_API.c(561) : Actual location (location was relayed) main.c(1021) : Freeing 0x081AA0DC (12 bytes), script=/home/yohgaki/public_html/test/phpinfo.php php_variables.c(229) : Freeing 0x081AA04C (12 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 1 time php_variables.c(230) : Freeing 0x081A9F94 (44 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_API.c(561) : Actual location (location was relayed) Last leak repeated 1 time output.c(325) : Freeing 0x081A86FC (6145 bytes), script=/home/yohgaki/public_html/test/phpinfo.php zend_ptr_stack.c(29) : Freeing 0x081A857C (256 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 2 times zend_ini.c(193) : Freeing 0x081A7744 (31 bytes), script=/home/yohgaki/public_html/test/phpinfo.php Last leak repeated 2 times [Wed Oct 24 19:24:43 2001] [warn] child process 4029 still did not exit, sending a SIGTERM [Wed Oct 24 19:24:47 2001] [error] child process 4029 still did not exit, sending a SIGKILL [Wed Oct 24 19:24:47 2001] [notice] caught SIGTERM, shutting down ------------------------------------------------------------------------ [2001-10-24 03:20:38] [EMAIL PROTECTED] I can not reproduce this. Add the relevant php.ini settings here and try also to reduce some of the configure options. --Jani ------------------------------------------------------------------------ [2001-10-24 01:35:34] [EMAIL PROTECTED] Thanks for your interest, Jani. The script is <?php phpinfo(); ?> I set zlib compression in php.ini. configure line is as follows. If you cannot reproduece this problem with your usual configure line, I'll try to reduce number of options. Let me know if you want me do that. './configure' \ '--with-apxs' \ '--disable-short-tags' \ '--without-mysql' \ '--with-bz2' \ '--with-curl' \ '--with-ftp' \ '--with-iconv' \ '--with-mhash' \ '--with-mcrypt' \ '--with-openssl' \ '--with-pgsql' \ '--with-regex=system' \ '--with-zlib' \ '--with-gd' \ '--enable-gd-native-ttf' \ '--with-freetype-dir=/usr/local' \ '--with-jpeg-dir=/usr' \ '--with-png-dir=/usr' \ '--with-xpm-dir=/usr/X11R6' \ '--enable-bcmath' \ '--enable-ftp' \ '--enable-shmop' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--enable-sockets' \ '--enable-mbstring' \ '--enable-mbstr-enc-trans' \ '--enable-memory-limit' \ '--enable-wddx' \ '--enable-debug' ------------------------------------------------------------------------ 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/?id=13806 Edit this bug report at http://bugs.php.net/?id=13806&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]