freeradius hangs, using 98% CPU

George C. Kaplan gckaplan at ack.berkeley.edu
Wed Mar 8 18:23:06 CET 2006


For some time we've had an intermittent problem where freeradius becomes
unresponsive, consuming at least 98% of the CPU.  A 'kill -TERM' will
sometimes kill the daemon, but usually a 'kill -9' is needed.  This
always seems to happen right about when we reload the config (with a
HUP), or stop and restart the daemon.  We're using freeradius 1.0.5 on
FreeBSD 5.5-PRERELEASE, but we also saw this problem with FR 1.0.1 on
FreeBSD 5.3 and 5.4.

We recently added an authorization step (using LDAP and perl) to our
Kerberos-authenticated wireless service, and this might offer some clues
about the timing of the problem.  A sample from our radius.log is
attached.  At 14:12:04, two users (user1 and user2) connect at about the
same time, are authorized by rlm_perl, and then authenticated with
Kerberos.  Then, at 14:12:06, user3 connects just as the daemon gets the
HUP signal.  User3 is authorized, but never gets authenticated; the
daemon reloads, but is unresponsive until I kill and restart it at 14:30:01

I'm guessing that the daemon can hang if it gets a signal just as the
rlm_krb5 module is called.  It's marked RLM_TYPE_THREAD_UNSAFE, so it
gets a mutex, and attaching gdb to the hung daemon showed:

[Switching to LWP 100171] 0x28205940 in pthread_mutexattr_init () from
/usr/lib/libpthread.so.1
(gdb) where
#0  0x28205940 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1

Is anyone aware of any freeradius thread problems (especially related to
the FreeBSD thread libraries) that might explain this?  Any suggestions
for avoiding the problem or tracking it down in more detail?

Thanks,

-- 
George C. Kaplan                            gckaplan at ack.berkeley.edu
Communication & Network Services            510-643-0496
University of California at Berkeley
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: radius.log.sample
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20060308/c774e676/attachment.ksh>


More information about the Freeradius-Users mailing list