RE: Segmentation fault on Freeradius
Thanks everybody, it is now working. I found the error in the SQL_INIT_SOCKET function which closes the socket in case it fails to perform an OCILogon to the DB. I've just commented this line and it is now working fine. I'll submit this to the development list for more clarification and fix. Regards --- Yasser Ahmed Hosny - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
RE: Segmentation fault on Freeradius
At first glance, this appears to be barfing because it's trying to contact the absent server with OCIErrorGet to find out why it can't contact the server As a test, try putting 'return msgbuf;' on line 48, right after the memset call. You'll get no error text in your logs, but if that fixes it then we've possibly hit a segfaulting bug in liboracleclient... I did that test, but I've got the error right after trying to execute the alt_start_query, which is updating the radacct table for start packet. It'd be worth checking the values of the parameters to OCIErrorGet to confirm they're what we'd expect... I think the command in GDB is 'print oracle_sock-errHandle' and the like... Mind you, I don't know the meaning of the parameters to OCIErrorCode anyway... It may just need some parameter checking before OCIErrorCode is called. Anyway, the reason it doesn't failover is because this segfault comes on the line before the module returns RLM_MODULE_FAIL, which I expect would trigger the failover. So with the 'return' inserted as described above, it should failover fine. Regards --- Yasser Ahmed Hosny - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
RE: Segmentation fault on Freeradius
From: Yasser Ahmed Hosny Sent: Friday, 22 August 2003 11:46 PM At first glance, this appears to be barfing because it's trying to contact the absent server with OCIErrorGet to find out why it can't contact the server As a test, try putting 'return msgbuf;' on line 48, right after the memset call. You'll get no error text in your logs, but if that fixes it then we've possibly hit a segfaulting bug in liboracleclient... I did that test, but I've got the error right after trying to execute the alt_start_query, which is updating the radacct table for start packet. Can you please produce the GDB output of this crash as well? Maybe it's that after the server has gone away, sql_oracle.c is not dealing with it properly, and liboracleclient is segfaulting on the next call... -- = Paul TBBle Hampson Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] This is a one line proof...if we start sufficiently far to the left. -- Cambridge University Math Department - Random signature generator 3.0 by Paul TBBle Hampson = - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
RE: Segmentation fault on Freeradius
From: Yasser Ahmed Hosny Sent: Wednesday, 20 August 2003 12:53 PM I am running Freeradius 0.9 and I am writing accounting records to an Oracle DB ver 8i. If the Database goes down, the Freeradius gives a segmentation fault error and dies. I've tried also to point to another database as a fail-over option, but the same results were encountered. Please find below the gdb output along with the debug output and the configuration. #0 sql_error (sqlsocket=0x1b2ba0, config=0x1a1078) at sql_oracle.c:49 49 OCIErrorGet((dvoid *) oracle_sock-errHandle, (ub4) 1, (text *) NULL, (gdb) bt #0 sql_error (sqlsocket=0x1b2ba0, config=0x1a1078) at sql_oracle.c:49 #1 0xfed630c8 in rlm_sql_accounting (instance=0x19e1f8, request=0x203190) at rlm_sql.c:793 At first glance, this appears to be barfing because it's trying to contact the absent server with OCIErrorGet to find out why it can't contact the server As a test, try putting 'return msgbuf;' on line 48, right after the memset call. You'll get no error text in your logs, but if that fixes it then we've possibly hit a segfaulting bug in liboracleclient... It'd be worth checking the values of the parameters to OCIErrorGet to confirm they're what we'd expect... I think the command in GDB is 'print oracle_sock-errHandle' and the like... Mind you, I don't know the meaning of the parameters to OCIErrorCode anyway... It may just need some parameter checking before OCIErrorCode is called. Anyway, the reason it doesn't failover is because this segfault comes on the line before the module returns RLM_MODULE_FAIL, which I expect would trigger the failover. So with the 'return' inserted as described above, it should failover fine. -- = Paul TBBle Hampson Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] This is a one line proof...if we start sufficiently far to the left. -- Cambridge University Math Department - Random signature generator 3.0 by Paul TBBle Hampson = - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html