#26965 [Fbk->Opn]: Apache 2 Seg Faults on All PHP Pages
ID: 26965 User updated by: louis at 6internet dot com Reported By: louis at 6internet dot com -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Red Hat Enterprise Linux ES v3 PHP Version: 5CVS-2004-01-20 New Comment: No, PHP on the command line seems to be working ok. Passing PHP the plain HTML file on the command line outputs the HTML as expected, whereas in Apache 2 it seg faults. Just to clarify, two files (index.html and index.php) which are identical and contain simply: Test A test for php But, loading index.html displays fine as expected while loading index.php seg faults. Please do let me know if any more info would help diagnosis. I may be able to arrange full root access to the system if that would help? It is just a test RHEL ES v3 system with nothing except PHP 5 added yet because I haven't got it working yet. If so please let me know what address to mail the IP/password to off the bug database. Previous Comments: [2004-01-21 14:50:36] [EMAIL PROTECTED] Does this crash happen with CLI ?? [2004-01-21 06:20:54] louis at 6internet dot com Thanks for coming back sniper. httpd -l gives me: Compiled in modules: core.c prefork.c http_core.c mod_so.c So I think that means the prefork MPM is in use. PHP was compiled with: ./configure --with-apxs2=/usr/sbin/apxs --with-pgsql Lines added to /etc/httpd/conf/httpd.conf: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php Many thanks [2004-01-20 19:30:26] [EMAIL PROTECTED] What MPM is used with Apache? What was the configure line used to configure PHP? How was PHP configured in Apache httpd.conf? [2004-01-20 11:25:47] louis at 6internet dot com Have tried with current snapshot as requested, but getting basically the same. Just for verification, here is the gdb output this time: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1223485504 (LWP 31531)] 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 348 p = ht->arBuckets[nIndex]; (gdb) bt #0 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 #1 0xb6fe9eb3 in zend_list_insert (ptr=0x0, type=0) at /root/php5/php5-200401201430/Zend/zend_list.c:47 #2 0xb6fe9fe6 in zend_register_resource (rsrc_result=0x0, rsrc_pointer=0xb687913c, rsrc_type=2) at /root/php5/php5-200401201430/Zend/zend_list.c:99 #3 0xb6fc1ba4 in _php_stream_alloc (ops=0x0, abstract=0x0, persistent_id=0x0, mode=0xb70089f1 "rb") at /root/php5/php5-200401201430/main/streams/streams.c:248 #4 0xb6fc5733 in _php_stream_fopen_from_fd (fd=16, mode=0xb70089f1 "rb", persistent_id=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:262 #5 0xb6fc54f9 in _php_stream_fopen (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:139 #6 0xb6fc6768 in _php_stream_fopen_with_path (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", path=0xb7024ab2 ".:/usr/local/lib/php", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:1199 #7 0xb6fc61ef in php_plain_files_stream_opener (wrapper=0xb7053968, path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=133, opened_path=0xbfffe558, context=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:886 #8 0xb6fc3a0e in _php_stream_open_wrapper_ex (path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=141, opened_path=0x85, context=0x0) at /root/php5/php5-200401201430/main/streams/streams.c:1613 #9 0xb6fb3ed7 in php_stream_open_for_zend (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/main/main.c:876 #10 0xb6fef40a in zend_stream_open (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:41 ---Type to continue, or q to quit--- #11 0xb6fef4e4 in zend_stream_fixup (file_handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:56 #12 0xb6fccc4e in open_file_for_scanning (file_handle=0xbfffe550) at Zend/zend_language_scanner.c:3040 #13 0xb6fccd66 in compile_file (file_handle=0xbfffe550, type=2) at Zend/zend_langua
#26965 [Fbk->Opn]: Apache 2 Seg Faults on All PHP Pages
ID: 26965 User updated by: louis at 6internet dot com Reported By: louis at 6internet dot com -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Red Hat Enterprise Linux ES v3 PHP Version: 5CVS-2004-01-20 New Comment: Thanks for coming back sniper. httpd -l gives me: Compiled in modules: core.c prefork.c http_core.c mod_so.c So I think that means the prefork MPM is in use. PHP was compiled with: ./configure --with-apxs2=/usr/sbin/apxs --with-pgsql Lines added to /etc/httpd/conf/httpd.conf: LoadModule php5_module modules/libphp5.so AddType application/x-httpd-php .php Many thanks Previous Comments: [2004-01-20 19:30:26] [EMAIL PROTECTED] What MPM is used with Apache? What was the configure line used to configure PHP? How was PHP configured in Apache httpd.conf? [2004-01-20 11:25:47] louis at 6internet dot com Have tried with current snapshot as requested, but getting basically the same. Just for verification, here is the gdb output this time: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1223485504 (LWP 31531)] 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 348 p = ht->arBuckets[nIndex]; (gdb) bt #0 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 #1 0xb6fe9eb3 in zend_list_insert (ptr=0x0, type=0) at /root/php5/php5-200401201430/Zend/zend_list.c:47 #2 0xb6fe9fe6 in zend_register_resource (rsrc_result=0x0, rsrc_pointer=0xb687913c, rsrc_type=2) at /root/php5/php5-200401201430/Zend/zend_list.c:99 #3 0xb6fc1ba4 in _php_stream_alloc (ops=0x0, abstract=0x0, persistent_id=0x0, mode=0xb70089f1 "rb") at /root/php5/php5-200401201430/main/streams/streams.c:248 #4 0xb6fc5733 in _php_stream_fopen_from_fd (fd=16, mode=0xb70089f1 "rb", persistent_id=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:262 #5 0xb6fc54f9 in _php_stream_fopen (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:139 #6 0xb6fc6768 in _php_stream_fopen_with_path (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", path=0xb7024ab2 ".:/usr/local/lib/php", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:1199 #7 0xb6fc61ef in php_plain_files_stream_opener (wrapper=0xb7053968, path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=133, opened_path=0xbfffe558, context=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:886 #8 0xb6fc3a0e in _php_stream_open_wrapper_ex (path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=141, opened_path=0x85, context=0x0) at /root/php5/php5-200401201430/main/streams/streams.c:1613 #9 0xb6fb3ed7 in php_stream_open_for_zend (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/main/main.c:876 #10 0xb6fef40a in zend_stream_open (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:41 ---Type to continue, or q to quit--- #11 0xb6fef4e4 in zend_stream_fixup (file_handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:56 #12 0xb6fccc4e in open_file_for_scanning (file_handle=0xbfffe550) at Zend/zend_language_scanner.c:3040 #13 0xb6fccd66 in compile_file (file_handle=0xbfffe550, type=2) at Zend/zend_language_scanner.c:3126 #14 0xb6fe3be9 in zend_execute_scripts (type=2, retval=0x0, file_count=1) at /root/php5/php5-200401201430/Zend/zend.c:1047 #15 0xb7006966 in php_handler (r=0x81d3e00) at /root/php5/php5-200401201430/sapi/apache2handler/sapi_apache2.c:533 #16 0x08068685 in ap_run_handler () #17 0x08068c9f in ap_invoke_handler () #18 0x08065326 in ap_process_request () #19 0x0806095c in _start () #20 0x081d3e00 in ?? () #21 0x0004 in ?? () #22 0x081d3e00 in ?? () #23 0x0807228c in ap_run_pre_connection () #24 0x08072145 in ap_run_process_connection () #25 0x08066ba1 in ap_graceful_stop_signalled () #26 0x08066dba in ap_graceful_stop_signalled () #27 0x08066e16 in ap_graceful_stop_signalled () #28 0x0806763d in ap_mpm_run () #29 0x0806dacf in main () Hope this helps. Thanks. [2004-01-19 14:15:32] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.
#26965 [Fbk->Opn]: Apache 2 Seg Faults on All PHP Pages
ID: 26965 User updated by: louis at 6internet dot com Reported By: louis at 6internet dot com -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Red Hat Enterprise Linux ES v3 PHP Version: 5.0.0b3 (beta3) New Comment: Have tried with current snapshot as requested, but getting basically the same. Just for verification, here is the gdb output this time: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1223485504 (LWP 31531)] 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 348 p = ht->arBuckets[nIndex]; (gdb) bt #0 0xb6fe86d2 in _zend_hash_index_update_or_next_insert (ht=0xb705d5b0, h=0, pData=0xbfffd010, nDataSize=12, pDest=0x0, flag=1) at /root/php5/php5-200401201430/Zend/zend_hash.c:348 #1 0xb6fe9eb3 in zend_list_insert (ptr=0x0, type=0) at /root/php5/php5-200401201430/Zend/zend_list.c:47 #2 0xb6fe9fe6 in zend_register_resource (rsrc_result=0x0, rsrc_pointer=0xb687913c, rsrc_type=2) at /root/php5/php5-200401201430/Zend/zend_list.c:99 #3 0xb6fc1ba4 in _php_stream_alloc (ops=0x0, abstract=0x0, persistent_id=0x0, mode=0xb70089f1 "rb") at /root/php5/php5-200401201430/main/streams/streams.c:248 #4 0xb6fc5733 in _php_stream_fopen_from_fd (fd=16, mode=0xb70089f1 "rb", persistent_id=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:262 #5 0xb6fc54f9 in _php_stream_fopen (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:139 #6 0xb6fc6768 in _php_stream_fopen_with_path (filename=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", path=0xb7024ab2 ".:/usr/local/lib/php", opened_path=0xbfffe558, options=133) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:1199 #7 0xb6fc61ef in php_plain_files_stream_opener (wrapper=0xb7053968, path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=133, opened_path=0xbfffe558, context=0x0) at /root/php5/php5-200401201430/main/streams/plain_wrapper.c:886 #8 0xb6fc3a0e in _php_stream_open_wrapper_ex (path=0x81d5580 "/var/www/html/index.php", mode=0xb70089f1 "rb", options=141, opened_path=0x85, context=0x0) at /root/php5/php5-200401201430/main/streams/streams.c:1613 #9 0xb6fb3ed7 in php_stream_open_for_zend (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/main/main.c:876 #10 0xb6fef40a in zend_stream_open (filename=0x81d5580 "/var/www/html/index.php", handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:41 ---Type to continue, or q to quit--- #11 0xb6fef4e4 in zend_stream_fixup (file_handle=0xbfffe550) at /root/php5/php5-200401201430/Zend/zend_stream.c:56 #12 0xb6fccc4e in open_file_for_scanning (file_handle=0xbfffe550) at Zend/zend_language_scanner.c:3040 #13 0xb6fccd66 in compile_file (file_handle=0xbfffe550, type=2) at Zend/zend_language_scanner.c:3126 #14 0xb6fe3be9 in zend_execute_scripts (type=2, retval=0x0, file_count=1) at /root/php5/php5-200401201430/Zend/zend.c:1047 #15 0xb7006966 in php_handler (r=0x81d3e00) at /root/php5/php5-200401201430/sapi/apache2handler/sapi_apache2.c:533 #16 0x08068685 in ap_run_handler () #17 0x08068c9f in ap_invoke_handler () #18 0x08065326 in ap_process_request () #19 0x0806095c in _start () #20 0x081d3e00 in ?? () #21 0x0004 in ?? () #22 0x081d3e00 in ?? () #23 0x0807228c in ap_run_pre_connection () #24 0x08072145 in ap_run_process_connection () #25 0x08066ba1 in ap_graceful_stop_signalled () #26 0x08066dba in ap_graceful_stop_signalled () #27 0x08066e16 in ap_graceful_stop_signalled () #28 0x0806763d in ap_mpm_run () #29 0x0806dacf in main () Hope this helps. Thanks. Previous Comments: [2004-01-19 14:15:32] [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 [2004-01-19 10:33:25] louis at 6internet dot com Description: Compiled PHP against Apache 2 in Red Hat Enterprise Linux ES v3 and even loading a .php file which contains ONLY HTML causes Apache to segmentation fault and write to the error_log. Similar to bug #26893, but different backtrace. Reproduce code: --- Any plain HTML file or PHP file saved with .php extension Expected result: HTML code passed to browser Actual result: -- Browser loses connection and Apache seg faults. Output when run through gdb, once apache process seg