#34978 [Fbk-Opn]: php out of memory or segmentation fault while installing sugarcrm 3.5.1a
ID: 34978 User updated by: cdc at ccicon dot com Reported By: cdc at ccicon dot com -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: linux i386 -PHP Version: 5CVS-2005-10-31 (snap) +PHP Version: 5.0.5 Assigned To: dmitry New Comment: I have tried to locate the exact code triggering the bug but have so far been unsuccessfull. So, I have been unable to come up with a simple test case. The bug is easily reproducible by trying to load and run the Sugar code available here http://www.sugarforge.org/frs/download.php/466/SugarSuite-3.5.1a.zip I can tell you that the bug still existed in the following CVS snapshot. php5-200510251830 If you believe that it might have been fixed in a newer snapshot, I would be happy to test it. Just point me at it. TTYL CDC Previous Comments: [2005-11-01 13:40:27] [EMAIL PROTECTED] Can anybody provide a test case? May be this bug already fixed in HEAD and PHP_5_1. [2005-11-01 11:41:27] [EMAIL PROTECTED] This is really critical issue. Obviously that stupid compatibility mode misbehaves still? [2005-10-27 19:10:23] cdc at ccicon dot com The zend.ze_compatiblity_mode is set to 1 in the index.php file and several other files using the following test for php version number if (substr(phpversion(), 0, 1) == 5) { ini_set(zend.ze1_compatibility_mode, 1); } Disabling this option (ie zend.ze_compatiblity_mode=0) under php 5.0.5 and under the last cvs snapshot that was recommended seems to solve this race condition. I have not tested the code fully to see that this hasn't introduced other problems. However, it does remove the out of memory and segfault problems. Were there changes made in php 5.0.5 and later that make this option obsolete. Or, will disabling this condition lead to other compatility issues? TTYL CDC [2005-10-27 18:53:57] cdc at ccicon dot com I assume you meant ze1_compatiblity_mode and compact was just a typo? Yes compatibility_mode is set. It is explicitly set numerous places within the Sugar Code. I can try changing it, but I'm assuming it was set within the code for a reason. I'll try changing it and see what happens. [2005-10-27 17:27:49] [EMAIL PROTECTED] When getting the error is ze1 compact mode enabled or disabled and does changing the setting alter the behaviour in any way? 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/34978 -- Edit this bug report at http://bugs.php.net/?id=34978edit=1
#34978 [Fbk-Opn]: php out of memory or segmentation fault while installing sugarcrm 3.5.1a
ID: 34978 User updated by: cdc at ccicon dot com Reported By: cdc at ccicon dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux i386 PHP Version: 5.0.5 New Comment: From the application logs, it is apparent that many hundreds, even thousands of lines of code are executing successfully after the post before this out of memory condition occurs. I have not yet been able to trace the exact code location as I cannot step the code in my Zend Studios environment using php 5.1. It appears the the code may be dying on either and array_merge or in a mysql call. I will roll back to php 5.0.5, which I can step in the Zend debugger, and attempt to isolate the exact section of code which is generating these errors. If I can locate it, I can perhaps write a small test script to reproduce the error under the CVS snapshot release. This will likely take me a day or two to complete. Thanks for your continued attention to this problem. TTYL CDC Previous Comments: [2005-10-26 17:10:04] [EMAIL PROTECTED] Can you create some sort of a simple test case? For example if you pass all get/post/cookie data from the failing request to ?php phpinfo(); ? script do you get the same error? [2005-10-26 16:43:04] cdc at ccicon dot com I realize that a general out of memory condition is not a bug. However, this appears to be some kind of race condition that is consumming memory. This problem in new since version 5.0.4. The same code runs fine under 5.0.4 but generates this race condition in 5.0.5 and newer. As you can see from the error message below, I already have the memlimit set at 64M. I started at 16. It makes no difference where I have it set, the race condition consumes all available memory and fails with an out of memory error. I will attempt to isolate the code in sugar which is resulting in the race condition, however, the fact remains that this code runs fine under 5.0.4 and does not run under new versions. [2005-10-26 16:35:53] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Out of memory is not a bug in PHP, it simply means the memory limit needs to be increased. Try setting it to 20 megs and see if that solves the problem. [2005-10-26 06:38:36] cdc at ccicon dot com I have tested this latest snap shot. Like the previous 5.1RC4 snap shot, the installer phase completes successfully, however, first login results in an out of memory error as follows: ( Fatal error: Allowed memory size of 67108864 bytes exhausted at /usr/local/apache_src/php5-200510260230/Zend/zend_hash.c:242 (tried to allocate 58 bytes) in /home/www/dev/htdocs/sugarsuite-3.5.1a/data/SugarBean.php on line 1087) This occurs with register_long_arrays=on. Unlike the previous snapshot, which segfaulted when register_long_arrays=off, this one generates the same out of memory error regardless of the register_long_arrays setting. As this drop is not segfaulting I'm not sure how to provide a backtrace of this problem. Please advise. TTYL CDC [2005-10-26 03:55:51] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip 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/34978 -- Edit this bug report at http://bugs.php.net/?id=34978edit=1
#34978 [Fbk-Opn]: php out of memory or segmentation fault while installing sugarcrm 3.5.1a
ID: 34978 User updated by: cdc at ccicon dot com Reported By: cdc at ccicon dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux i386 PHP Version: 5.0.5 New Comment: When using the suggested snapshot, the installer manages to complete successfully. However, first login generates the following error when register_long_arrays is set ON ( Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 47 bytes) in /home/www/dev/htdocs/sugarsuite-3.5.1a/data/SugarBean.php on line 1087 When register_long_arrays is set off, php generates a segfault, which is apparently a documented problem with Sugar and php5. This segfault condition also exists in php 5.0.4, however, turning register_log_arrays=On solves this problem in 5.0.4. Previous Comments: [2005-10-25 19:14:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-10-25 19:08:58] cdc at ccicon dot com Description: When installing sugarcrm vs 3.5.1a (or earlier) php 5.0.5 generates a out of memory error, or, if 36Meg memory, will generate a segfault. This problem is reproducible with both apache 2.0.54, 2.0.55, sugarcrm 3.5.1, 3.5.0, 3.0. I also tested the php 5.0.6-dev snapshot from 200510251443 and it exhibited the same problem. Php 5.0.4 does not exhibit this problem. -- Edit this bug report at http://bugs.php.net/?id=34978edit=1
#34978 [Fbk-Opn]: php out of memory or segmentation fault while installing sugarcrm 3.5.1a
ID: 34978 User updated by: cdc at ccicon dot com Reported By: cdc at ccicon dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux i386 PHP Version: 5.0.5 New Comment: The following is a backtrace of the segfault caused by the installer running under php 5.0.5. I was unable to obtain a core dump for some reason, so this is the back trace from gdb. I have only attached the first 100 lines or so. Let me know if you need the full dump, and I will post it at a url somewhere it can be retrieved. TTYL CDC (gdb) (gdb) run -DSSL -X Starting program: /usr/local/apache2/bin/httpd -DSSL -X [New Thread 1077556160 (LWP 18347)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1077556160 (LWP 18347)] 0x420744c9 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x420744c9 in _int_malloc () from /lib/tls/libc.so.6 #1 0x4207378d in malloc () from /lib/tls/libc.so.6 #2 0x407287f9 in _emalloc (size=1108554272) at /usr/local/apache_src/php-5.0.5/Zend/zend_alloc.c:183 #3 0x4073de51 in _zend_hash_add_or_update (ht=0xb7386bc, arKey=0x8cd3adc db, nKeyLength=3, pData=0x8cd3ac8, nDataSize=4, pDest=0xbf8000c8, flag=1) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:218 #4 0x4073ee0d in zend_hash_copy (target=0xb7386bc, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:760 #5 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27479, handlers = 0x407c8a20}, old_object=0x8a8b5bc, handle=20) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #6 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #7 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #8 0x4073ee1c in zend_hash_copy (target=0xb737bbc, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #9 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27478, handlers = 0x407c8a20}, old_object=0x8eb42cc, handle=17) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #10 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #11 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #12 0x4073ee1c in zend_hash_copy (target=0xb737ad4, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #13 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27477, handlers = 0x407c8a20}, old_object=0x8a8b5bc, handle=20) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #14 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #15 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #16 0x4073ee1c in zend_hash_copy (target=0xb736fb4, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #17 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27476, handlers = 0x407c8a20}, old_object=0x8eb42cc, handle=17) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #18 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #19 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #20 0x4073ee1c in zend_hash_copy (target=0xb736ecc, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #21 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27475, handlers = 0x407c8a20}, old_object=0x8a8b5bc, handle=20) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #22 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #23 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #24 0x4073ee1c in zend_hash_copy (target=0xb7363ac, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #25 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27474, handlers = 0x407c8a20}, old_object=0x8eb42cc, handle=17) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #26 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #27 0x407483f5 in
#34978 [Fbk-Opn]: php out of memory or segmentation fault while installing sugarcrm 3.5.1a
ID: 34978 User updated by: cdc at ccicon dot com Reported By: cdc at ccicon dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: linux i386 PHP Version: 5.0.5 New Comment: I have tested this latest snap shot. Like the previous 5.1RC4 snap shot, the installer phase completes successfully, however, first login results in an out of memory error as follows: ( Fatal error: Allowed memory size of 67108864 bytes exhausted at /usr/local/apache_src/php5-200510260230/Zend/zend_hash.c:242 (tried to allocate 58 bytes) in /home/www/dev/htdocs/sugarsuite-3.5.1a/data/SugarBean.php on line 1087) This occurs with register_long_arrays=on. Unlike the previous snapshot, which segfaulted when register_long_arrays=off, this one generates the same out of memory error regardless of the register_long_arrays setting. As this drop is not segfaulting I'm not sure how to provide a backtrace of this problem. Please advise. TTYL CDC Previous Comments: [2005-10-26 03:55:51] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-10-26 00:05:04] cdc at ccicon dot com The following is a backtrace of the segfault caused by the installer running under php 5.0.5. I was unable to obtain a core dump for some reason, so this is the back trace from gdb. I have only attached the first 100 lines or so. Let me know if you need the full dump, and I will post it at a url somewhere it can be retrieved. TTYL CDC (gdb) (gdb) run -DSSL -X Starting program: /usr/local/apache2/bin/httpd -DSSL -X [New Thread 1077556160 (LWP 18347)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1077556160 (LWP 18347)] 0x420744c9 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x420744c9 in _int_malloc () from /lib/tls/libc.so.6 #1 0x4207378d in malloc () from /lib/tls/libc.so.6 #2 0x407287f9 in _emalloc (size=1108554272) at /usr/local/apache_src/php-5.0.5/Zend/zend_alloc.c:183 #3 0x4073de51 in _zend_hash_add_or_update (ht=0xb7386bc, arKey=0x8cd3adc db, nKeyLength=3, pData=0x8cd3ac8, nDataSize=4, pDest=0xbf8000c8, flag=1) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:218 #4 0x4073ee0d in zend_hash_copy (target=0xb7386bc, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:760 #5 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27479, handlers = 0x407c8a20}, old_object=0x8a8b5bc, handle=20) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #6 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #7 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #8 0x4073ee1c in zend_hash_copy (target=0xb737bbc, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #9 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27478, handlers = 0x407c8a20}, old_object=0x8eb42cc, handle=17) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #10 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #11 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #12 0x4073ee1c in zend_hash_copy (target=0xb737ad4, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #13 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27477, handlers = 0x407c8a20}, old_object=0x8a8b5bc, handle=20) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #14 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #15 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #16 0x4073ee1c in zend_hash_copy (target=0xb736fb4, source=0x38, pCopyConstructor=0x40748370 zval_add_ref_or_clone, tmp=0x0, size=4) at /usr/local/apache_src/php-5.0.5/Zend/zend_hash.c:765 #17 0x40748441 in zend_objects_clone_members (new_object=0x38, new_obj_val={handle = 27476, handlers = 0x407c8a20}, old_object=0x8eb42cc, handle=17) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:137 #18 0x407485ad in zend_objects_clone_obj (zobject=0x38) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:186 #19 0x407483f5 in zval_add_ref_or_clone (p=0x10) at /usr/local/apache_src/php-5.0.5/Zend/zend_objects.c:127 #20 0x4073ee1c in