Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
On Tue, 11 Feb 2003, David Brown wrote: Hi Derick: Sorry about leaving php-dev off of the Cc - your reply didn't make it back to the php-dev list, though you did indeed respond. :) A couple of followup questions: 1. The crashes I'm able to catch with ?php function a(){a();}a(); ? stop GDB at zend_execute line 1489: zend_ptr_stack_n_push(EG(arg_types_stack), 2, EX(fbc), EX(object).ptr); However, zend_ptr_stack_n_push seems to handle growth of the stack, and there aren't pointer dereferences anywhere else. Am I looking at the wrong section of code? The wrong stack, maybe? :) zend_ptr_stack_n_push is for the stack of arguments to functions, this has nothing to do with the process' stack. 2. Is the PHP stack size configurable, either at run-time or at compile-time? (That is, assuming it's defined by PHP and not a resource limitation/setting in the OS). It's an OS limitation/problem, so you can't configure it in PHP. Derick -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Current HEAD segfaults with Horde/CHORA
wopr-mobile:/usr/local/apache2/bin # gdb httpd GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-linux-gnu... (gdb) r -DONE_PROCESS Starting program: /usr/local/apache2/bin/httpd -DONE_PROCESS [New Thread 1024 (LWP 1775)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 1775)] 0x4036ff99 in php_add_var_hash (var_hash=0xbfff4eb0, var=0x40dfcf44, var_old=0xbfe011b8) at /usr/src/php5/ext/standard/var.c:385 385 { (gdb) bt #0 0x4036ff99 in php_add_var_hash (var_hash=0xbfff4eb0, var=0x40dfcf44, var_old=0xbfe011b8) at /usr/src/php5/ext/standard/var.c:385 #1 0x4036f4cb in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x402c, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:503 #2 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #3 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #4 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #5 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #6 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #7 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #8 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #9 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #10 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #11 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #12 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #13 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #14 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #15 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #16 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #17 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #18 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #19 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #20 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #21 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, ---Type return to continue, or q return to quit--- -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
Hey, Looks like a recursive thing here so I wonder if it's really a bug in PHP, but perhaps an assumption in Horde that doesn't work with ZE2? Derick On Tue, 11 Feb 2003, Sebastian Bergmann wrote: wopr-mobile:/usr/local/apache2/bin # gdb httpd GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-linux-gnu... (gdb) r -DONE_PROCESS Starting program: /usr/local/apache2/bin/httpd -DONE_PROCESS [New Thread 1024 (LWP 1775)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 1775)] 0x4036ff99 in php_add_var_hash (var_hash=0xbfff4eb0, var=0x40dfcf44, var_old=0xbfe011b8) at /usr/src/php5/ext/standard/var.c:385 385 { (gdb) bt #0 0x4036ff99 in php_add_var_hash (var_hash=0xbfff4eb0, var=0x40dfcf44, var_old=0xbfe011b8) at /usr/src/php5/ext/standard/var.c:385 #1 0x4036f4cb in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x402c, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:503 #2 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #3 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #4 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #5 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #6 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #7 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #8 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #9 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #10 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #11 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #12 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #13 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #14 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #15 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #16 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #17 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #18 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #19 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x4088, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #20 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee6590, var_hash=0xbfff4eb0) at /usr/src/php5/ext/standard/var.c:612 #21 0x4036fa57 in php_var_serialize_intern (buf=0xbfff4ea0, struc=0x40ee5628, ---Type return to continue, or q return to quit--- -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
Zitat von Derick Rethans [EMAIL PROTECTED]: Looks like a recursive thing here so I wonder if it's really a bug in PHP, but perhaps an assumption in Horde that doesn't work with ZE2? Correct, Horde doesn't work with ZE2 out of the box. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
Derick Rethans wrote: so I wonder if it's really a bug in PHP, but perhaps an assumption in Horde that doesn't work with ZE2? Be that as it may, but it still shouldn't segfault, no? ;-) -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
On Tue, 11 Feb 2003, Sebastian Bergmann wrote: Derick Rethans wrote: so I wonder if it's really a bug in PHP, but perhaps an assumption in Horde that doesn't work with ZE2? Be that as it may, but it still shouldn't segfault, no? ;-) recursive function calls always segfault, just like: ?php function a() { a(); }; a(); ? so it's 'expected behavior'. Derick -- - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
On Tue, Feb 11, 2003 at 01:18:20PM +0100, Derick Rethans wrote: | On Tue, 11 Feb 2003, Sebastian Bergmann wrote: | | Derick Rethans wrote: |Be that as it may, but it still shouldn't segfault, no? ;-) | | recursive function calls always segfault, just like: | | ?php function a() { a(); }; a(); ? | | so it's 'expected behavior'. I assume the crash on infinite recursion is a stack-overflow type thing, but is there any reason that doesn't trigger the 'Allowed memory exhausted' and exit cleanly? Just curious... :) Thanks, - Dave [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Current HEAD segfaults with Horde/CHORA
On Tue, Feb 11, 2003 at 03:17:53PM -0500, Derick Rethans wrote: | David Brown wrote: | | I assume the crash on infinite recursion is a stack-overflow type thing, | but is there any reason that doesn't trigger the 'Allowed memory | exhausted' and exit cleanly? | | Just curious... :) | efficiency :) Adding checks for this will be 1) inaccurate, 2) slow and | thats enough not to do them :) Hi Derick: Sorry about leaving php-dev off of the Cc - your reply didn't make it back to the php-dev list, though you did indeed respond. :) A couple of followup questions: 1. The crashes I'm able to catch with ?php function a(){a();}a(); ? stop GDB at zend_execute line 1489: zend_ptr_stack_n_push(EG(arg_types_stack), 2, EX(fbc), EX(object).ptr); However, zend_ptr_stack_n_push seems to handle growth of the stack, and there aren't pointer dereferences anywhere else. Am I looking at the wrong section of code? The wrong stack, maybe? :) 2. Is the PHP stack size configurable, either at run-time or at compile-time? (That is, assuming it's defined by PHP and not a resource limitation/setting in the OS). Thanks in advance, - Dave [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php