Bug #18258 Updated: Gettting frequent Seg Faults on PHP scripts
| From: | derick@php.net | Date: | Wed, 10 Jul 2002 11:22:16 +0000 |
| Subject: | Bug #18258 Updated: Gettting frequent Seg Faults on PHP scripts | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13719@lists.php.net to get a copy of this message | ||
ID: 18258
Updated by: derick@php.net
Reported By: tauren@servlets.net
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Red Hat 6.2
PHP Version: 4.2.1
New Comment:
Which version of libmcrypt are you using?
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-07-10 04:37:49] tauren@servlets.net
(I hope it is OK to post these LONG backtrace messages! If it isn't,
please let me know the best way to get this information across...)
I've been able to produce some additional backtraces that are different
than the one previously posted. Again, these are done only hitting
phpinfo.php. I seem to get different results hitting this same
document.
============ BACKTRACE #1 ===================
For this one I got part of the phpinfo() output, but it ended
prematurely while displaying the Mysql directives. I don't think the
problem has anything to do with mysql, however:
(gdb) run -X -DSSL -f /usr/local/apache/conf/custom/test/httpd.conf
Starting program: /usr/local/apache/bin/httpd -X -DSSL -f
/usr/local/apache/conf/custom/test/httpd.conf
Processing config directory:
/usr/local/apache/conf/custom/test/virtual
Processing config file:
/usr/local/apache/conf/custom/test/virtual/www.sample.com:80
Error while mapping shared library sections:
Ü!: No such file or directory.
Error while reading shared library symbols:
Ü!: No such file or directory.
warning: find_solib: Can't read pathname for load map: Input/output
error
Cannot access memory at address 0x1d06
(gdb) bt
#0 0x4000af60 in _dl_debug_state () at md4.c:255
#1 0x4000ac7b in _dl_catch_error () at md4.c:255
#2 0x403abd1d in _dl_open (file=0x858e598
"/usr/local/lib/libmcrypt/xtea.so", mode=257,
caller=0xbfffd980) at dl-open.c:232
#3 0x4024d3d3 in dlopen_doit (a=0xbfffda94) at dlopen.c:41
#4 0x4000ac7b in _dl_catch_error () at md4.c:255
#5 0x4024d8b9 in _dlerror_run (operate=0x4024d3a8 <dlopen_doit>,
args=0xbfffda94) at dlerror.c:125
#6 0x4024d393 in __dlopen_check (file=0x858e598
"/usr/local/lib/libmcrypt/xtea.so", mode=257)
at dlopen.c:53
#7 0x4004ef31 in sys_dl_open (handle=0x858ca18,
filename=0x858e598 "/usr/local/lib/libmcrypt/xtea.so") at
ltdl.c:266
#8 0x4004f44d in tryall_dlopen (handle=0xbfffdbd4,
filename=0x858e598 "/usr/local/lib/libmcrypt/xtea.so") at
ltdl.c:943
#9 0x4004f55e in find_module (handle=0xbfffdbd4, dir=0x8591a90
"/usr/local/lib/libmcrypt/",
libdir=0x8591ce0 "/usr/local/lib/libmcrypt", dlname=0x8591cc0
"xtea.so",
old_name=0x8591cd0 "xtea.a", installed=1) at ltdl.c:986
#10 0x400500f4 in lt_dlopen (filename=0x8591f00 "xtea.la") at
ltdl.c:1340
#11 0x400503dc in lt_dlopenext (filename=0x8591f00 "xtea.la") at
ltdl.c:1423
#12 0x4004b4d2 in mcrypt_module_close () at mcrypt_modules.c:49
#13 0x4004ad96 in mcrypt_free_p () at mcrypt_extra.c:205
#14 0x4004aaab in mcrypt_list_algorithms (libdir=0x0, size=0xbfffe4a0)
at mcrypt_extra.c:106
#15 0x810654b in zm_info_mcrypt (zend_module=0x8570dd8) at
mcrypt.c:365
#16 0x8147d65 in _display_module_info (module=0x8570dd8,
arg=0xbfffe4f0) at info.c:49
#17 0x81b5f10 in zend_hash_apply_with_argument (ht=0x84249e0,
apply_func=0x8147d20 <_display_module_info>, argument=0xbfffe4f0)
at zend_hash.c:705
#18 0x8148514 in php_print_info (flag=-1) at info.c:259
#19 0x8148d98 in zif_phpinfo (ht=0, return_value=0x85903ac,
this_ptr=0x0, return_value_used=0)
at info.c:471
#20 0x81d4d01 in execute (op_array=0x8590324) at ./zend_execute.c:1598
#21 0x81b0bbc in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#22 0x80c9c7f in php_execute_script (primary_file=0xbffff830) at
main.c:1381
#23 0x81bbde9 in apache_php_module_main (r=0x8526e30,
display_source_mode=0) at sapi_apache.c:90
#24 0x80c6316 in send_php () at md4.c:255
#25 0x80c636f in send_parsed_php () at md4.c:255
#26 0x821bd83 in ap_invoke_handler () at md4.c:255
#27 0x8230b59 in process_request_internal () at md4.c:255
#28 0x8230bbc in ap_process_request () at md4.c:255
#29 0x8227c1e in child_main () at md4.c:255
#30 0x8227dd0 in make_child () at md4.c:255
#31 0x8227f29 in startup_children () at md4.c:255
#32 0x8228586 in standalone_main () at md4.c:255
#33 0x8228d63 in main () at md4.c:255
#34 0x402e59cb in __libc_start_main (main=0x82289fc <main>, argc=5,
argv=0xbffffb44,
init=0x808f990 <_init>, fini=0x832864c <_fini>,
rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbffffb3c) at ../sysdeps/generic/libc-start.c:92
(gdb) ni
Error while reading shared library symbols:
Ü!: No such file or directory.
Program received signal SIGSEGV, Segmentation fault.
0x4024f078 in last_result () from /lib/libdl.so.2
(gdb) bt
#0 0x4024f078 in last_result () from /lib/libdl.so.2
#1 0x8591d58 in ?? () at md4.c:255
#2 0x0 in MD4Transform (buf=Cannot access memory at address 0x13a3c
)
(gdb) ni
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
============ BACKTRACE #2 ===================
This time I got some output again, up to the MySQL section (it didn't
display as much as the first time). Then when gdb reported that the
program ended, all the stuff in my browser window disappeared and I got
the normal MSIE "Page cannot be displayed" message.
(gdb) run -X -DSSL -f /usr/local/apache/conf/custom/test/httpd.conf
Starting program: /usr/local/apache/bin/httpd -X -DSSL -f
/usr/local/apache/conf/custom/test/httpd.conf
Processing config directory:
/usr/local/apache/conf/custom/test/virtual
Processing config file:
/usr/local/apache/conf/custom/test/virtual/www.sample.com:80
Cannot access memory at address 0x6c2f6269
(gdb) bt
#0 0x4000af60 in _dl_debug_state () at md4.c:255
#1 0x4000ac7b in _dl_catch_error () at md4.c:255
#2 0x403abd1d in _dl_open (file=0x8591ac8
"/usr/local/lib/libmcrypt/twofish.so", mode=257,
caller=0xbfffd980) at dl-open.c:232
#3 0x4024d3d3 in dlopen_doit (a=0xbfffda94) at dlopen.c:41
#4 0x4000ac7b in _dl_catch_error () at md4.c:255
#5 0x4024d8b9 in _dlerror_run (operate=0x4024d3a8 <dlopen_doit>,
args=0xbfffda94) at dlerror.c:125
#6 0x4024d393 in __dlopen_check (file=0x8591ac8
"/usr/local/lib/libmcrypt/twofish.so", mode=257)
at dlopen.c:53
#7 0x4004ef31 in sys_dl_open (handle=0x858ca58,
filename=0x8591ac8 "/usr/local/lib/libmcrypt/twofish.so") at
ltdl.c:266
#8 0x4004f44d in tryall_dlopen (handle=0xbfffdbd4,
filename=0x8591ac8 "/usr/local/lib/libmcrypt/twofish.so") at
ltdl.c:943
#9 0x4004f55e in find_module (handle=0xbfffdbd4, dir=0x85915d0
"/usr/local/lib/libmcrypt/",
libdir=0x8591a18 "/usr/local/lib/libmcrypt", dlname=0x85919f8
"twofish.so",
old_name=0x8591a08 "twofish.a", installed=1) at ltdl.c:986
#10 0x400500f4 in lt_dlopen (filename=0x85914c0 "twofish.la") at
ltdl.c:1340
#11 0x400503dc in lt_dlopenext (filename=0x85914c0 "twofish.la") at
ltdl.c:1423
#12 0x4004b4d2 in mcrypt_module_close () at mcrypt_modules.c:49
#13 0x4004ad96 in mcrypt_free_p () at mcrypt_extra.c:205
#14 0x4004aaab in mcrypt_list_algorithms (libdir=0x0, size=0xbfffe4a0)
at mcrypt_extra.c:106
#15 0x810654b in zm_info_mcrypt (zend_module=0x8570dd8) at
mcrypt.c:365
#16 0x8147d65 in _display_module_info (module=0x8570dd8,
arg=0xbfffe4f0) at info.c:49
#17 0x81b5f10 in zend_hash_apply_with_argument (ht=0x84249e0,
apply_func=0x8147d20 <_display_module_info>, argument=0xbfffe4f0)
at zend_hash.c:705
#18 0x8148514 in php_print_info (flag=-1) at info.c:259
#19 0x8148d98 in zif_phpinfo (ht=0, return_value=0x85902f4,
this_ptr=0x0, return_value_used=0)
at info.c:471
#20 0x81d4d01 in execute (op_array=0x859026c) at ./zend_execute.c:1598
#21 0x81b0bbc in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#22 0x80c9c7f in php_execute_script (primary_file=0xbffff830) at
main.c:1381
#23 0x81bbde9 in apache_php_module_main (r=0x8526e30,
display_source_mode=0) at sapi_apache.c:90
#24 0x80c6316 in send_php () at md4.c:255
#25 0x80c636f in send_parsed_php () at md4.c:255
#26 0x821bd83 in ap_invoke_handler () at md4.c:255
#27 0x8230b59 in process_request_internal () at md4.c:255
#28 0x8230bbc in ap_process_request () at md4.c:255
#29 0x8227c1e in child_main () at md4.c:255
#30 0x8227dd0 in make_child () at md4.c:255
#31 0x8227f29 in startup_children () at md4.c:255
#32 0x8228586 in standalone_main () at md4.c:255
#33 0x8228d63 in main () at md4.c:255
#34 0x402e59cb in __libc_start_main (main=0x82289fc <main>, argc=5,
argv=0xbffffb44,
init=0x808f990 <_init>, fini=0x832864c <_fini>,
rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbffffb3c) at ../sysdeps/generic/libc-start.c:92
(gdb) step
dl_open_worker (a=0xbfffd984) at dl-open.c:198
198 dl-open.c: No such file or directory.
(gdb) step
warning: Cannot insert breakpoint 0:
Cannot access memory at address 0x0
(gdb) step
Cannot find bounds of current function
(gdb) step
Cannot find bounds of current function
(gdb) step
Cannot find bounds of current function
(gdb) bt
#0 0x402e3d24 in ?? () from /lib/libc.so.6
#1 0x4000ac7b in _dl_catch_error () at md4.c:255
#2 0x403abd1d in _dl_open (file=0x8591ac8
"/usr/local/lib/libmcrypt/twofish.so", mode=257,
caller=0xbfffd980) at dl-open.c:232
#3 0x4024d3d3 in dlopen_doit (a=0xbfffda94) at dlopen.c:41
#4 0x4000ac7b in _dl_catch_error () at md4.c:255
#5 0x4024d8b9 in _dlerror_run (operate=0x4024d3a8 <dlopen_doit>,
args=0xbfffda94) at dlerror.c:125
#6 0x4024d393 in __dlopen_check (file=0x8591ac8
"/usr/local/lib/libmcrypt/twofish.so", mode=257)
at dlopen.c:53
#7 0x4004ef31 in sys_dl_open (handle=0x858ca58,
filename=0x8591ac8 "/usr/local/lib/libmcrypt/twofish.so") at
ltdl.c:266
#8 0x4004f44d in tryall_dlopen (handle=0xbfffdbd4,
filename=0x8591ac8 "/usr/local/lib/libmcrypt/twofish.so") at
ltdl.c:943
#9 0x4004f55e in find_module (handle=0xbfffdbd4, dir=0x85915d0
"/usr/local/lib/libmcrypt/",
libdir=0x8591a18 "/usr/local/lib/libmcrypt", dlname=0x85919f8
"twofish.so",
old_name=0x8591a08 "twofish.a", installed=1) at ltdl.c:986
#10 0x400500f4 in lt_dlopen (filename=0x85914c0 "twofish.la") at
ltdl.c:1340
#11 0x400503dc in lt_dlopenext (filename=0x85914c0 "twofish.la") at
ltdl.c:1423
#12 0x4004b4d2 in mcrypt_module_close () at mcrypt_modules.c:49
#13 0x4004ad96 in mcrypt_free_p () at mcrypt_extra.c:205
#14 0x4004aaab in mcrypt_list_algorithms (libdir=0x0, size=0xbfffe4a0)
at mcrypt_extra.c:106
#15 0x810654b in zm_info_mcrypt (zend_module=0x8570dd8) at
mcrypt.c:365
#16 0x8147d65 in _display_module_info (module=0x8570dd8,
arg=0xbfffe4f0) at info.c:49
#17 0x81b5f10 in zend_hash_apply_with_argument (ht=0x84249e0,
apply_func=0x8147d20 <_display_module_info>, argument=0xbfffe4f0)
at zend_hash.c:705
#18 0x8148514 in php_print_info (flag=-1) at info.c:259
#19 0x8148d98 in zif_phpinfo (ht=0, return_value=0x85902f4,
this_ptr=0x0, return_value_used=0)
at info.c:471
#20 0x81d4d01 in execute (op_array=0x859026c) at ./zend_execute.c:1598
#21 0x81b0bbc in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:810
#22 0x80c9c7f in php_execute_script (primary_file=0xbffff830) at
main.c:1381
#23 0x81bbde9 in apache_php_module_main (r=0x8526e30,
display_source_mode=0) at sapi_apache.c:90
#24 0x80c6316 in send_php () at md4.c:255
#25 0x80c636f in send_parsed_php () at md4.c:255
#26 0x821bd83 in ap_invoke_handler () at md4.c:255
#27 0x8230b59 in process_request_internal () at md4.c:255
#28 0x8230bbc in ap_process_request () at md4.c:255
#29 0x8227c1e in child_main () at md4.c:255
#30 0x8227dd0 in make_child () at md4.c:255
#31 0x8227f29 in startup_children () at md4.c:255
#32 0x8228586 in standalone_main () at md4.c:255
#33 0x8228d63 in main () at md4.c:255
#34 0x402e59cb in __libc_start_main (main=0x82289fc <main>, argc=5,
argv=0xbffffb44,
init=0x808f990 <_init>, fini=0x832864c <_fini>,
rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbffffb3c) at ../sysdeps/generic/libc-start.c:92
(gdb) step
Cannot find bounds of current function
(gdb) next
Cannot find bounds of current function
(gdb) next
Cannot find bounds of current function
(gdb) next
Cannot find bounds of current function
(gdb) next
Cannot find bounds of current function
(gdb) si
0x4000add0 255 md4.c: No such file or directory.
(gdb) ni
Program received signal SIGSEGV, Segmentation fault.
0x4024f078 in last_result () from /lib/libdl.so.2
(gdb) next
Single stepping until exit from function last_result,
which has no line number information.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
============ BACKTRACE #3 ===================
I'm not going to show another backtrace, but this time the output
stalled around the MySQL section again. But when it completed finally,
the rest of the phpinfo() was displayed on the web page. The only
thing missing on the page were the two images at the top.
Hopefully this helps! In the meantime, I'll go and look for xtea.so
and twofish.so. And I'll try recompiling without libmcrypt installed.
Tauren
------------------------------------------------------------------------
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/18258
--
Edit this bug report at http://bugs.php.net/?id=18258&edit=1