Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Random segfaults with Apache 2.4.x on Gentoo hardened
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
startaq
n00b
n00b


Joined: 16 Oct 2003
Posts: 21

PostPosted: Sat Nov 16, 2013 4:44 pm    Post subject: Random segfaults with Apache 2.4.x on Gentoo hardened Reply with quote

Since switching from Apache 2.2.x to Apache 2.4.x I'm getting segfauls in random places after running for a while. Here are two example backtraces:

Code:

Program terminated with signal 11, Segmentation fault.
(gdb) bt
#0  sapi_remove_header (l=0x2efb0000b10,
    name=name@entry=0x2efb00341e0 "\212\035GP\233\232\360\237\202\371\017#02\245\272\275\225BIy*\034\342\275C\236\354,\257\332\341o}\342@b\232'\362\241\064\233\340\205B\270\206\221\347\370>\303!\230#0@V\340C\226\313\300Qx<\\\306\354\333G\220\237\236WiB\325Qܻ\t\265!ǵm", len=7)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/main/SAPI.c:602
#1  0x000002eff6bf9dd2 in sapi_header_add_op (op=<optimized out>, sapi_header=0x2efda9ed600,
    tsrm_ls=0x2efb00008c0) at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/main/SAPI.c:650
#2  0x000002eff6bfb4df in sapi_header_op (op=SAPI_HEADER_REPLACE, arg=arg@entry=0x2efda9ed670,
    tsrm_ls=tsrm_ls@entry=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/main/SAPI.c:842
#3  0x000002eff6bfb94b in sapi_add_header_ex (
    header_line=header_line@entry=0x2eff710a298 "Expires: Thu, 19 Nov 1981 08:52:00 GMT",
    header_line_len=header_line_len@entry=38, duplicate=duplicate@entry=1 '\001', replace=replace@entry=1 '\001',
    tsrm_ls=tsrm_ls@entry=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/main/SAPI.c:630
#4  0x000002eff6ae4796 in _php_cache_limiter_nocache (tsrm_ls=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/ext/session/session.c:1212
#5  0x000002eff6ae9d16 in php_session_cache_limiter (tsrm_ls=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/ext/session/session.c:1250
#6  php_session_start (tsrm_ls=tsrm_ls@entry=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/ext/session/session.c:1543
#7  0x000002eff6aea47c in zif_session_start (ht=<optimized out>, return_value=0x2efb0032fe8,
    return_value_ptr=<optimized out>, this_ptr=<optimized out>, return_value_used=<optimized out>,
    tsrm_ls=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/ext/session/session.c:2002
#8  0x000002eff6d37846 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>, tsrm_ls=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_vm_execute.h:550
#9  0x000002eff6cf068b in execute_ex (execute_data=0x2efb0005be0, tsrm_ls=0x2efb00008c0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_vm_execute.h:363
#10 0x000002eff6c6b5d7 in zend_execute_scripts (type=0, type@entry=2, tsrm_ls=0x0, tsrm_ls@entry=0x1,
    retval=retval@entry=0x0, file_count=0, file_count@entry=1)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend.c:1320
#11 0x000002eff6d3b3b2 in php_handler (r=0x0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/sapi/apache2handler/sapi_apache2.c:669
#12 0x0000000000000000 in ?? ()


Another one:

Code:

Program terminated with signal 11, Segmentation fault.
#0  0x000002c339a83bfc in i_create_execute_data_from_op_array (tsrm_ls=0x2c2f0240730, nested=0 '\000',
    op_array=0x2c2f0247238)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_execute.c:1632
#1  zend_execute (op_array=0x2c2f0247238, tsrm_ls=0x2c2f0240730)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_vm_execute.h:388
#2  0x000002c3399b85d7 in zend_execute_scripts (type=type@entry=2, tsrm_ls=0x2c2f0240730, tsrm_ls@entry=0x28,
    retval=0x0, retval@entry=0x2c30c00a538, file_count=file_count@entry=1)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend.c:1320
