1.0.5 + rlm_sql_mysql: Segmentation fault

Thomas Krause (Webmatic) tk at webmatic.de
Thu Sep 15 16:23:38 CEST 2005


Hello,
I want to setup a new server with FreeRadius using
MySQL as backend. OS is FreeBSD 5.4, DB Mysql 4.1.13.
I've compiled FreeRadius from source (not from ports).
Without sql all is doing fine.
With sql enabled, the daemon dies with
"Segmentation fault (core dumped)":

rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
rlm_sql (sql): Attempting to connect to freeradius at localhost:/radius
rlm_sql (sql): starting 0
rlm_sql (sql): Attempting to connect rlm_sql_mysql #0
Segmentation fault (core dumped)

I've followed the instructions in the bugs file, but
I'm not a programmer (so the output doesn't really helps
me):

# gdb /usr/local/sbin/radiusd radiusd.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "i386-marcel-freebsd"...
Core was generated by `radiusd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.2...done.
Loaded symbols for /lib/libcrypt.so.2
Reading symbols from /usr/local/lib/libradius-1.0.5.so...done.
Loaded symbols for /usr/local/lib/libradius-1.0.5.so
Reading symbols from /usr/local/lib/libltdl.so.4...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/lib/libssl.so.3...done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /lib/libcrypto.so.3...done.
Loaded symbols for /lib/libcrypto.so.3
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/lib/rlm_exec-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_exec-1.0.5.so
Reading symbols from /usr/local/lib/rlm_expr-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_expr-1.0.5.so
Reading symbols from /usr/local/lib/rlm_pap-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_pap-1.0.5.so
Reading symbols from /usr/local/lib/rlm_chap-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_chap-1.0.5.so
Reading symbols from /usr/local/lib/rlm_mschap-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_mschap-1.0.5.so
Reading symbols from /usr/local/lib/rlm_unix-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_unix-1.0.5.so
Reading symbols from /usr/local/lib/rlm_preprocess-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_preprocess-1.0.5.so
Reading symbols from /usr/local/lib/rlm_realm-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_realm-1.0.5.so
Reading symbols from /usr/local/lib/rlm_files-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_files-1.0.5.so
Reading symbols from /usr/local/lib/rlm_sql-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_sql-1.0.5.so
Reading symbols from /usr/lib/libm.so...done.
Loaded symbols for /usr/lib/libm.so
Reading symbols from /usr/lib/libz.so...done.
Loaded symbols for /usr/lib/libz.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so
Reading symbols from /usr/local/lib/rlm_sql_mysql-1.0.5.so...done.
Loaded symbols for /usr/local/lib/rlm_sql_mysql-1.0.5.so
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x282f8550 in memset () from /lib/libc.so.5
(gdb) bt
#0  0x282f8550 in memset () from /lib/libc.so.5
#1  0x00000001 in ?? ()
#2  0x283d1b64 in sql_init_socket (sqlsocket=0x8080020, 
config=0x8067500) at sql_mysql.c:71
#3  0x28348fa8 in connect_single_socket (sqlsocket=0x8080020, 
inst=0x8080400) at sql.c:70
#4  0x28349110 in sql_init_socketpool (inst=0x8080400) at sql.c:131
#5  0x283474eb in rlm_sql_instantiate (conf=0x8140038, instance=0x0) at 
rlm_sql.c:712
#6  0x0805470d in find_module_instance (instname=0x8078610 "sql") at 
modules.c:358
#7  0x0805596e in do_compile_modsingle (component=1, ci=0x8079400, 
filename=0x805f353 "radiusd.conf", grouptype=0,
     modname=0xbfbfdae8) at modcall.c:814
#8  0x08054e82 in setup_modules () at modules.c:568
#9  0x0804c850 in main (argc=2, argv=0xbfbfec8c) at radiusd.c:960
(gdb)

(The same happens when using ver. 1.0.4 from ports).


Kind regards,
Thomas

-- 
------------------------------------------------------------
Thomas Krause                   Webmatic Kommunikations GmbH
                                         Tel: +49 345 7779999
------------------------------------------------------------



More information about the Freeradius-Users mailing list