Apache dumps core (signal 11) with mod_auth_openid
Opened this issue · 3 comments
Sometimes apache seems to die on signal 11 when using mod_auth_openid. The crash occurs when login form is submitted.
I managed to get a core dump of it, gdb shows following stack trace:
#0 0x29127e3d in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
New Thread 28501140 (LWP 100085) bt
#0 0x29127e3d in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
#1 0x287a6338 in modauthopenid::MoidConsumer::find_assoc ()
from /usr/local/libexec/apache22/mod_auth_openid.so
#2 0x287f984e in opkele::basic_RP::checkid_ ()
from /usr/local/lib/libopkele.so.3
#3 0x287a0fa2 in start_authentication_session ()
from /usr/local/libexec/apache22/mod_auth_openid.so
#4 0x287a2c09 in mod_authopenid_method_handler ()
from /usr/local/libexec/apache22/mod_auth_openid.so
#5 0x080723b9 in ap_run_check_user_id (r=0x2a441058) at request.c:70
#6 0x08074479 in ap_process_request_internal (r=0x2a441058) at request.c:214
#7 0x080851e0 in ap_process_request (r=0x2a441058) at http_request.c:280
#8 0x0808230b in ap_process_http_connection (c=0x2a42f1f0) at http_core.c:190
#9 0x0807e0f9 in ap_run_process_connection (c=0x2a42f1f0) at connection.c:43
#10 0x0808a221 in child_main (child_num_arg=Variable "child_num_arg" is not available.
) at prefork.c:667
#11 0x0808a507 in make_child (s=0x28510f10, slot=2) at prefork.c:768
#12 0x0808a5c4 in startup_children (number_to_start=3) at prefork.c:786
#13 0x0808b1a5 in ap_mpm_run (_pconf=0x2850f018, plog=0x2853d018, s=0x28510f10)
at prefork.c:1007
#14 0x08064276 in main (argc=676384792, argv=0x2a42d018) at main.c:739
This is apache 2.2.21 and mod_auth_openid 0.6. libopkele is 2.0.2.
OS is FreeBSD 8.2.
--
Ari S.
I had a segfaulting apache today after installing mod-auth-openid-0.6. I straced it and discovered that sqllite was attempting to create more files than just the one file referenced in OpenIDDBLocation. Since I don't have that in a directory that the apache user can write to, it failed and segfaulted. The solution for me was to create a directory that the www-data user can write to, put the Location file in that directory, and then allow it to create/delete files to its heart's content. No more segfault, although now I'm chasing the "Error in authentication: openid.modauthopenid.nonce: no such field" issue.
Please give this a try and if it solves the problem, close the issue.
I don't have OpenIDDBLocation set at all, so it defaults to /tmp/mod_auth_openid.db. /tmp is writable to anyone.
So this must be something different.
Here's what I did to help narrow down the problem:
- Set Apache to only start one process:
StartServers 1
MinSpareServers 1
MaxSpareServers 1
- There will be two processes running (one parent and one child). Strace the child (the one with the higher PID):
# ps ax | fgrep apache
15674 ? Ss 0:00 /usr/sbin/apache2 -k start
15676 ? S 0:00 /usr/sbin/apache2 -k start
# strace -p 15676 -f 2>&1 > /var/tmp/strace.out
- Look in strace.out for where Apache bails at the end. Look for things that are obvious, like permission denied trying to open a file, missing directory, something that might be an easy fix. Apache doesn't handle ungraceful exiting of loaded modules well, so hopefully you'll find something that mod_auth_openid is looking for and can't find.