Keep in mind that its not the rules that cause segfaults. A segfault means a memory error in apache - something on your box is causing a memory error in apache. Loading a huge set of rules will cause this to show up sooner, but the rules do not cause this. If you are seeing segfaults something else is going on with the box and it does require attention.
I realize the satisfaction of solving the immediate problem by putting less memory load on apache, but if you are getting segfaults you really need to track down exactly whats causing it. So far we've seen caching modules do this, accelerators, even PHP. In one case, we found a buggy PHP app that would kill a server in 30 minutes flat - with or without modsecurity running.
Apache segmentation fault
Re: Apache segmentation fault
Any idea on how to identify what is causing the segfaults?
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
-
- Forum Regular
- Posts: 661
- Joined: Mon Oct 29, 2007 6:51 pm
Re: Apache segmentation fault
I tried that and it didnt compile for me.
I have httpd-2.2.3-13.el5.art
Did anyone get it to work using the art httpd package ?
I have httpd-2.2.3-13.el5.art
Code: Select all
# wget http://people.apache.org/~trawick/test_char.h
# wget http://people.apache.org/~trawick/mod_whatkilledus.c
# apxs -ci mod_whatkilledus.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_whatkilledus.lo mod_whatkilledus.c && touch mod_whatkilledus.slo
mod_whatkilledus.c:70:2: error: #error Apache must be built with --enable-exception-hook
mod_whatkilledus.c:191: error: expected ')' before '*' token
mod_whatkilledus.c: In function 'wku_register_hooks':
mod_whatkilledus.c:419: warning: implicit declaration of function 'ap_hook_fatal_exception'
mod_whatkilledus.c:419: error: 'wku_fatal_exception' undeclared (first use in this function)
mod_whatkilledus.c:419: error: (Each undeclared identifier is reported only once
mod_whatkilledus.c:419: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536
Re: Apache segmentation fault
I imagine it is the ...
...that's the killer problem, if you'll forgive the pun.
Faris.
Code: Select all
#error Apache must be built with --enable-exception-hook
Faris.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
Re: Apache segmentation fault
Ok I have mod_whatkilledus in place lets see what it catches.
Thanks.
Thanks.
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64