#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava dot com 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: I'm surprised this isn't being talked about more. I see it occasionally, and I am using Zend Framework. Why don't other people using ZF see it? Previous Comments: [2009-03-12 07:52:07] laurynas dot butkus at gmail dot com Soletan, thanks for advice but it seems that Suhosin is not 100% solution. We are running Ubuntu Hardy (8.04 LTS) server, 32bit. Using standard PHP 5.2.4 Apache2 module package which already includes Suhosin patch. We still experience this bug... [2009-03-06 14:22:25] soletan at toxa dot de Ran into the same problem and read most of the posts in this report. Well, I don't expect PHP developers to ever find this bug. Don't you get annoyed by template-driven posts asking for information they can't use? HERE COMES MY ADVICE: Reading hints on expecting a race condition lead me to installing suhosin, which is an extension to PHP increasing its integrity and security. Guess what, it helped me out of this trouble. This is no ad, so I won't provide a link here. Just google the name ... Maybe PHP developers shouldn't use templates requesting tons of backtracks providing obviously useless information, but invest some time in revising observers for the internal memory management of PHP as this is obviously causing the trouble. [2009-03-03 11:22:34] hakan dot koseoglu at gmail dot com The same problem appears from a allegedly successful compilation op PHP 5.2.9 on RHEL5 64 bit using -m32 CFLAG so that the binaries are 32 bit. The compilation appears to complete successfully: Apache 2.0.59 compiled w/o any problems with the following configure and it works fine. ./configure --prefix=/apps/apache2 --with-expat=builtin PHP is configured with the following options: ./configure --with-apxs2=/apps/apache2/bin/apxs --build=i386-redhat-linux --with-pic --with-gd --with-zlib --with-config-file-path=/apps/apache2/conf --with-libdir=/lib/ --enable-debug And after the successful run, make test was run with the following errors: [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-tests.php' --- /apps/source/php-5.2.9/main/streams/plain_wrapper.c(421) : Block 0x08c71270 status: Beginning: OK (allocated on /apps/source/php-5.2.9/main/streams/plain_wrapper.c:144, 108 bytes) Start: OK End: Overflown (magic=0x instead of 0xD03365E6) At least 4 bytes overflown --- [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-test-info.php' --- /apps/source/php-5.2.9/main/streams/plain_wrapper.c(421) : Block 0x097cdd80 status: Beginning: OK (allocated on /apps/source/php-5.2.9/main/streams/plain_wrapper.c:160, 108 bytes) Start: OK End: Overflown (magic=0x instead of 0x512474AC) At least 4 bytes overflown --- [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-test-info.php' --- /apps/source/php-5.2.9/main/streams/plain_wrapper.c(421) : Block 0x097cdb78 status: Beginning: OK (allocated on /apps/source/php-5.2.9/main/streams/plain_wrapper.c:160, 108 bytes) Start: OK End: Overflown (magic=0x instead of 0x512474AC) At least 4 bytes overflown --- [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-test-info.php' --- /apps/source/php-5.2.9/main/streams/plain_wrapper.c(421) : Block 0x097cd9ac status: Beginning: OK (allocated on /apps/source/php-5.2.9/main/streams/plain_wrapper.c:160, 108 bytes) Start: OK End: Overflown (magic=0x instead of 0x512474AC) At least 4 bytes overflown --- [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-test-info.php' /apps/source/php-5.2.9/main/streams/plain_wrapper.c(160) : Freeing 0x097CD9AC (108 bytes), script=/apps/source/php-5.2.9/run-test-info .php /apps/source/php-5.2.9/ext/standard/php_fopen_wrapper.c(312) : Actual location (location was relayed) Last leak repeated 2 times === Total 3 memory leaks detected === [Tue Mar 3 11:16:22 2009] Script: '/apps/source/php-5.2.9/run-tests.php' --- /apps/source/php-5.2.9/main/streams/pla
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava dot com 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: The more comments the more this sounds like a race condition. Looks like it would be almost impossible to bug hunt. Have you tried the 6 version? Maybe this has been fixed? John Previous Comments: [2008-11-19 16:46:12] rpeters at icomproductions dot ca We are experiencing multiple zend_mm_heap corrupted errors daily on our production server during peak load. During off-peak periods, all scripts work as expected. PHP 5.2.2 RedHat Linux 2.6.9-78.0.5.ELsmp Why is this set to No Feedback when there's a debug dump provided? [2008-10-20 08:07:39] moo at moo dot com hello? [2008-10-13 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-10-06 15:52:07] john dot glazebrook at guava dot co dot uk Re: My last post: I disabled as much stuff as I could before running the bad page. John [2008-10-06 15:50:29] john dot glazebrook at guava dot co dot uk #0 0x064a8ba6 in zend_if_strlen (ht=1, return_value=0xb7944458, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/admin/downloads/php-5.2.6/Zend/zend_builtin_functions.c:286 #1 0x064b8821 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0af40) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:200 #2 0x064b7fcd in execute (op_array=0xb78f4044) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #3 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b3e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #4 0x064b7fcd in execute (op_array=0xb78ffa88) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #5 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b530) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #6 0x064b7fcd in execute (op_array=0xb78efb98) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #7 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b760) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #8 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #9 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0b8e0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #10 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #11 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bb10) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #12 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #13 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bc90) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #14 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #15 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0bec0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #16 0x064b7fcd in execute (op_array=0xb792ef14) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #17 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c040) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #18 0x064b7fcd in execute (op_array=0xb792f264) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #19 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c4f0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #20 0x064b7fcd in execute (op_array=0xb78e7810) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #21 0x064b8219 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff0c680) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:234 #22 0x064b7fcd in execute (op_array=0xb790b140) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #23 0x064ce857 in ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER (execute_data=0xbff0c7d0) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:7759 #24 0x064b7fcd in execute (op_array=0xb7b5bb40) at /home/admin/downloads/php-5.2.6/Zend/zend_vm_execute.h:92 #2
#46332 [NEW]: Crash!
From: john dot glazebrook at guava dot com Operating system: RedHat and CentOS PHP version: 5.2.6 PHP Bug Type: Reproducible crash Bug description: Crash! Description: http://bugs.php.net/bug.php?id=40479 I wrote a lot about the bug here but I don't own it so I can't re-open it :-( -- Edit bug report at http://bugs.php.net/?id=46332&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46332&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46332&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46332&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46332&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46332&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46332&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46332&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46332&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46332&r=support Expected behavior:http://bugs.php.net/fix.php?id=46332&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46332&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46332&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46332&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46332&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46332&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46332&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46332&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46332&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46332&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46332&r=mysqlcfg
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava dot com 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: OK, I don't know if this is useful but I'll keep posting stuff as I find it here :-) PHP 5.2.5 MysqlI 5.0.45 If I alter the database the seg fault goes away and I get normal exceptions or errors or data results (depending if the SQL is working) then if I change the DB back to what I need seg faults occur again. So I think it must be an error in MysqlI or MySQL... ? John Previous Comments: [2008-07-16 16:38:39] john dot glazebrook at guava dot com Sorry, I forgot to say my server runs Red Hat Linux. Um, I'm not sure if this is helpful, but I found the error when moving from PEAR:DB over to ZF DB objects. So I only changed DB code. OK, some psedudoish code: class x { function db() { $rpt = new Report(); $row = $rpt->createRow(); $row->text = 'xyz'; $row->save(); echo 'OK 2'; } } $x = new x(); echo 'OK'; $x->db(); echo 'OK 3'; And I see: OK OK 2 seg fault Also changing the function to: class x { function db() { $rpt = new Report(); $row = $rpt->createRow(); $row->text = 'xyz'; $row->save(); echo 'OK 2'; $row = null; echo 'M'; } } this time it seg faults at $row = null; Hope this is of some help. It really sucks :-( John ---------------- [2008-07-16 16:31:08] john dot glazebrook at guava dot com I found this 'zend_mm_heap corrupted' in my apache log files. I am using 5.2.5 with almost everything enabled. Mysqli and I am using Zend Frame work. As far as I can tell my scripts case this (and a seg fault) when they are looping through a Zend_DB_Table_Rowset object adding rows to a table. When the $row **goes out of scope** the script seg faults. So I get this error when the function (well method) returns a value. I stripped all code from the function apart from echos and the $row->save() and the seg faults still happen. Ho hum... john [2008-06-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-06-15 11:29:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-06-15 09:43:22] akdeiva at qxsystems dot com Hi, i too got the same issue and this is how the code works, I am having some scripts to parse the HTML data and wherein i am having part of the code as , $replaced_key = strtolower(str_replace("%", "percent", $key)); $replaced_key = str_replace(".", "", $replaced_key); $key = str_replace(" ", "_", $replaced_key); When i have the above code with the same variable name, $key = strtolower(str_ireplace("%", "percent", $key)); $key = str_ireplace(".", "", $key); $key = str_ireplace(" ", "_", $key); I get the "zend_mm_heap corrupted" error wherein when changed the code to the above way, it works fine. 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
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava dot com 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: Sorry, I forgot to say my server runs Red Hat Linux. Um, I'm not sure if this is helpful, but I found the error when moving from PEAR:DB over to ZF DB objects. So I only changed DB code. OK, some psedudoish code: class x { function db() { $rpt = new Report(); $row = $rpt->createRow(); $row->text = 'xyz'; $row->save(); echo 'OK 2'; } } $x = new x(); echo 'OK'; $x->db(); echo 'OK 3'; And I see: OK OK 2 seg fault Also changing the function to: class x { function db() { $rpt = new Report(); $row = $rpt->createRow(); $row->text = 'xyz'; $row->save(); echo 'OK 2'; $row = null; echo 'M'; } } this time it seg faults at $row = null; Hope this is of some help. It really sucks :-( John Previous Comments: -------------------- [2008-07-16 16:31:08] john dot glazebrook at guava dot com I found this 'zend_mm_heap corrupted' in my apache log files. I am using 5.2.5 with almost everything enabled. Mysqli and I am using Zend Frame work. As far as I can tell my scripts case this (and a seg fault) when they are looping through a Zend_DB_Table_Rowset object adding rows to a table. When the $row **goes out of scope** the script seg faults. So I get this error when the function (well method) returns a value. I stripped all code from the function apart from echos and the $row->save() and the seg faults still happen. Ho hum... john [2008-06-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-06-15 11:29:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-06-15 09:43:22] akdeiva at qxsystems dot com Hi, i too got the same issue and this is how the code works, I am having some scripts to parse the HTML data and wherein i am having part of the code as , $replaced_key = strtolower(str_replace("%", "percent", $key)); $replaced_key = str_replace(".", "", $replaced_key); $key = str_replace(" ", "_", $replaced_key); When i have the above code with the same variable name, $key = strtolower(str_ireplace("%", "percent", $key)); $key = str_ireplace(".", "", $key); $key = str_ireplace(" ", "_", $key); I get the "zend_mm_heap corrupted" error wherein when changed the code to the above way, it works fine. [2008-05-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". 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
#40479 [Com]: zend_mm_heap corrupted
ID: 40479 Comment by: john dot glazebrook at guava dot com 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: I found this 'zend_mm_heap corrupted' in my apache log files. I am using 5.2.5 with almost everything enabled. Mysqli and I am using Zend Frame work. As far as I can tell my scripts case this (and a seg fault) when they are looping through a Zend_DB_Table_Rowset object adding rows to a table. When the $row **goes out of scope** the script seg faults. So I get this error when the function (well method) returns a value. I stripped all code from the function apart from echos and the $row->save() and the seg faults still happen. Ho hum... john Previous Comments: [2008-06-23 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-06-15 11:29:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-06-15 09:43:22] akdeiva at qxsystems dot com Hi, i too got the same issue and this is how the code works, I am having some scripts to parse the HTML data and wherein i am having part of the code as , $replaced_key = strtolower(str_replace("%", "percent", $key)); $replaced_key = str_replace(".", "", $replaced_key); $key = str_replace(" ", "_", $replaced_key); When i have the above code with the same variable name, $key = strtolower(str_ireplace("%", "percent", $key)); $key = str_ireplace(".", "", $key); $key = str_ireplace(" ", "_", $key); I get the "zend_mm_heap corrupted" error wherein when changed the code to the above way, it works fine. [2008-05-20 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2008-05-12 19:16:48] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. 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