#3  0x000002c339a883b2 in php_handler (r=0x2c2f05b99a0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/sapi/apache2handler/sapi_apache2.c:669
#4  0x000000675bb4c96d in ap_run_handler (r=r@entry=0x2c2f05b99a0) at config.c:169
#5  0x000000675bb4cfcb in ap_invoke_handler (r=r@entry=0x2c2f05b99a0) at config.c:432
#6  0x000000675bb6487a in ap_process_async_request (r=0x2c2f05b99a0) at http_request.c:317
#7  0x000000675bb64b5f in ap_process_request (r=r@entry=0x2c2f05b99a0) at http_request.c:363
#8  0x000000675bb607d5 in ap_process_http_sync_connection (c=0x2c3240331b8) at http_core.c:190
#9  ap_process_http_connection (c=0x2c3240331b8) at http_core.c:231
#10 0x000000675bb5747d in ap_run_process_connection (c=c@entry=0x2c3240331b8) at connection.c:41
#11 0x000000675bb579e0 in ap_process_connection (c=c@entry=0x2c3240331b8, csd=csd@entry=0x2c324032fa0)
    at connection.c:202
#12 0x000000675bb6c28d in process_socket (bucket_alloc=<optimized out>, my_thread_num=1, my_child_num=0,
    sock=0x2c324032fa0, p=0x2c324032f18, thd=0x675e664b48) at worker.c:620
#13 worker_thread (thd=0x675e664b48, dummy=<optimized out>) at worker.c:979
#14 0x000002c33ff4bec6 in start_thread () from /lib64/libpthread.so.0
#15 0x000002c33fa804bd in clone () from /lib64/libc.so.6


emerge --info here: http://pastebin.com/6DtNzZNy

What I've tried so far:

- PHP 5.4.20 (stable), 5.5.4 (stable), 5.5.6 (latest)
- Switching from worker to prefork
- Turning off SSL

Installed versions are:

- www-servers/apache-2.4.6-r2
- app-admin/apache-tools-2.4.6
- dev-libs/apr-1.4.8-r1
- dev-libs/apr-util-1.5.2

The server runs fine between a few minutes and a few hours, then processes start getting zombified and refuse to get killed. I'm really at a loss here, does anyone here have an idea what to try next? I want to avoid switching back to Apache 2.2.

EDIT:

Another backtrace:

Code:

#0  0x0000038b39353bfc in i_create_execute_data_from_op_array (tsrm_ls=0x38ae43c4550, nested=0 '\000',
    op_array=0x38ae423c618)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_execute.c:1632
#1  zend_execute (op_array=0x38ae423c618, tsrm_ls=0x38ae43c4550)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend_vm_execute.h:388
#2  0x0000038b392885d7 in zend_execute_scripts (type=type@entry=2, tsrm_ls=0x38ae43c4550, tsrm_ls@entry=0x28,
    retval=0x0, retval@entry=0x38ae82486b0, file_count=file_count@entry=1)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/Zend/zend.c:1320
#3  0x0000038b393583b2 in php_handler (r=0x38b100089a0)
    at /var/tmp/portage/dev-lang/php-5.5.6/work/sapis-build/apache2/sapi/apache2handler/sapi_apache2.c:669
#4  0x00000049e8e2a96d in ap_run_handler (r=r@entry=0x38b100089a0) at config.c:169
#5  0x00000049e8e2afcb in ap_invoke_handler (r=r@entry=0x38b100089a0) at config.c:432
#6  0x00000049e8e4287a in ap_process_async_request (r=0x38b100089a0) at http_request.c:317
#7  0x00000049e8e42b5f in ap_process_request (r=r@entry=0x38b100089a0) at http_request.c:363
#8  0x00000049e8e3e7d5 in ap_process_http_sync_connection (c=0x38b2402f178) at http_core.c:190
#9  ap_process_http_connection (c=0x38b2402f178) at http_core.c:231
#10 0x00000049e8e3547d in ap_run_process_connection (c=c@entry=0x38b2402f178) at connection.c:41
#11 0x00000049e8e359e0 in ap_process_connection (c=c@entry=0x38b2402f178, csd=csd@entry=0x38b2402ef60)
    at connection.c:202
#12 0x00000049e8e4a28d in process_socket (bucket_alloc=<optimized out>, my_thread_num=4, my_child_num=0,
    sock=0x38b2402ef60, p=0x38b2402eed8, thd=0x49eb9b2488) at worker.c:620
#13 worker_thread (thd=0x49eb9b2488, dummy=<optimized out>) at worker.c:979
#14 0x0000038b3f81bec6 in start_thread () from /lib64/libpthread.so.0
#15 0x0000038b3f3504bd in clone () from /lib64/libc.so.6
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum