[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    RE: problem increasing max_sql_conn (big post)
From:       Edgard Castro <edgard.castro () corp ! ibest ! com ! br>
Date:       2002-01-30 21:33:33
[Download RAW message or body]

Alan,

Here it is, see if it helps...

gdb output:

(gdb) bt
#0  0x40199192 in __libc_recvfrom () from /lib/libc.so.6
#1  0x40053332 in recvfrom (fd=32, buf=0xbfffda10, n=4096, flags=0, addr=
      {__sockaddr__ = 0xbfffea20, __sockaddr_at__ = 0xbfffea20,
__sockaddr_ax25__ = 0xbfffea20, __sockaddr_dl__ = 0xbfffea20,
__sockaddr_eon__ = 0xbfffea20, __sockaddr_in__ = 0xbfffea20,
__sockaddr_in6__ = 0xbfffea20, __sockaddr_inarp__ = 0xbfffea20,
__sockaddr_ipx__ = 0xbfffea20, __sockaddr_iso__ = 0xbfffea20,
__sockaddr_ns__ = 0xbfffea20, __sockaddr_un__ = 0xbfffea20, __sockaddr_x25__
= 0xbfffea20}, addr_len=0xbfffda08) at wrapsyscall.c:202
#2  0x0805a978 in rad_recv ()
#3  0x0804cfdb in main ()
#4  0x400ce306 in __libc_start_main (main=0x804c530 <main>, argc=2,
    ubp_av=0xbffffb94, init=0x804b554 <_init>, fini=0x805f030 <_fini>,
    rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffffb8c)
    at ../sysdeps/generic/libc-start.c:129


radiusd -X output (big):

Starting - reading configuration files ...
reread_config:  reading radiusd.conf
Config:   including file: /etc/raddb/proxy.conf
Config:   including file: /etc/raddb/clients.conf
Config:   including file: /etc/raddb/snmp.conf
Config:   including file: /etc/raddb/sql.conf
 main: prefix = "/usr"
 main: localstatedir = "/var"
 main: logdir = "/var/log/radius"
 main: libdir = "/usr/lib"
 main: radacctdir = "/var/log/radius/radacct"
 main: hostname_lookups = no
read_config_files:  reading dictionary
read_config_files:  reading clients
read_config_files:  reading realms
read_config_files:  reading naslist
 main: max_request_time = 30
 main: cleanup_delay = 5
 main: max_requests = 92160
 main: delete_blocked_requests = 0
 main: port = 1645
 main: allow_core_dumps = no
 main: log_stripped_names = no
 main: log_auth = no
 main: log_auth_badpass = no
 main: log_auth_goodpass = no
 main: pidfile = "/var/run/radiusd.pid"
 main: user = "root"
 main: group = "root"
 main: usercollide = no
 main: lower_user = "no"
 main: lower_pass = "no"
 main: nospace_user = "no"
 main: nospace_pass = "no"
 main: proxy_requests = yes
 proxy: retry_delay = 5
 proxy: retry_count = 3
 proxy: synchronous = no
 proxy: dead_time = 120
 main: debug_level = 0
read_config_files:  entering modules setup
Module: Library search path is /usr/lib
Module: Loaded Pam
 pam: pam_auth = "radius"
Module: Instantiated pam (pam)
Module: Loaded preprocess
 preprocess: huntgroups = "/etc/raddb/huntgroups"
 preprocess: hints = "/etc/raddb/hints"
 preprocess: with_ascend_hack = no
 preprocess: ascend_channels_per_line = 23
 preprocess: with_ntdomain_hack = no
 preprocess: with_specialix_jetstream_hack = no
 preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
 realm: format = "suffix"
 realm: delimiter = "@"
Module: Instantiated realm (suffix)
Module: Loaded files
 files: usersfile = "/etc/raddb/users"
 files: acctusersfile = "/etc/raddb/acct_users"
 files: compat = "no"
Module: Instantiated files (files)
Module: Loaded detail
 detail: detailfile = "/var/log/radius/radacct/%{Client-IP-Address}/detail"
 detail: detailperm = 384
 detail: dirperm = 493
Module: Instantiated detail (detail)
Module: Loaded System
 unix: cache = no
 unix: passwd = "/etc/passwd"
 unix: shadow = "(null)"
 unix: group = "/etc/group"
 unix: radwtmp = "/var/log/radius/radwtmp"
 unix: usegroup = no
 unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded SQL
 sql: driver = "rlm_sql_mysql"
 sql: server = "localhost"
 sql: port = ""
 sql: login = "***hidden***"
 sql: password = "***hidden***"
 sql: radius_db = "radius"
 sql: acct_table = "radacct"
 sql: acct_table2 = "radacct"
 sql: authcheck_table = "radcheck"
 sql: authreply_table = "radreply"
 sql: groupcheck_table = "radgroupcheck"
 sql: groupreply_table = "radgroupreply"
 sql: usergroup_table = "usergroup"
 sql: nas_table = "nas"
 sql: dict_table = "dictionary"
 sql: sqltrace = no
 sql: sqltracefile = "/var/log/radius/sqltrace.sql"
 sql: deletestalesessions = yes
 sql: num_sql_socks = 26
 sql: sql_user_name = "%{User-Name}"
 sql: authorize_check_query = "SELECT id,UserName,Attribute,Value FROM
radcheck WHERE Username = '%{SQL-User-Name}' ORDER BY id"
 sql: authorize_reply_query = "SELECT id,UserName,Attribute,Value FROM
radreply WHERE Username = '%{SQL-User-Name}' ORDER BY id"
 sql: authorize_group_check_query = "SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupche
ck.Value FROM radgroupcheck,usergroup WHERE usergroup.Username =
'%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName ORDER
BY radgroupcheck.id"
 sql: authorize_group_reply_query = "SELECT
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgrouprep
ly.Value FROM radgroupreply,usergroup WHERE usergroup.Username =
'%{SQL-User-Name}' AND usergroup.GroupName = radgroupreply.GroupName ORDER
BY radgroupreply.id"
 sql: authenticate_query = "SELECT Value,Attribute FROM radcheck WHERE
UserName = '%{User-Name}' AND ( Attribute = 'Password' OR Attribute =
'Crypt-Password' ) ORDER BY Attribute DESC"
 sql: accounting_onoff_query = "UPDATE radacct SET AcctStopTime='%S',
AcctSessionTime=unix_timestamp('%S') - unix_timestamp(AcctStartTime),
AcctTerminateCause='%{Acct-Terminate-Cause}', AcctStopDelay =
%{Acct-Delay-Time} WHERE AcctSessionTime=0 AND AcctStopTime=0 AND
NASIPAddress= '%{NAS-IP-Address}' AND AcctStartTime <= '%S'"
 sql: accounting_update_query = "UPDATE radacct SET FramedIPAddress =
'%{Framed-IP-Address}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND
UserName = '%{SQL-User-Name}' AND NASIPAddress= '%{NAS-IP-Address}'"
 sql: accounting_start_query = "INSERT into radacct (RadAcctId,
AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId,
NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('',
'%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}',
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', '%S',
'0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}',
'%{Framed-Protocol}', '%{Framed-IP-Address}', '%{Acct-Delay-Time}', '0')"
 sql: accounting_start_query_alt = "UPDATE radacct SET AcctStartTime = '%S',
AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_start = '%{Connect-Info}'
WHERE AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}'
AND NASIPAddress = '%{NAS-IP-Address}'"
 sql: accounting_stop_query = "UPDATE radacct SET AcctStopTime = '%S',
AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets =
'%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay =
'%{Acct-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE
AcctSessionId = '%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND
NASIPAddress = '%{NAS-IP-Address}'"
 sql: accounting_stop_query_alt = "INSERT into radacct (RadAcctId,
AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId,
NASPortType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('',
'%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}',
'%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port-Id}', '%{NAS-Port-Type}', '0',
'%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', '%{Connect-Info}',
'%{Acct-Input-Octets}', '%{Acct-Output-Octets}', '%{Called-Station-Id}',
'%{Calling-Station-Id}', '%{Acct-Terminate-Cause}', '%{Service-Type}',
'%{Framed-Protocol}', '%{Framed-IP-Address}', '0', '%{Acct-Delay-Time}')"
 sql: connect_failure_retry_delay = 60
rlm_sql: Driver rlm_sql_mysql loaded and linked
rlm_sql: Attempting to connect to radius@localhost:/radius
rlm_sql:  Connected new DB handle, #0
rlm_sql:  Connected new DB handle, #1
rlm_sql:  Connected new DB handle, #2
rlm_sql:  Connected new DB handle, #3
rlm_sql:  Connected new DB handle, #4
rlm_sql:  Connected new DB handle, #5
rlm_sql:  Connected new DB handle, #6
rlm_sql:  Connected new DB handle, #7
rlm_sql:  Connected new DB handle, #8
rlm_sql:  Connected new DB handle, #9
rlm_sql:  Connected new DB handle, #10
rlm_sql:  Connected new DB handle, #11
rlm_sql:  Connected new DB handle, #12
rlm_sql:  Connected new DB handle, #13
rlm_sql:  Connected new DB handle, #14
rlm_sql:  Connected new DB handle, #15
rlm_sql:  Connected new DB handle, #16
rlm_sql:  Connected new DB handle, #17
rlm_sql:  Connected new DB handle, #18
rlm_sql:  Connected new DB handle, #19
rlm_sql:  Connected new DB handle, #20
rlm_sql:  Connected new DB handle, #21
rlm_sql:  Connected new DB handle, #22
rlm_sql:  Connected new DB handle, #23
rlm_sql:  Connected new DB handle, #24
rlm_sql:  Connected new DB handle, #25
Module: Instantiated sql (sql)
Module: Loaded radutmp
 radutmp: filename = "/var/log/radius/radutmp"
 radutmp: username = "%{User-Name}"
 radutmp: perm = 384
 radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Listening on IP address *, ports 1645/udp and 1646/udp, with proxy on
1647/udp.
Ready to process requests.
rad_recv: Accounting-Request packet from host ***hidden***:51699, id=253,
length=250
        Acct-Status-Type = Stop
        NAS-Identifier = "1"
        Attr-172818435 = "00000000000000000000"
        Service-Type = Framed-User
        NAS-Port = 1057
        NAS-Port-Type = Async
        Called-Station-Id = "***hidden***"
        Calling-Station-Id = "***hidden***"
        Acct-Delay-Time = 0
        Framed-IP-Address = ***hidden***
        User-Name = "***hiddenuser***@***hiddenhost***"
        Framed-Protocol = PPP
        Acct-Input-Octets = 52011
        Acct-Output-Octets = 827469
        Acct-Session-Id = "0009858C"
        Acct-Session-Time = 344
        Acct-Input-Packets = 1462
        Acct-Output-Packets = 1874
        Acct-Authentic = RADIUS
        Acct-Link-Count = 1
        Login-IP-Host = 0.0.0.0
        Login-Service = PortMaster
        Login-TCP-Port = 0
        X-Ascend-Modem-PortNo = 17105155
        X-Ascend-Modem-SlotNo = 18
        X-Ascend-Disconnect-Cause = 185
        X-Ascend-Data-Rate = 28800
        X-Ascend-Xmit-Rate = 50667
        X-Ascend-PreSession-Time = 38
modcall: entering group preacct
  modcall[preacct]: module "suffix" returns ok
  modcall[preacct]: module "files" returns noop
  modcall[preacct]: module "preprocess" returns noop
modcall: group preacct returns ok
modcall: entering group accounting
radius_xlat:  '/var/log/radius/radacct/***hidden***/detail'
rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail expands to
/var/log/radius/radacct/***hidden***/detail
  modcall[accounting]: module "detail" returns ok
  modcall[accounting]: module "unix" returns ok
rlm_sql: Reserving sql socket id: 25
radius_xlat:  '***hiddenuser***@***hiddenhost***'
sql_escape in:  '***hiddenuser***@***hiddenhost***'
sql_escape out:  '***hiddenuser***@***hiddenhost***'
sql_set_user:  escaped user --> '***hiddenuser***@***hiddenhost***'
radius_xlat:  'UPDATE radacct SET AcctStopTime = '2002-01-30 20:21:18',
AcctSessionTime = '344', AcctInputOctets = '52011', AcctOutputOctets =
'827469', AcctTerminateCause = '', AcctStopDelay = '0', ConnectInfo_stop =
'' WHERE AcctSessionId = '0009858C' AND UserName =
'***hiddenuser***@***hiddenhost***' AND NASIPAddress = '***hidden***''
MASTER: exit on signal (2)

Phew....

Regards,
Ed Castro

> -----Original Message-----
> From: aland@striker.ottawa.on.ca [mailto:aland@striker.ottawa.on.ca]
> Sent: Wednesday, January 30, 2002 3:17 PM
> To: freeradius-users@lists.cistron.nl
> Subject: Re: problem increasing max_sql_conn 
> 
> 
> rmosley@murgent.com wrote:
> > I'm getting the exact same result here using PostreSQL.
> 
>   Arg...
> 
>   Then it's probably a bug in the SQL module: rlm_sql.c, or sql.c.  It
> isn't likely to be in the server, as the server does SQL, and it isn't
> likely to be the *same* bu in two different back-end drivers.
> 
> 
>   If you can start up the server under 'gdb', you can stop it when it
> locks, and see if you can find out where it's looping.
> 
>   That may highlight a block, or an infinite loop in the server.
> 
>   Alan DeKok.
> 
> - 
> List info/subscribe/unsubscribe? See 
http://www.freeradius.org/list/users.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic