mod_evasive icon indicating copy to clipboard operation
mod_evasive copied to clipboard

segfault with awstats

Open clydzik opened this issue 3 months ago • 2 comments

Hello. I have an issue when enabled modevasive with awstats

apache: Apache/2.4.52 (Ubuntu) awstats: 7.8 modevasive: 2.2.0 installed from https://github.com/jvdmr/mod_evasive/releases/download/2.2.0/libapache2-mod-evasive.deb

it is my example config:

<IfModule mod_evasive.c>
        DOSEnabled true
        DOSHashTableSize 1000
        DOSPageCount 5
        DOSPageInterval 1
        DOSSiteCount 70
        DOSSiteInterval 10
        DOSBlockingPeriod 20
        DOSHTTPStatus 429
</IfModule>

truly i got segfault also when

DOSEnabled false

in above config

I got 500 from awstats

the output is pretty consistend in syslog (example entries):

Sep  4 11:51:31 aaa kernel: [237204.234753] apache2[318991]: segfault at 10 ip 00007f7cf21c04c4 sp 00007fff123c1800 error 4 in mod_evasive.so[7f7cf21bf000+2000]
Sep  4 11:54:27 aaa kernel: [237380.110660] apache2[319369]: segfault at 10 ip 00007f44fea904c4 sp 00007ffc93648290 error 4 in mod_evasive.so[7f44fea8f000+2000]
Sep  4 12:02:35 aaa kernel: [237868.594790] apache2[319959]: segfault at 10 ip 00007f44fea904c4 sp 00007ffc93648290 error 4 in mod_evasive.so[7f44fea8f000+2000]
Sep  4 12:03:54 aaa kernel: [237947.763958] apache2[320335]: segfault at 10 ip 00007f812af694c4 sp 00007ffeec5488e0 error 4 in mod_evasive.so[7f812af68000+2000]

As it seems it is awstats specific as it seems for now.

Any suggestion? Anyone experinced the issue and know how to solve it ?

Thank You in advance Chris

clydzik avatar Sep 04 '25 10:09 clydzik

Hello, I don't use awstats, not even mod_status but with mod_evasive I get a few hundred segfaults per day:

(...)
[Thu Sep 04 13:12:50.323712 2025] [core:notice] [pid 3078918:tid 138829346543488] AH00051: child pid 3097899 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu Sep 04 13:12:51.325690 2025] [core:notice] [pid 3078918:tid 138829346543488] AH00051: child pid 3097796 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu Sep 04 13:13:48.383632 2025] [core:notice] [pid 3078918:tid 138829346543488] AH00051: child pid 3098020 exit signal Segmentation fault (11), possible coredump in /etc/apache2
[Thu Sep 04 13:13:59.394665 2025] [core:notice] [pid 3078918:tid 138829346543488] AH00051: child pid 3097965 exit signal Segmentation fault (11), possible coredump in /etc/apache2

Also, after couple of days Apache would eventually use 100% CPU on all cores and stop responding so I'm using CRON to restart it daily at night as a workaround to avoid this failure.

rozwell avatar Sep 04 '25 11:09 rozwell

Thanks. Yeah. Maybe i was not precise. The problem with an awstats is that it just produce segfault when i want to show statistics with it so when directly calling it to render stats (through url). So it is 100% segfault on every request...

In fact awstas works as cgi script so maybe there is an issue in general with mod_evasive nad cgi ... ?

clydzik avatar Sep 05 '25 12:09 clydzik