It appears that mod_auth_kerb isn't thread safe as segfaults happen when
using apache's worker MPM, but not with the prefork MPM. I've verified
this on Solaris 10, RHEL 5 and RHEL 4. Additionally I've seen postings by
other people which note the same.
Any chance mod_auth_kerb could be updated to be thread safe? It's the only
module I have on any of my webservers that requires prefork, so it actually
hinders performance quite a bit.
It's pretty easy to show the problem, just setup mod_auth_kerb to protect a
directory, then use apache ab to generate a lot of connections to make the
errors happen faster:
ab -n 1000 -c 1000 -A username:password http://localhost/test
Here are some entries from error_log on RHEL5 (on Solaris obviously the
extra glibc debugging info doesn't show up):
[Sat May 24 14:39:11 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8
OpenSSL/0.9.8g mod_auth_kerb/5.3 configured -- resuming normal operations
httpd: cc_memory.c:210: krb5_mcc_destroy: Assertion
`(&(&(&d->lock)->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED'
failed.
[Sat May 24 14:40:22 2008] [notice] child pid 26529 exit signal Aborted
(6)
[Sat May 24 14:40:58 2008] [error] server reached MaxClients setting,
consider raising the MaxClients setting
[Sat May 24 14:40:59 2008] [notice] child pid 26503 exit signal
Segmentation fault (11)
[Sat May 24 14:41:02 2008] [notice] child pid 26501 exit signal
Segmentation fault (11)
[Sat May 24 14:41:03 2008] [notice] child pid 26733 exit signal
Segmentation fault (11)
*** glibc detected *** /bin/httpd: double free or corruption (fasttop):
0x9570ddf8 ***
======= Backtrace: =========
/lib/libc.so.6[0x1aeb16]
/lib/libc.so.6(cfree+0x90)[0x1b2030]
/lib/libkrb5.so.3(krb5_free_principal+0x85)[0x30d225]
/lib/libkrb5.so.3[0x2f1d42]
/lib/libkrb5.so.3[0x2f25fd]
/lib/libkrb5.so.3(krb5_cc_destroy+0x19)[0x2f83c9]
/modules/mod_auth_kerb.so[0xf33061]
/modules/mod_auth_kerb.so[0xf3464d]
/bin/httpd(ap_run_check_user_id+0x46)[0x807907b]
/bin/httpd(ap_process_request_internal+0x319)[0x8079b01]
/bin/httpd(ap_process_request+0x4f)[0x80ab128]
/bin/httpd[0x80a7c03]
/bin/httpd(ap_run_process_connection+0x46)[0x80872d3]
/bin/httpd(ap_process_connection+0x58)[0x80876e6]
/bin/httpd[0x80c719c]
/bin/httpd[0x80c7a79]
/lib/libapr-1.so.0[0x6b57b4]
/lib/libpthread.so.0[0x91345b]
/lib/libc.so.6(clone+0x5e)[0x216c4e]
======= Memory map: ========
*** glibc detected *** /bin/httpd: double free or corruption (fasttop):
0x95700668 ***
======= Backtrace: =========
/lib/libc.so.6[0x1aeb16]
/lib/libc.so.6(cfree+0x90)[0x1b2030]
/lib/libkrb5.so.3(krb5_free_principal+0x60)[0x30d200]
/lib/libkrb5.so.3[0x2f1d42]
/lib/libkrb5.so.3[0x2f1d79]
/lib/libkrb5.so.3(krb5_cc_initialize+0x20)[0x2f83a0]
/modules/mod_auth_kerb.so[0xf32386]
/modules/mod_auth_kerb.so[0xf32e00]
/modules/mod_auth_kerb.so[0xf3464d]
/bin/httpd(ap_run_check_user_id+0x46)[0x807907b]
/bin/httpd(ap_process_request_internal+0x319)[0x8079b01]
/bin/httpd(ap_process_request+0x4f)[0x80ab128]
/bin/httpd[0x80a7c03]
/bin/httpd(ap_run_process_connection+0x46)[0x80872d3]
/bin/httpd(ap_process_connection+0x58)[0x80876e6]
/bin/httpd[0x80c719c]
/bin/httpd[0x80c7a79]
/lib/libapr-1.so.0[0x6b57b4]
/lib/libpthread.so.0[0x91345b]
/lib/libc.so.6(clone+0x5e)[0x216c4e]
======= Memory map: ========
[Sat May 24 14:41:06 2008] [notice] child pid 26827 exit signal Aborted
(6)
[Sat May 24 14:41:06 2008] [notice] child pid 26961 exit signal Aborted
(6)
*** glibc detected *** /bin/httpd: double free or corruption (fasttop):
0x94d09458 ***
======= Backtrace: =========
/lib/libc.so.6[0x1aeb16]
/lib/libc.so.6(cfree+0x90)[0x1b2030]
/lib/libkrb5.so.3(krb5_free_principal+0x85)[0x30d225]
/lib/libkrb5.so.3[0x2f1d42]
/lib/libkrb5.so.3[0x2f25fd]
/lib/libkrb5.so.3(krb5_cc_destroy+0x19)[0x2f83c9]
/modules/mod_auth_kerb.so[0xf33061]
/modules/mod_auth_kerb.so[0xf3464d]
/bin/httpd(ap_run_check_user_id+0x46)[0x807907b]
/bin/httpd(ap_process_request_internal+0x319)[0x8079b01]
/bin/httpd(ap_process_request+0x4f)[0x80ab128]
/bin/httpd[0x80a7c03]
/bin/httpd(ap_run_process_connection+0x46)[0x80872d3]
/bin/httpd(ap_process_connection+0x58)[0x80876e6]
/bin/httpd[0x80c719c]
/bin/httpd[0x80c7a79]
/lib/libapr-1.so.0[0x6b57b4]
/lib/libpthread.so.0[0x91345b]
/lib/libc.so.6(clone+0x5e)[0x216c4e]
======= Memory map: ========
[Sat May 24 14:41:07 2008] [notice] child pid 26894 exit signal
Segmentation fault (11)
[Sat May 24 14:41:07 2008] [notice] child pid 27028 exit signal Aborted
(6)
[Sat May 24 14:41:14 2008] [notice] child pid 27162 exit signal
Segmentation fault (11)
[Sat May 24 14:41:14 2008] [notice] child pid 27164 exit signal
Segmentation fault (11)
Nobody/Anonymous ( nobody ) - 2008-05-24 21:52
5
Closed
Fixed
Matej Pristak
mod_auth_kerb
Version 5.*
Public
|
Date: 2008-10-04 08:58 fixed in 1.142, thanks for comments |
|
Date: 2008-09-08 15:02
|
|
Date: 2008-09-08 08:45
|
|
Date: 2008-09-06 00:10
|
|
Date: 2008-09-05 15:56
|
|
Date: 2008-09-05 12:13
|
|
Date: 2008-09-01 07:59
|
|
Date: 2008-08-27 01:08
|
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-10-04 08:58 | baalberith |
| resolution_id | None | 2008-10-04 08:58 | baalberith |
| close_date | - | 2008-10-04 08:58 | baalberith |
| assigned_to | nobody | 2008-09-05 12:13 | kouril |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use