RE: Segmentation fault on Freeradius

2003-08-24 Thread Yasser Ahmed Hosny
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

2003-08-22 Thread Paul Hampson
> 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

2003-08-22 Thread Yasser Ahmed Hosny
> 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

2003-08-21 Thread Paul Hampson
> 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


Segmentation fault on Freeradius

2003-08-19 Thread Yasser Ahmed Hosny
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.

GDB output 


>

gdb /app/experimental/free-0.9/local/sbin/radiusd
/app/experimental/free-0.9/local/sbin/core
GNU gdb 5.3
Copyright 2002 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'. 
Program terminated with signal 11, Segmentation fault. 
Reading symbols from /lib/libcrypt_i.so.1...(no debugging symbols
found)...done. 
Loaded symbols for /lib/libcrypt_i.so.1 Reading symbols from
/lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols
for /lib/librt.so.1 Reading symbols from /lib/libpthread.so.1...(no
debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.1
Reading symbols from
/app/experimental/free-0.9/local/lib/libradius-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/libradius-0.9.0.so
Reading symbols from /usr/local/lib/libsnmp-0.4.2.5.so...done.
Loaded symbols for /usr/local/lib/libsnmp-0.4.2.5.so
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libkstat.so.1...done.
Loaded symbols for /lib/libkstat.so.1
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /lib/libdl.so.1...done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /usr/local/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/local/lib/libgcc_s.so.1
Reading symbols from /lib/libgen.so.1...done.
Loaded symbols for /lib/libgen.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmp.so.2...done.
Loaded symbols for /lib/libmp.so.2
Reading symbols from
/usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
Reading symbols from /lib/libthread.so.1...done.
Loaded symbols for /lib/libthread.so.1
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_expr-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_expr-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_pap-0.9.0.so...done.
Loaded symbols for /app/experimental/free-0.9/local/lib/rlm_pap-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_chap-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_chap-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_mschap-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_mschap-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_unix-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_unix-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_eap-0.9.0.so...done.
Loaded symbols for /app/experimental/free-0.9/local/lib/rlm_eap-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_eap_md5-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_eap_md5-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_eap_leap-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_eap_leap-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_preprocess-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_preprocess-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_sql-0.9.0.so...done.
Loaded symbols for /app/experimental/free-0.9/local/lib/rlm_sql-0.9.0.so
Reading symbols from
/app/experimental/free-0.9/local/lib/rlm_sql_oracle-0.9.0.so...done.
Loaded symbols for
/app/experimental/free-0.9/local/lib/rlm_sql_oracle-0.9.0.so
Reading symbols from /oracle/ora817/lib//libclntsh.so.8.0...done.
Loaded symbols for /oracle/ora817/lib//libclntsh.so.8.0
Reading symbols from /oracle/ora817/lib//libwtc8.so...done.
Loaded symbols for /oracle/ora817/lib//libwtc8.so
Reading symbols from /lib/libsched.so.1...done.
Loaded symbols for /lib/libsched.so.1
Reading symbols from