https://issues.apache.org/bugzilla/show_bug.cgi?id=50024
Summary: Mod_cache/mod_mem_cache and mod_security combination
bug
Product: Apache httpd-2
Version: 2.2.16
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: mod_cache
AssignedTo: [email protected]
ReportedBy: [email protected]
When using mod_cache/mod_mem_cache and the latest mod_security (2.5.12), a
strange bug appears, that can be linked to the following entry in the error:
[Wed Sep 29 13:22:19 2010] [error] (103)Software caused connection abort:
cache: error returned while trying to return mem cached data
This error message can be triggered as follows:
$> curl --max-time 1 --limit-rate 100 http://127.0.0.1:8000/1MB
In standard use, the bug appears in about once in 1000 requests and results in
a blank http response that leads to a blank page in the browser.
Reproducing the bug and triggering via curl:
============================================
$> ./configure --prefix=/data/folinic/apache/apache-2.2.16 \
--enable-mods-shared=all --enable-cache --enable-mem-cache \
--with-included-apr
$> httpd -V
Server version: Apache/2.2.16 (Unix)
Server built: Sep 29 2010 14:00:03
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/data/folinic/apache/apache-2.2.16"
-D SUEXEC_BIN="/data/folinic/apache/apache-2.2.16/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
$> httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
$> uname -a
Linux xxxxxx 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64 GNU/Linu
ModSecurity:
./configure --with-apxs=/data/folinic/apache/apache-2.2.16/bin/apxs \
--with-apu=/data/folinic/apache/apache-2.2.16/bin/apu-1-confi
Minimal Apache config:
ServerName www.example.com
ServerRoot /data/folinic/apache/apache-2.2.15
PidFile /tmp/httpd.pid
Listen 127.0.0.1:8000
LoadModule log_config_module modules/mod_log_config.so
LoadModule security2_module modules/mod_security2.so
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule unique_id_module modules/mod_unique_id.so
ErrorLog /tmp/error.log
DocumentRoot "/tmp"
SecRuleEngine On
MCacheSize 10000000
MCacheMinObjectSize 1
MCacheMaxObjectSize 2000000
CacheEnable mem
Start the server:
$> /data/folinic/apache/apache-2.2.16/bin/httpd -X -k start \
-f /data/folinic/apache/apache-2.2.16/conf/httpd-minimal.conf
Generate the test file:
$> dd if=/dev/zero of=/tmp/1MB bs=1024 count=1000
Trigger the error log entry:
$> curl --max-time 1 --limit-rate 100 http://127.0.0.1:8000/1MB
NOTE that the error does only appear starting with the 2nd curl call.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]