OK, it seems bugs.freeradius.org is experiencing problems.
I submit the bug here with the corresponding debugging outputs. When
the problems are restored, I will submit it in bugs also...

Short Description:
Freeradius crashes upon oracle errors in accounting queries

Way to reproduce:
Run radiusd -X and from a shell

for ((i=0;$i<30; i=$i+1)); do radclient -d ~/freeradius/BUILD/etc/raddb/ -f testacct 
localhost acct testing123; sleep 2; done

testacct file:
User-Name = kzorbatest
Acct-Session-Id = 123456789009876543211234567890ABCDEFGHI
NAS-IP-Address = 62.103.3.155
Acct-Status-Type = Start

(very big Acct-Session-Id will cause oracle error (ORA-01401: inserted
value too large for column)


Environment:
Solaris 8, gcc 2.95.3, Oracle 8.1.7

Attached are the outputs of 
gdb <executable> <core> with the bt and also output of truss

Kostas
 
-- 
  Kostas Zorbadelos
  Systems Developer, Otenet SA 
  mailto: [EMAIL PROTECTED]
  
  Out there in the darkness, out there in the night
  out there in the starlight, one soul burns brighter
  than a thousand suns.

[EMAIL PROTECTED]:~->gdb /space/radius/freeradius/BUILD/sbin/radiusd ./core 
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...(no debugging symbols found)...
Core was generated by `radiusd -X'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib/libcrypt_i.so.1...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libcrypt_i.so.1
Reading symbols from /space/radius/freeradius/BUILD/lib/libradius-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius/BUILD/lib/libradius-1.0.0.so
Reading symbols from /space/radius/freeradius/BUILD/lib/libltdl.so.3...done.
Loaded symbols for /space/radius/freeradius/BUILD/lib/libltdl.so.3
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libgen.so.1...done.
Loaded symbols for /usr/lib/libgen.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
Reading symbols from /usr/lib/nss_files.so.1...done.
Loaded symbols for /usr/lib/nss_files.so.1
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_exec-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_exec-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_expr-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_expr-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_pap-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_pap-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_chap-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_chap-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_mschap-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_mschap-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_unix-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_unix-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_md5-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_md5-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_leap-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_leap-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_gtc-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_gtc-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_mschapv2-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_eap_mschapv2-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_preprocess-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_preprocess-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_realm-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_realm-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_files-1.0.0.so...
---Type <return> to continue, or q <return> to quit---
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_files-1.0.0.so
Reading symbols from /space/radius/freeradius-1.0.0/BUILD/lib/rlm_sql-1.0.0.so...
done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_sql-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_sql_oracle-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_sql_oracle-1.0.0.so
Reading symbols from /app/oracle/product/8.1.X/lib/libclntsh.so.8.0...done.
Loaded symbols for /app/oracle/product/8.1.X/lib/libclntsh.so.8.0
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /app/oracle/product/8.1.X/lib/libwtc8.so...done.
Loaded symbols for /app/oracle/product/8.1.X/lib/libwtc8.so
Reading symbols from /usr/lib/libsched.so.1...done.
Loaded symbols for /usr/lib/libsched.so.1
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_acct_unique-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_acct_unique-1.0.0.so
Reading symbols from 
/space/radius/freeradius-1.0.0/BUILD/lib/rlm_detail-1.0.0.so...done.
Loaded symbols for /space/radius/freeradius-1.0.0/BUILD/lib/rlm_detail-1.0.0.so
#0  0xff0c1ee8 in _malloc_unlocked () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff0c1ee8 in _malloc_unlocked () from /usr/lib/libc.so.1
#1  0xff0c1cb8 in malloc () from /usr/lib/libc.so.1
#2  0xff355cc8 in rad_recv (fd=85) at radius.c:1125
(gdb) 

...

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, CiscoServiceInfo) values('', 
'123456789009876543211234567890ABCDEFGHI', 'f70deee8d39b2e33', 'kzorbatest', '', 
'62.103.3.155', '', '', TO_DATE('2004-09-03 15:56:33','yyyy-mm-dd hh24:mi:ss'), NULL, 
'0', '', '', '', '0', '0', '', '', '', '', '', '', '', '0', '')
write(1, " I N S E R T   i n t o  ".., 641)     = 641
write(9, "03\f\0\006\0\0\0\0\011 k".., 780)     = 780
read(9, "\0\v\0\0\f\0\0\001\001\0".., 2064)     = 22
write(9, "\0\v\0\0\f\0\0\001\002", 11)          = 11
read(9, "\094\0\006\0\0\0\0\00401".., 2064)     = 148
time()                                          = 1094216193
rlm_sql_oracle: execute query failed in sql_query: ORA-01401: inserted value too large 
for column 
write(1, " r l m _ s q l _ o r a c".., 99)      = 99
time()                                          = 1094216193
rlm_sql (sql1): failed after re-connect
write(1, " r l m _ s q l   ( s q l".., 40)      = 40
time()                                          = 1094216193
rlm_sql (sql1): Couldn't insert SQL accounting START record - ORA-01401: inserted 
value too large for column 
write(1, " r l m _ s q l   ( s q l".., 110)     = 110
time()                                          = 1094216193
radius_xlat:  'UPDATE radacct SET AcctStartTime = TO_DATE('2004-09-03 
15:56:33','yyyy-mm-dd hh24:mi:ss'), AcctStartDelay = '', ConnectInfo_start = '' WHERE 
AcctSessionId = '123456789009876543211234567890ABCDEFGHI' AND UserName = 'kzorbatest' 
AND NASIPAddress = '62.103.3.155' AND AcctStopTime IS NULL'
write(1, " r a d i u s _ x l a t :".., 302)     = 302
time()                                          = 1094216193
radius_xlat:  '/space/radius/freeradius-1.0.0/BUILD/var/log/radius/sqltrace.sql'
write(1, " r a d i u s _ x l a t :".., 81)      = 81
open("/space/radius/freeradius-1.0.0/BUILD/var/log/radius/sqltrace.sql", 
O_WRONLY|O_APPEND|O_CREAT, 0666) = 10
llseek(10, 0, SEEK_END)                         = 128550
fcntl(10, F_SETLKW, 0xFFBEA204)                 = 0
fstat64(10, 0xFFBEA140)                         = 0
ioctl(10, TCGETA, 0xFFBEA0CC)                   Err#25 ENOTTY
write(10, " U P D A T E   r a d a c".., 287)    = 287
close(10)                                       = 0
time()                                          = 1094216193
UPDATE radacct SET AcctStartTime = TO_DATE('2004-09-03 15:56:33','yyyy-mm-dd 
hh24:mi:ss'), AcctStartDelay = '', ConnectInfo_start = '' WHERE AcctSessionId = 
'123456789009876543211234567890ABCDEFGHI' AND UserName = 'kzorbatest' AND NASIPAddress 
= '62.103.3.155' AND AcctStopTime IS NULL
write(1, " U P D A T E   r a d a c".., 286)     = 286
write(9, "019A\0\006\0\0\0\0\003 ^".., 410)     = 410
read(9, "\0A1\0\006\0\0\0\0\0\b\0".., 2064)     = 161
write(9, "\0 9\0\006\0\0\0\0\003 h".., 57)      = 57
read(9, "\010\0\006\0\0\0\0\0\b\0".., 2064)     = 16
time()                                          = 1094216193
rlm_sql (sql1): Released sql socket id: 2
write(1, " r l m _ s q l   ( s q l".., 42)      = 42
time()                                          = 1094216193
  modcall[accounting]: module "sql1" returns ok for request 15
write(1, "     m o d c a l l [ a c".., 63)      = 63
time()                                          = 1094216193
modcall: group Acct-Type returns ok for request 15
write(1, " m o d c a l l :   g r o".., 51)      = 51
Sending Accounting-Response of id 88 to 127.0.0.1:37190
write(1, " S e n d i n g   A c c o".., 56)      = 56
sendto(5, "05 X\014 P GCFA6 w83 :12".., 20, 0, 0xFFBEE7A0, 16) = 20
time()                                          = 1094216193
Finished request 15
write(1, " F i n i s h e d   r e q".., 20)      = 20
time()                                          = 1094216193
Going to the next request
write(1, " G o i n g   t o   t h e".., 26)      = 26
time()                                          = 1094216193
--- Walking the entire request list ---
write(1, " - - -   W a l k i n g  ".., 40)      = 40
time()                                          = 1094216193
Cleaning up request 15 ID 88 with timestamp 41386a01
write(1, " C l e a n i n g   u p  ".., 53)      = 53
time()                                          = 1094216193
Nothing to do.  Sleeping until we see a request.
write(1, " N o t h i n g   t o   d".., 49)      = 49
poll(0xFFBEE7D8, 3, -1)         (sleeping...)
signotifywait()                 (sleeping...)
lwp_cond_wait(0xFF0434E8, 0xFF0434F8, 0xFF03CD80) (sleeping...)
lwp_cond_wait(0xFF0434E8, 0xFF0434F8, 0xFF03CD80) (sleeping...)
door_return(0x00000000, 0, 0x00000000, 0) (sleeping...)
lwp_cond_wait(0xFF0434E8, 0xFF0434F8, 0xFF03CD80) (sleeping...)
poll(0xFFBEE7D8, 3, -1)                         = 1
time()                                          = 1094216195
recvfrom(5, "04 \\0 UFB v G =F1 UB7CA".., 4096, 0, 0xFFBEE810, 0xFFBED7FC) = 85
rad_recv: Accounting-Request packet from host 127.0.0.1:37191, id=92, length=85
write(1, " r a d _ r e c v :   A c".., 80)      = 80
    Incurred fault #5, FLTACCESS  %pc = 0xFF0C1EE8
      siginfo: SIGBUS BUS_ADRALN addr=0x001CFBD9
    Received signal #10, SIGBUS [default]
      siginfo: SIGBUS BUS_ADRALN addr=0x001CFBD9
        *** process killed ***

Reply via email to