valgrind run on 1.1.1

Stefan Winter stefan.winter at restena.lu
Tue Apr 11 09:39:48 CEST 2006


Hi,

> $ ./configure --disable-shared

Okay, been there, done that. Got an error. :-)
First I had to manually add "-lz" into the Makefile,
static linking bailed before that.
Then it worked, and I started the server, and this time
it segfaulted during initialisation of the first mySQL
socket. A gdb backtrace said:

rlm_sql_mysql: Starting connect to MySQL server for #0

Program received signal SIGSEGV, Segmentation fault.
0x0812da17 in my_stat ()
(gdb) bt
#0  0x0812da17 in my_stat ()
#1  0x08143abb in search_default_file_with_ext ()
#2  0x081439e8 in search_default_file ()
#3  0x08143443 in my_search_option_files ()
#4  0x08143746 in load_defaults ()
#5  0x0813d2fc in mysql_read_default_options ()
#6  0x0813dd44 in mysql_real_connect ()
#7  0x0812307c in sql_init_socket (sqlsocket=0x8476088, config=0x849e5a8) at /usr/include/stdlib.h:382
#8  0x0806fceb in connect_single_socket (sqlsocket=0x8488780, inst=0x8481ec0) at sql.c:70
#9  0x0806fdca in sql_init_socketpool (inst=0x8481ec0) at sql.c:131
#10 0x0806e893 in rlm_sql_instantiate (conf=0x8481ec0, instance=0x834c9a8) at rlm_sql.c:713
#11 0x0804f1a5 in find_module_instance (instname=0x83b8f20 "sql-normal-vpn") at modules.c:358
#12 0x0805085f in do_compile_modsingle (component=1, ci=0x83b8f00, filename=0x81de3ab "radiusd.conf", grouptype=0, modname=0xbfffcf68) at modcall.c:1005
#13 0x08050b4f in compile_modsingle (component=1, ci=0x83b8f00, filename=0x81de3ab "radiusd.conf", modname=0xbfffcf68) at modcall.c:1084
#14 0x0804f70b in load_component_section (cs=0x83b8d48, comp=1, filename=0x81de3ab "radiusd.conf") at modules.c:570
#15 0x0804f99c in setup_modules () at modules.c:868
#16 0x08052a59 in main (argc=2, argv=0xbfffe344) at radiusd.c:960
#17 0x08169428 in __libc_start_main (main=0x80528f0 <main>, argc=2, ubp_av=0xbfffe344, init=0x81695b0 <__libc_csu_init>, fini=0x8169610 <__libc_csu_fini>, rtld_fini=0,
    stack_end=0x834c9a8) at ../sysdeps/generic/libc-start.c:152

This appears to be happening within the mySQL client, I think?
BTW, valgrind gives a little more detail:

rlm_sql_mysql: Starting connect to MySQL server for #0
==12861==
==12861== Process terminating with default action of signal 11 (SIGSEGV)
==12861==  Access not within mapped region at address 0x0
==12861==    at 0x812DA17: my_stat (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x8143ABA: search_default_file_with_ext (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x81439E7: search_default_file (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x8143442: my_search_option_files (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x8143745: load_defaults (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x813D2FB: mysql_read_default_options (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x813DD43: mysql_real_connect (in /usr/local/freeradius-1.1.1-exp/sbin/radiusd)
==12861==    by 0x812307B: sql_init_socket (/usr/include/stdlib.h:382)
==12861==    by 0x806FCEA: connect_single_socket (sql.c:70)
==12861==    by 0x806FDC9: sql_init_socketpool (sql.c:131)
==12861==    by 0x806E892: rlm_sql_instantiate (rlm_sql.c:713)
==12861==    by 0x804F1A4: find_module_instance (modules.c:358)
==12861==

>   It *does* look like a bug either in rlm_sql_mysql, or in the
> underlying MySQL client library.

I am using MySQL 5.0.18 now. I could of course go back to 4.1 and try with that...

Greetings,

Stefan Winter

-- 
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de 
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at restena.lu     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473




More information about the Freeradius-Devel mailing list