Interesting. Well, ulimit replies 'unlimited' so I guess that's not the problem. I do have an older version of PCRE, though, so we'll see if upgrading from 4.3 to 4.5 and then rebuilding the module helps.
Stu -----Original Message----- From: Martin Luethi [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 5:34 AM To: [EMAIL PROTECTED] Cc: E. Stuart Hicks Subject: RE: [PHP] Segmentation fault problem the function who is causing the seg fault is preg_match_all maybe this helps (http://bugs.php.net/bug.php?id=20698): [28 Nov 2002 6:26am EST] thingol at mail dot ru If the text for preg_match_all is bigger than some value, many regexp constructions causes php to terminate. This code crashes php (on win32 only): <? $thi = str_repeat("aaaaaaa a aa aa aa\n", 1000); preg_match_all("/(.|\n)*/",$thi,$vars); ?> [28 Nov 2002 7:06am EST] [EMAIL PROTECTED] Not really a PHP bug; bug is in the PCRE library itself and is because you are asking it to capture a very large number of individual character matches. Increasing your stack size might help (ulimit). g. martin luethi Thu, 22 Jan 2004 14:20:56 -0500 "E. Stuart Hicks" <[EMAIL PROTECTED]>: > Please disregard my last post - I'd switched Apache back from the debug > module for the night and forgotten to turn it back on. > > I've attached the full trace but here's the main part: > > (gdb) print (char > *)(executor_globals.function_state_ptr->function)->common.function_name > $4 = 0xffffffff7bb69250 "preg_match_all" > (gdb) frame 8 > #8 0xffffffff7baeabe4 in execute (op_array=0x1003a07d0) at > /root/build/php-4.3.4/Zend/zend_execute.c:1660 > 1660 > zend_execute(EG(active_op_array) TSRMLS_CC); > (gdb) frame 9 > #9 0xffffffff7baeabe4 in execute (op_array=0x1003af0c0) at > /root/build/php-4.3.4/Zend/zend_execute.c:1660 > 1660 > zend_execute(EG(active_op_array) TSRMLS_CC); > (gdb) frame 10 > #10 0xffffffff7baeabe4 in execute (op_array=0x10038f230) at > /root/build/php-4.3.4/Zend/zend_execute.c:1660 > 1660 > zend_execute(EG(active_op_array) TSRMLS_CC); > (gdb) frame 11 > #11 0xffffffff7bacde24 in zend_execute_scripts (type=8, retval=0x0, > file_count=3) > at /root/build/php-4.3.4/Zend/zend.c:884 > 884 zend_execute(EG(active_op_array) TSRMLS_CC); > (gdb) frame 12 > #12 0xffffffff7ba6dd08 in php_execute_script > (primary_file=0xffffffff7fffef20) > at /root/build/php-4.3.4/main/main.c:1729 > 1729 retval = (zend_execute_scripts(ZEND_REQUIRE > TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == > SUCCESS); > > > Stu > > > -----Original Message----- > From: E. Stuart Hicks [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 22, 2004 2:07 PM > To: 'Martin Luethi'; [EMAIL PROTECTED] > Subject: RE: [PHP] Segmentation fault problem > > I still can't access anything on bugs.php.net so I'm not sure exactly what > you need. I grabbed all of the execute() frames, though, and ran that print > function and got this: > > (gdb) print (char > *)(executor_globals.function_state_ptr->function)->common.function_name > Attempt to extract a component of a value that is not a structure. > (gdb) frame 6 > #6 0xffffffff7babef00 in execute () from /home/httpd/modules/libphp4.so > (gdb) frame 7 > #7 0xffffffff7babf244 in execute () from /home/httpd/modules/libphp4.so > (gdb) frame 8 > #8 0xffffffff7babf244 in execute () from /home/httpd/modules/libphp4.so > (gdb) frame 9 > #9 0xffffffff7babf244 in execute () from /home/httpd/modules/libphp4.so > (gdb) frame 10 > #10 0xffffffff7babf244 in execute () from /home/httpd/modules/libphp4.so > > Does this help? > > Stu > > > -----Original Message----- > From: Martin Luethi [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 22, 2004 2:24 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Segmentation fault problem > > each php function is executed by the internal function "execute()" > please include the details about this frames also (configure php with > --enable-debug first) e.g.: > (gdb) frame 6 > output... > (gdb) print (char *)(executor_globals.function_state_ptr->function)- >> common.function_name > output... > > with this information you can see which php-command causing the seg fault > -> http://bugs.php.net/bugs-generating-backtrace.php > > g. martin luethi > >> Program received signal SIGSEGV, Segmentation fault. >> 0xffffffff7bacedcc in zend_parse_arg_impl (arg=0x1003853c0, >> va=0xffffffff7ffe3a88, spec=0xffffffff7ffe3a58) >> at /root/build/php-4.3.4/Zend/zend_API.c:259 >> 259 *p = > Z_LVAL_PP(arg); >> (gdb) bt >> #0 0xffffffff7bacedcc in zend_parse_arg_impl (arg=0x1003853c0, >> va=0xffffffff7ffe3a88, spec=0xffffffff7ffe3a58) >> at /root/build/php-4.3.4/Zend/zend_API.c:259 >> #1 0xffffffff7bacfa54 in zend_parse_arg (arg_num=4, arg=0x1003853c0, >> va=0xffffffff7ffe3a88, >> spec=0xffffffff7ffe3a58, quiet=0) at >> /root/build/php-4.3.4/Zend/zend_API.c:439 >> #2 0xffffffff7bacff40 in zend_parse_va_args (num_args=0, >> type_spec=0xffffffff7bb6906c "ll", >> va=0xffffffff7ffe3a88, flags=0) at >> /root/build/php-4.3.4/Zend/zend_API.c:524 >> #3 0xffffffff7bad032c in zend_parse_parameters (num_args=4, >> type_spec=0xffffffff7bb69068 "ssz|ll") >> at /root/build/php-4.3.4/Zend/zend_API.c:551 >> #4 0xffffffff7b9493cc in php_pcre_match (ht=4, return_value=0x1008c4c00, >> this_ptr=0x0, return_value_used=0, >> global=1) at /root/build/php-4.3.4/ext/pcre/php_pcre.c:375 >> #5 0xffffffff7b94a464 in zif_preg_match_all (ht=4, >> return_value=0x1008c4c00, this_ptr=0x0, return_value_used=0) >> at /root/build/php-4.3.4/ext/pcre/php_pcre.c:608 >> #6 0xffffffff7baea870 in execute (op_array=0x1008ac610) at >> /root/build/php-4.3.4/Zend/zend_execute.c:1616 >> #7 0xffffffff7baeabe4 in execute (op_array=0x100884bd0) at >> /root/build/php-4.3.4/Zend/zend_execute.c:1660 >> #8 0xffffffff7baeabe4 in execute (op_array=0x1003a07b0) at >> /root/build/php-4.3.4/Zend/zend_execute.c:1660 >> #9 0xffffffff7baeabe4 in execute (op_array=0x1003af0a0) at >> /root/build/php-4.3.4/Zend/zend_execute.c:1660 >> #10 0xffffffff7baeabe4 in execute (op_array=0x10038f220) at >> /root/build/php-4.3.4/Zend/zend_execute.c:1660 >> #11 0xffffffff7bacde24 in zend_execute_scripts (type=8, retval=0x0, >> file_count=3) >> at /root/build/php-4.3.4/Zend/zend.c:884 >> #12 0xffffffff7ba6dd08 in php_execute_script >> (primary_file=0xffffffff7fffef30) >> at /root/build/php-4.3.4/main/main.c:1729 >> #13 0xffffffff7baf3914 in php_handler (r=0x10037df10) >> at /root/build/php-4.3.4/sapi/apache2handler/sapi_apache2.c:537 >> #14 0x00000001000ac8a0 in ap_run_handler () >> #15 0x00000001000ad798 in ap_invoke_handler () >> #16 0x000000010007b6d0 in ap_process_request () >> #17 0x00000001000712e4 in ap_process_http_connection () >> #18 0x00000001000c55b8 in ap_run_process_connection () >> #19 0x00000001000c5c18 in ap_process_connection () >> #20 0x00000001000a8e28 in child_main () >> #21 0x00000001000a9030 in make_child () >> #22 0x00000001000a92a4 in startup_children () >> #23 0x00000001000a9da8 in ap_mpm_run () >> #24 0x00000001000b79d8 in main () >> (gdb) quit >> [EMAIL PROTECTED] httpd] > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php