|
Here i recompiled ModSec with CFLAGS=-g -O0 |
|
----- |
|
During Nginx restart: |
|
Feb 15 16:32:11 modsec kernel: [ 5009.397974] nginx[14432]: segfault at 7f9a3404f000 ip 00007f6e372d49da sp 00007ffc479cc3e8 error 4 in libc-2.19.so[7f6e3724c000+1ba000] |
|
Feb 15 16:32:11 modsec kernel: [ 5009.421217] nginx[14431]: segfault at 7f9a3404f000 ip 00007f6e372d49da sp 00007ffc479cc4d8 error 4 in libc-2.19.so[7f6e3724c000+1ba000] |
|
|
|
GDb for Process #14431: |
|
(gdb) backtrace full |
|
#0 strlen () at ../sysdeps/x86_64/strlen.S:106 |
|
No locals. |
|
#1 0x00007f6e35c44008 in std::string::compare(char const*) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 |
|
No symbol table info available. |
|
#2 0x00007f6e36d6577c in operator==<char, std::char_traits<char>, std::allocator<char> > (__rhs="/var/log/modsecurity/debug.log", __lhs=<optimized out>) at /usr/include/c++/4.8/bits/basic_string.h:2509 |
|
No locals. |
|
#3 modsecurity::debug_log::DebugLogWriter::find_handler (this=<optimized out>, fileName="/var/log/modsecurity/debug.log") at debug_log/debug_log_writer.cc:37 |
|
current = 0x7f6e38747000 |
|
#4 0x00007f6e36d657c0 in modsecurity::debug_log::DebugLogWriter::close (this=0x7f6e37045c90 <modsecurity::debug_log::DebugLogWriter::getInstance()::instance>, fileName=<error reading variable: Cannot access memory at address 0x7f9a3404f000>) |
|
at debug_log/debug_log_writer.cc:176 |
|
a = 0x1df2a10 |
|
#5 0x00007f6e36d6528e in modsecurity::debug_log::DebugLog::~DebugLog (this=0x1df2a10, __in_chrg=<optimized out>) at debug_log/debug_log.cc:31 |
|
No locals. |
|
#6 0x00007f6e36d65329 in modsecurity::debug_log::DebugLog::~DebugLog (this=0x1df2a10, __in_chrg=<optimized out>) at debug_log/debug_log.cc:32 |
|
No locals. |
|
#7 0x00007f6e36d6162b in ~RulesProperties (this=0x1dfec20, __in_chrg=<optimized out>) at ../headers/modsecurity/rules_properties.h:105 |
|
No locals. |
|
#8 modsecurity::Rules::~Rules (this=0x1dfec20, __in_chrg=<optimized out>) at rules.cc:80 |
|
No locals. |
|
#9 0x00007f6e36d6197e in modsecurity::msc_rules_cleanup (rules=0x1dfec20) at rules.cc:335 |
|
No locals. |
|
#10 0x00007f6e37048cb0 in ngx_http_modsecurity_config_cleanup (data=0x1e05358) at ../ModSecurity-nginx//src/ngx_http_modsecurity_module.c:653 |
|
old_pool = 0x0 |
|
t = 0x1e05358 |
|
#11 0x000000000041603f in ngx_destroy_pool (pool=0x1dc9af0) at src/core/ngx_palloc.c:57 |
|
p = 0x0 |
|
n = 0x1dc9b58 |
|
l = 0x1dcb820 |
|
c = 0x1e053b8 |
|
#12 0x00000000004526b2 in ngx_master_process_exit (cycle=0x1dc9b40) at src/os/unix/ngx_process_cycle.c:720 |
|
i = 85 |
|
#13 0x0000000000450e62 in ngx_master_process_cycle (cycle=0x1dc9b40) at src/os/unix/ngx_process_cycle.c:178 |
|
title = 0x25d0395 "master process /usr/sbin/nginx -c /etc/nginx/nginx.conf" |
|
p = 0x25d03cc "" |
|
size = 56 |
|
i = 3 |
|
n = 0 |
|
sigio = 3 |
|
set = {__val = {0 <repeats 16 times>}} |
|
itv = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 50000}} |
|
live = 0 |
|
delay = 50 |
|
ls = 0x0 |
|
ccf = 0x1dcb820 |
|
#14 0x0000000000412364 in main (argc=3, argv=0x7ffc479ccb38) at src/core/nginx.c:367 |
|
b = 0x7f6e3724fd30 |
|
log = 0x7831a0 <ngx_log> |
|
i = 140111372177536 |
|
cycle = 0x1dc9b40 |
|
init_cycle = {conf_ctx = 0x0, pool = 0x1dc8f80, log = 0x7831a0 <ngx_log>, new_log = {log_level = 0, file = 0x0, connection = 0, disk_full_time = 0, handler = 0x0, data = 0x0, writer = 0x0, wdata = 0x0, action = 0x0, next = 0x0}, log_use_stderr = 0, files = 0x0, |
|
free_connections = 0x0, free_connection_n = 0, modules = 0x0, modules_n = 0, modules_used = 0, reusable_connections_queue = {prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, paths = {elts = 0x0, nelts = 0, size = 0, |
|
nalloc = 0, pool = 0x0}, config_dump = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, shared_memory = {last = 0x0, part = {elts = 0x0, nelts = 0, |
|
next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, connection_n = 0, files_n = 0, connections = 0x0, read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len = 21, data = 0x7ffc479cd90e "ss /usr/sbin/nginx -c /etc/nginx/nginx.conf"}, conf_param = { |
|
len = 0, data = 0x0}, conf_prefix = {len = 11, data = 0x7ffc479cd90e "ss /usr/sbin/nginx -c /etc/nginx/nginx.conf"}, prefix = {len = 11, data = 0x532fe0 "/etc/nginx/"}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}} |
|
cd = 0x7ffc479cc840 |
|
ccf = 0x1dcb820 |
|
|
|
|
|
|
|
GDB For process 14432: |
|
|
|
(gdb) backtrace full |
|
#0 strlen () at ../sysdeps/x86_64/strlen.S:106 |
|
No locals. |
|
#1 0x00007f6e35c44008 in std::string::compare(char const*) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 |
|
No symbol table info available. |
|
#2 0x00007f6e36d6577c in operator==<char, std::char_traits<char>, std::allocator<char> > (__rhs="/var/log/modsecurity/debug.log", __lhs=<optimized out>) at /usr/include/c++/4.8/bits/basic_string.h:2509 |
|
No locals. |
|
#3 modsecurity::debug_log::DebugLogWriter::find_handler (this=<optimized out>, fileName="/var/log/modsecurity/debug.log") at debug_log/debug_log_writer.cc:37 |
|
current = 0x7f6e38747000 |
|
#4 0x00007f6e36d657c0 in modsecurity::debug_log::DebugLogWriter::close (this=0x7f6e37045c90 <modsecurity::debug_log::DebugLogWriter::getInstance()::instance>, fileName=<error reading variable: Cannot access memory at address 0x7f9a3404f000>) |
|
at debug_log/debug_log_writer.cc:176 |
|
a = 0x1df2a10 |
|
#5 0x00007f6e36d6528e in modsecurity::debug_log::DebugLog::~DebugLog (this=0x1df2a10, __in_chrg=<optimized out>) at debug_log/debug_log.cc:31 |
|
No locals. |
|
#6 0x00007f6e36d65329 in modsecurity::debug_log::DebugLog::~DebugLog (this=0x1df2a10, __in_chrg=<optimized out>) at debug_log/debug_log.cc:32 |
|
No locals. |
|
#7 0x00007f6e36d6162b in ~RulesProperties (this=0x1dfec20, __in_chrg=<optimized out>) at ../headers/modsecurity/rules_properties.h:105 |
|
No locals. |
|
#8 modsecurity::Rules::~Rules (this=0x1dfec20, __in_chrg=<optimized out>) at rules.cc:80 |
|
No locals. |
|
#9 0x00007f6e36d6197e in modsecurity::msc_rules_cleanup (rules=0x1dfec20) at rules.cc:335 |
|
No locals. |
|
#10 0x00007f6e37048cb0 in ngx_http_modsecurity_config_cleanup (data=0x1e05358) at ../ModSecurity-nginx//src/ngx_http_modsecurity_module.c:653 |
|
old_pool = 0x0 |
|
t = 0x1e05358 |
|
#11 0x000000000041603f in ngx_destroy_pool (pool=0x1dc9af0) at src/core/ngx_palloc.c:57 |
|
p = 0x0 |
|
n = 0x1dc9b58 |
|
l = 0x1dcb9d0 |
|
c = 0x1e053b8 |
|
#12 0x00000000004533d8 in ngx_worker_process_exit (cycle=0x1dc9b40) at src/os/unix/ngx_process_cycle.c:999 |
|
i = 85 |
|
c = 0x54ae |
|
#13 0x00000000004527fc in ngx_worker_process_cycle (cycle=0x1dc9b40, data=0x0) at src/os/unix/ngx_process_cycle.c:758 |
|
worker = 0 |
|
#14 0x000000000044f000 in ngx_spawn_process (cycle=0x1dc9b40, proc=0x4526bc <ngx_worker_process_cycle>, data=0x0, name=0x537a2b "worker process", respawn=-3) at src/os/unix/ngx_process.c:198 |
|
on = 1 |
|
pid = 0 |
|
s = 0 |
|
#15 0x00000000004515ed in ngx_start_worker_processes (cycle=0x1dc9b40, n=1, type=-3) at src/os/unix/ngx_process_cycle.c:358 |
|
i = 0 |
|
ch = {command = 1, pid = 0, slot = 0, fd = 0} |
|
#16 0x0000000000450ba0 in ngx_master_process_cycle (cycle=0x1dc9b40) at src/os/unix/ngx_process_cycle.c:130 |
|
title = 0x25d0395 "master process /usr/sbin/nginx -c /etc/nginx/nginx.conf" |
|
p = 0x25d03cc "" |
|
size = 56 |
|
i = 3 |
|
n = 0 |
|
sigio = 0 |
|
set = {__val = {0 <repeats 16 times>}} |
|
itv = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {tv_sec = 0, tv_usec = 0}} |
|
live = 0 |
|
delay = 0 |
|
ls = 0x0 |
|
ccf = 0x1dcb820 |
|
#17 0x0000000000412364 in main (argc=3, argv=0x7ffc479ccb38) at src/core/nginx.c:367 |
|
b = 0x7f6e3724fd30 |
|
log = 0x7831a0 <ngx_log> |
|
i = 140111372177536 |
|
cycle = 0x1dc9b40 |
|
init_cycle = {conf_ctx = 0x0, pool = 0x1dc8f80, log = 0x7831a0 <ngx_log>, new_log = {log_level = 0, file = 0x0, connection = 0, disk_full_time = 0, handler = 0x0, data = 0x0, writer = 0x0, wdata = 0x0, action = 0x0, next = 0x0}, log_use_stderr = 0, files = 0x0, |
|
free_connections = 0x0, free_connection_n = 0, modules = 0x0, modules_n = 0, modules_used = 0, reusable_connections_queue = {prev = 0x0, next = 0x0}, listening = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, paths = {elts = 0x0, nelts = 0, size = 0, |
|
nalloc = 0, pool = 0x0}, config_dump = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, shared_memory = {last = 0x0, part = {elts = 0x0, nelts = 0, |
|
next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, connection_n = 0, files_n = 0, connections = 0x0, read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len = 21, data = 0x7ffc479cd90e "ss"}, conf_param = {len = 0, data = 0x0}, conf_prefix = { |
|
len = 11, data = 0x7ffc479cd90e "ss"}, prefix = {len = 11, data = 0x532fe0 "/etc/nginx/"}, lock_file = {len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}} |
|
cd = 0x7ffc479cc840 |
|
ccf = 0x1dcb820 |