Hello,

I have recently install freeradius 2.1.1 on our old RHEL (Red Hat Enterprise Linux ES release 4 (Nahant Update 2), libc-2.3.4) server which already runs multiple radiator instances. The last time I started freeradius was Friday. Since then there are 66 freeradius processes, among them 65 are locked:

# strace -p 7833
Process 7833 attached - interrupt to quit
futex(0x263ecc, FUTEX_WAIT, 2, NULL

I have googled the issue and investigated the gdb backtrace, however the only idea I have right now is to upgrade a system to more recent one (I know, running outdated system is stupid idea, however why we still run it is a long story). As it's not an easy task, I'd like to be sure that the reason is old libraries or stuff like that. I have attached a gdb backtrace, ldd output, freeradius configuration. I am ready to debug a system further and provide more information, if this isn't enough. Any help is appreciated.

Thanks in advace

George Chelidze
# /usr/local/freeradius/etc/raddb/sites-enabled/default
preacct {
    fillrealm
    acct_unique
}

accounting {
    sql
    billing
    detail
}

# /usr/local/freeradius/etc/raddb/modules/acct_unique
acct_unique {
    key = "Calling-Station-Id, Acct-Session-Id, 3GPP2-Correlation-Id"
}

# /usr/local/freeradius/etc/raddb/modules/detail
detail {
    detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d
    detailperm = 0600
}

# /usr/local/freeradius/etc/raddb/modules/exec
exec billing {
    wait = no
    program = "/usr/local/freeradius/scripts/billing.pl"
    input_pairs = request
}

# /usr/local/freeradius/etc/raddb/modules/realm
realm fillrealm {
    format = suffix
    delimiter = "@"
}

# /usr/local/freeradius/etc/raddb/radiusd.conf
...
thread pool {
    start_servers = 5
    max_servers = 32
    min_spare_servers = 3
    max_spare_servers = 10
    max_requests_per_server = 0
}

modules {
    $INCLUDE ${confdir}/modules/
    $INCLUDE sql.conf
}

$INCLUDE sites-enabled/

# /usr/local/freeradius/scripts/billing.pl
#!/usr/bin/perl

use strict;
use POSIX ':sys_wait_h';
require '/usr/local/freeradius/scripts/inc/common.pm';
require '/usr/local/freeradius/scripts/inc/mysql.pm';
require '/usr/local/freeradius/scripts/inc/tibrv.pm';

my $pid = fork();
unless (defined $pid) {
    common::log("Error: top level fork() failed: $!");
    exit(1);
}
# exit in parent, become child of init
exit(0) if ($pid);
# 2nd level fork in child
$pid = fork();
unless (defined $pid) {
    common::log("Error: 2nd level fork() failed: $!");
    exit(1);
}
if ($pid > 0) {
    # wait for child exit code
    waitpid($pid, 0);
    exit(0);
}
# do the main job in 2nd level child
...
#0  0x0087a7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x002103ce in __lll_mutex_lock_wait () from /lib/tls/libc.so.6
#2  0x001b89c9 in _L_mutex_lock_1945 () from /lib/tls/libc.so.6
#3  0xb75f4c32 in ?? ()
#4  0xb75f4718 in ?? ()
#5  0x009017e9 in fr_hash_table_finddata (ht=0xfffffffc, data=0x261ff4) at 
hash.c:491
#6  0x001b69dd in localtime_r () from /lib/tls/libc.so.6
#7  0x00904647 in vp_prints_value (out=0xb75f4c30 "", outlen=1008, vp=0x2103ce, 
delimitst=1) at print.c:267
#8  0x08053a28 in radius_exec_program (cmd=0x8dcae28 
"/usr/local/freeradius/scripts/billing.pl", request=0xb4c00768, exec_wait=0, 
user_msg=0x0, msg_len=0,
    input_pairs=0xb4a03220, output_pairs=0x0, shell_escape=1) at exec.c:330
#9  0x003dae26 in exec_dispatch (instance=0x8dcae00, request=0xb4c00768) at 
rlm_exec.c:315
#10 0x0805bb8c in modcall (component=3, c=0xfffffffc, request=0xb4c00768) at 
modcall.c:285
#11 0x0805a91b in indexed_modcall (comp=3, idx=0, request=0xb4c00768) at 
modules.c:541
#12 0x0805b6b0 in module_accounting (acct_type=0, request=0xb4c00768) at 
modules.c:1221
#13 0x0804dda7 in rad_accounting (request=0xb4c00768) at acct.c:93
#14 0x08065f1f in radius_handle_request (request=0xb4c00768, fun=0x804dd0c 
<rad_accounting>) at event.c:3027
#15 0x0805fc3a in request_handler_thread (arg=0x8dd9060) at threads.c:490
#16 0x00a01341 in start_thread () from /lib/tls/libpthread.so.0
#17 0x002036fe in clone () from /lib/tls/libc.so.6
# ldd /usr/local/freeradius/sbin/radiusd
        libfreeradius-radius-2.1.1.so => 
/usr/local/freeradius/lib/libfreeradius-radius-2.1.1.so (0x00ae6000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00845000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x00709000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x009fc000)
        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x00111000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x009ea000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00c19000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0x00a10000)
        libdl.so.2 => /lib/libdl.so.2 (0x009bf000)
        libssl.so.4 => /lib/libssl.so.4 (0x005d2000)
        libcrypto.so.4 => /lib/libcrypto.so.4 (0x0061e000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00893000)
        /lib/ld-linux.so.2 (0x0087a000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00608000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00730000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x00dea000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x05eca000)
        libz.so.1 => /usr/lib/libz.so.1 (0x0071e000)
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to