mod_session Segfault under load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have been using mod_session_dbd along with mod_auth_form for a little while now but have run into some issues. We first encountered some segfaults related to the dbd_remove method [1] which I'm patched around but now we have a problem with segfaults coming from encoding the session but only under load. Here is the backtrace of the segfault

[Thu Aug  2 20:37:18 2012] pid 18944 mod_backtrace backtrace for sig 11 (thread "pid" 18944)
[Thu Aug  2 20:37:18 2012] pid 18944 mod_backtrace main() is at 428ef5
/opt/p141/apache-httpd/modules/mod_backtrace.so(+0xcd8)[0x7f34f19a0cd8]
/opt/p141/apache-httpd/bin/httpd(ap_run_fatal_exception+0x5b)[0x430fa2]
/opt/p141/apache-httpd/bin/httpd[0x461352]
/opt/p141/apache-httpd/bin/httpd[0x46138c]
/lib64/libpthread.so.0(+0xf500)[0x7f34f785d500]
/opt/p141/apache-httpd/lib/libapr-1.so.0(apr_pvsprintf+0x26)[0x7f34f7ec2df6]
/opt/p141/apache-httpd/lib/libapr-1.so.0(apr_psprintf+0x88)[0x7f34f7ec30d8]
/opt/p141/apache-httpd/modules/mod_session.so(+0x27ca)[0x7f34f1fab7ca]
/opt/p141/apache-httpd/modules/mod_session.so(ap_run_session_encode+0x66)[0x7f34f1faabda]
/opt/p141/apache-httpd/modules/mod_session.so(+0x23f9)[0x7f34f1fab3f9]
/opt/p141/apache-httpd/modules/mod_session.so(+0x2b6d)[0x7f34f1fabb6d]
/opt/p141/apache-httpd/bin/httpd(ap_pass_brigade+0xbc)[0x433e3c]
/opt/p141/apache-httpd/modules/mod_substitute.so(+0x278a)[0x7f34f29c178a]
/opt/p141/apache-httpd/modules/mod_filter.so(+0x1ea1)[0x7f34f5c3cea1]
/opt/p141/apache-httpd/bin/httpd(ap_pass_brigade+0xbc)[0x433e3c]
/opt/p141/apache-httpd/modules/mod_proxy_http.so(+0x850f)[0x7f34f3be250f]
/opt/p141/apache-httpd/modules/mod_proxy_http.so(+0x8fbc)[0x7f34f3be2fbc]
/opt/p141/apache-httpd/modules/mod_proxy.so(proxy_run_scheme_handler+0x91)[0x7f34f3ff596e]
/opt/p141/apache-httpd/modules/mod_proxy.so(+0x7f7e)[0x7f34f3ff0f7e]
/opt/p141/apache-httpd/bin/httpd(ap_run_handler+0x5b)[0x4504f7]
[Thu Aug  2 20:37:18 2012] pid 18944 mod_backtrace end of backtrace
[Thu Aug 02 20:37:19.600658 2012] [core:notice] [pid 18737:tid 139865485776640] AH00052: child pid 18944 exit signal Segmentation fault (11)

I looks like the line of code in mod_session.c that is leading to the problem is line 333. If I set MaxSessionAge to 0 the problem goes away.

    if (z->expiry) {

--->    char *expiry = apr_psprintf(z->pool, "%" APR_INT64_T_FMT, z->expiry);

        apr_table_setn(z->entries, SESSION_EXPIRY, expiry);

    }

I'm not a great C coder so my ability to debug is limited. I also can't get apache to write a coredump even though I've followed the instructions. We are using Apache HTTPD 2.4.2 on Linux (CentOS) and OS X, both showing the same problem. 

Thanks,
Chris


[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=53452

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux