SQL inserts for accounting data
Russell McConnachie
russell at blackops.unixtoys.ca
Tue Jan 23 03:53:02 CET 2007
Hello,
I am having a problem with my accounting section of my radiusd.conf
configuration file. It seems if I have more than one directive such as
'sql' and then a second sql insert of accouting data called
'acme-packets' it caused the radiusd daemon to crash with a glibc
pointer error.
radiusd[26843]: segfault at 00000000000000b0 rip 00000032fa747edd rsp
0000000051818be0 error 4
radiusd[27894]: segfault at 0000000000000000 rip 00000032fa743550 rsp
000000005e02ccf0 error 4
radiusd[27917] trap invalid operand rip:38fd5306c8 rsp:409fc298 error:0
radiusd[28224]: segfault at 00000000000000b0 rip 00000032fa747edd rsp
0000000043c02be0 error 4
radiusd[28257]: segfault at 00000000000000b0 rip 00000032fa747edd rsp
0000000045004be0 error 4
radiusd[28285]: segfault at 0000000000000294 rip 00000032fa744f10 rsp
00000000413fecf8 error 4
-- CUT --
#
# Log traffic to an SQL database.
#
# See "Accounting queries" in sql.conf
# Temporary commented out because it is causing problems, it
# seems
# there can only be one instance of a SQL query/update per
# "action".
# action: (authentication, accounting, pre-processing....)
sql
# Cisco VoIP specific bulk accounting
# pgsql-voip
# Acme Packets bulk accounting
acme-packets
-- CUT --
sql acme-packets {
...
accounting_start_query = "INSERT INTO
radsbcacct_start(acct_status_type, nas_ip_address, nas_port, acct_session_id, \
acme_session_ingress_callid, acme_session_egress_callid, acme_session_protocol_type, \
calling_station_id, called_station_id, h323_setup_time, h323_connect_time, \
acme_session_egress_realm, acme_session_ingress_realm, acme_flowid_fs1_f, \
acme_flowtype_fs1_f, acme_flow_in_realm_fs1_f, acme_flow_in_src_addr_fs1_f, \
acme_flow_in_src_port_fs1_f, acme_flow_in_dst_addr_fs1_f, acme_flow_in_dst_port_fs1_f, \
acme_flow_out_realm_fs1_f, acme_flow_out_src_addr_fs1_f, acme_flow_out_src_port_fs1_f, \
acme_flow_out_dst_addr_fs1_f, acme_flow_out_dst_port_fs1_f, \
acme_flowid_fs2_f, acme_flowtype_fs2_f, acme_flow_in_realm_fs2_f, acme_flow_in_src_addr_fs2_f, \
acme_flow_in_src_port_fs2_f, acme_flow_in_dst_addr_fs2_f, acme_flow_in_dst_port_fs2_f, \
acme_flow_out_realm_fs2_f, acme_flow_out_src_addr_fs2_f, acme_flow_out_src_port_fs2_f, \
acme_flow_out_dst_addr_fs2_f, acme_flow_out_dst_port_fs2_f, client_ip_address, \
acct_unique_session_id) VALUES \
('%{Acct-Status-Type}', '%{NAS-IP-Address}', %{NAS-Port},
'%{Acct-Session-Id}', '%{Acme-Session-Ingress-CallId}',
'%{Acme-Session-Egress-CallId}', '%{Acme-Session-Protocol-Type}',
'%{Calling-Station-Id}', '%{Called-Station-Id}', '%{h323-setup-time}',
'%{h323-connect-time}', '%{Acme-Session-Egress-Realm}',
'%{Acme-Session-Ingress-Realm}', '%{Acme-FlowID_FS1_F}',
'%{Acme-FlowType_FS1_F}', '%{Acme-Flow-In-Realm_FS1_F}',
'%{Acme-Flow-In-Src-Addr_FS1_F}', %{Acme-Flow-In-Src-Port_FS1_F},
'%{Acme-Flow-In-Dst-Addr_FS1_F}', %{Acme-Flow-In-Dst-Port_FS1_F},
'%{Acme-Flow-Out-Realm_FS1_F}', '%{Acme-Flow-Out-Src-Addr_FS1_F}',
%{Acme-Flow-Out-Src-Port_FS1_F}, '%{Acme-Flow-Out-Dst-Addr_FS1_F}',
%%{Acme-Flow-Out-Dst-Port_FS1_F}, '%{Acme-FlowID_FS1_F}',
%'%{Acme-FlowType_FS1_F}', '%{Acme-Flow-In-Realm_FS1_F}',
%'%{Acme-Flow-In-Src-Addr_FS1_F}', %{Acme-Flow-In-Src-Port_FS1_F},
%'%{Acme-Flow-In-Dst-Addr_FS1_F}', %{Acme-Flow-In-Dst-Port_FS1_F},
%'%{Acme-Flow-Out-Realm_FS1_F}', '%{Acme-Flow-Out-Src-Addr_FS1_F}',
%%{Acme-Flow-Out-Src-Port_FS1_F}, '%{Acme-Flow-Out-Dst-Addr_FS1_F}',
%%{Acme-Flow-Out-Dst-Port_FS1_F}, '%{Client-IP-Address}',
%'%{Acct-Unique-Session-Id}')"
...
}
I know it is a huge query, but is it all of the accounting information
which is sent to us by our SBC
When both of these inserts are enabled I get a glibc pointer exception
error. I am unable to regenerate the error right now being not many
calls are being made and its not flooding the radius server with
requests.
More information about the Freeradius-Devel
mailing list