Need help debugging random httpd segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello list,

We've been experiencing random crashes on httpd, error_log shows a
bunch of [notice] child pid 12984 exit signal Segmentation fault (11)

PHP 5.2.17:

./configure --with-apxs2=/var/www/bin/apxs --with-gd
--with-jpeg-dir=/usr/local --with-pgsql --with-pdo-pgsql
--with-png-dir=/usr/local --with-zlib-dir=/usr/local --with-mssql
--enable-wddx --with-mysqli --with-freetype-dir=/usr/local
--enable-zend-multibyte --with-mcrypt --with-mysql --with-pdo-mysql
--enable-mbstring --with-pdo-dblib --with-sybase=/usr/local/freetds
--enable-soap --with-openssl --with-curl --with-imap --with-kerberos
--with-imap-ssl --enable-ftp --enable-debug

I've been looking at coredumps; here's what I got:

(gdb) bt
#0  zend_mm_remove_from_free_list (heap=0x85043f0, mm_block=0x8512420)
at /root/download/php/php-5.2.17/Zend/zend_alloc.c:837
#1  0x01042561 in _zend_mm_free_int (heap=0x85043f0, p=<value
optimized out>) at
/root/download/php/php-5.2.17/Zend/zend_alloc.c:1979
#2  0x0104f9c0 in _zval_dtor () at
/root/download/php/php-5.2.17/Zend/zend_variables.h:35
#3  _zval_ptr_dtor (zval_ptr=0x887af7c) at
/root/download/php/php-5.2.17/Zend/zend_execute_API.c:414
#4  0x0106682e in zend_hash_destroy (ht=0x86b43c8) at
/root/download/php/php-5.2.17/Zend/zend_hash.c:526
#5  0x01053a5d in destroy_zend_class (pce=0x8736aec) at
/root/download/php/php-5.2.17/Zend/zend_opcode.c:185
#6  0x0106682e in zend_hash_destroy (ht=0x85046b8) at
/root/download/php/php-5.2.17/Zend/zend_hash.c:526
#7  0x0105cc78 in zend_shutdown () at
/root/download/php/php-5.2.17/Zend/zend.c:736
#8  0x01019ba5 in php_module_shutdown () at
/root/download/php/php-5.2.17/main/main.c:1918
#9  0x01019c4b in php_module_shutdown_wrapper (sapi_globals=0x13724a0)
at /root/download/php/php-5.2.17/main/main.c:1889
#10 0x010c89e3 in php_apache_child_shutdown (tmp=0x0) at
/root/download/php/php-5.2.17/sapi/apache2handler/sapi_apache2.c:369
#11 0x009d3b69 in run_cleanups () at memory/unix/apr_pools.c:2306
#12 apr_pool_destroy (pool=0x867a1b0) at memory/unix/apr_pools.c:774
#13 0x080cbd54 in clean_child_exit (code=0) at prefork.c:196
#14 0x080cc49d in just_die (sig=15) at prefork.c:328
#15 <signal handler called>
#16 0x0052d424 in __kernel_vsyscall ()
#17 0x0028670b in poll () from /lib/libc.so.6
#18 0x009dda94 in apr_wait_for_io_or_timeout (f=0x0, s=0x867c1f8,
for_read=0) at support/unix/waitio.c:51
#19 0x009d7ada in apr_socket_sendv (sock=0x867c1f8, vec=0xbfe85340,
nvec=1, len=0xbfe85248) at network_io/unix/sendrecv.c:212
#20 0x0807b8a6 in writev_it_all (s=0x867c1f8, vec=0xbfe85338, nvec=2,
len=20851, nbytes=0xbfe853dc) at core_filters.c:321
#21 0x0807c42e in ap_core_output_filter (f=0x867c850, b=0x8686538) at
core_filters.c:868
#22 0x080afa28 in ap_http_header_filter (f=0x871ee70, b=0x8691a98) at
http_filters.c:1306
#23 0x08071f0e in ap_content_length_filter (f=0x871ee58, b=0x8691a98)
at protocol.c:1338
#24 0x080b1228 in ap_byterange_filter (f=0x871ee40, bb=0x8691a98) at
byterange_filter.c:169
#25 0x08092d42 in deflate_out_filter (f=0x8691a60, bb=0x8691a98) at
mod_deflate.c:512
#26 0x08092d42 in deflate_out_filter (f=0x8695050, bb=0x8691a98) at
mod_deflate.c:512
#27 0x00116edd in apr_brigade_write (b=0x8691a98, flush=0x8087640
<ap_filter_flush>, ctx=0x8695050,
    str=0x875e3bc "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\r\n<html
xmlns=\"http://www.w3.org/1999/xhtml\"; xml:lang=\"fr\"
lang=\"fr\">\r\n<head>\r\n<meta name=\""..., nbyte=20520) at
buckets/apr_brigade.c:429
#28 0x0806fe26 in buffer_output (r=0x8694278,
    str=0x875e3bc "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\r\n<html
xmlns=\"http://www.w3.org/1999/xhtml\"; xml:lang=\"fr\"
lang=\"fr\">\r\n<head>\r\n<meta name=\""..., len=20520) at
protocol.c:1453
#29 0x0806ffcc in ap_rwrite (buf=0x875e3bc, nbyte=20520, r=0x8694278)
at protocol.c:1488
#30 0x010c90a5 in php_apache_sapi_ub_write (
    str=0x875e3bc "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\r\n<html
xmlns=\"http://www.w3.org/1999/xhtml\"; xml:lang=\"fr\"
lang=\"fr\">\r\n<head>\r\n<meta name=\""..., str_length=20520)
    at /root/download/php/php-5.2.17/sapi/apache2handler/sapi_apache2.c:78
#31 0x0102ada3 in php_ub_body_write_no_header (
    str=0x875e3bc "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\r\n<html
xmlns=\"http://www.w3.org/1999/xhtml\"; xml:lang=\"fr\"
lang=\"fr\">\r\n<head>\r\n<meta name=\""..., str_length=20520) at
/root/download/php/php-5.2.17/main/output.c:684
#32 0x0102b377 in php_end_ob_buffer (send_buffer=1 '\001',
just_flush=0 '\0') at /root/download/php/php-5.2.17/main/output.c:294
#33 0x0102ba38 in zif_ob_end_flush (ht=0, return_value=0x86a4084,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
    at /root/download/php/php-5.2.17/main/output.c:810
#34 0x0109162a in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfe85990) at
/root/download/php/php-5.2.17/Zend/zend_vm_execute.h:200
#35 0x0107e370 in execute (op_array=0x8645d04) at
/root/download/php/php-5.2.17/Zend/zend_vm_execute.h:92
#36 0x0105c282 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/download/php/php-5.2.17/Zend/zend.c:1134
#37 0x010199c6 in php_execute_script (primary_file=0xbfe87c38) at
/root/download/php/php-5.2.17/main/main.c:2036
#38 0x010c9a08 in php_handler (r=0x8694278) at
/root/download/php/php-5.2.17/sapi/apache2handler/sapi_apache2.c:639
#39 0x0807cf29 in ap_run_handler (r=0x8694278) at config.c:157
#40 0x08080289 in ap_invoke_handler (r=0x8694278) at config.c:372
#41 0x080ae740 in ap_internal_redirect (new_uri=0x8690e08 "/404.php",
r=0x871e0c8) at http_request.c:501
#42 0x080ae7a9 in ap_process_request (r=0x871e0c8) at http_request.c:296
#43 0x080ab988 in ap_process_http_connection (c=0x867c390) at http_core.c:190
#44 0x08084299 in ap_run_process_connection (c=0x867c390) at connection.c:43
#45 0x080cc135 in child_main (child_num_arg=<value optimized out>) at
prefork.c:650
#46 0x080cc413 in make_child (s=0x82bcc20, slot=21) at prefork.c:746
#47 0x080cd218 in perform_idle_server_maintenance () at prefork.c:881
#48 ap_mpm_run (_pconf=0x82b6550, plog=0x82f8658, s=0x82bcc20) at prefork.c:1085
#49 0x08069c20 in main (argc=Cannot access memory at address 0x0
) at main.c:740

(gdb) frame 35
#35 0x0107e370 in execute (op_array=0x8645d04) at
/root/download/php/php-5.2.17/Zend/zend_vm_execute.h:92
92                 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) {
(gdb)

I've been also looking at this previous post:
http://bugs.php.net/bug.php?id=41130

Can anyone confirm that I have the same problem... infinite loop in
the code somewhere ?

If it is... how can I pinpoint the exact line where the error is ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux