(gdb) display mysql_sock 1: mysql_sock = (rlm_sql_mysql_sock *) 0x5f6c7173
That's bad. That's very bad. It's the ASCII string "sql_", interpreted as a pointer on an x86 machine. No wonder it crashes.
The short answer is that there appears to be some memory corruption. Can you print out the contents of "sqlsocket", too? Both the structure contents, and the *hex* contents of that area of memory.
These values are what I've got : (gdb) display sqlsocket 1: sqlsocket = (SQLSOCK *) 0x8092720 (gdb) x 0x8092720 0x8092720: 0x00000001 (gdb) info stack 0x8092720 #0 0x483b7a48 in sql_init_socket (sqlsocket=0x8092720, config=0x8096300) at sql_mysql.c:71 #1 0x483660b5 in connect_single_socket (sqlsocket=0x8092720, inst=0x8092680) at sql.c:70 #2 0x4836621f in sql_init_socketpool (inst=0x8092680) at sql.c:130 #3 0x48364905 in rlm_sql_instantiate (conf=0x8093840, instance=0x815e508) at rlm_sql.c:707 #4 0x80544ad in find_module_instance (instname=0x80946e0 "sql") at modules.c:358 #5 0x80556fa in do_compile_modsingle (component=1, ci=0x80977e0, filename=0x805e6c7 "radiusd.conf", grouptype=0, modname=0xbfbfeacc) at modcall.c:814 #6 0x805576a in compile_modsingle (component=1, ci=0x80977e0, filename=0x805e6c7 "radiusd.conf", modname=0xbfbfeacc) at modcall.c:829 #7 0x80548be in load_component_section (cs=0x8097720, comp=1, filename=0x805e6c7 "radiusd.conf") at modules.c:568 #8 0x8054d3e in setup_modules () at modules.c:858 #9 0x804c87c in main (argc=2, argv=0xbfbffc20) at radiusd.c:960 (gdb) f #0 0x483b7a48 in sql_init_socket (sqlsocket=0x8092720, config=0x8096300) at sql_mysql.c:71 71 memset(mysql_sock, 0, sizeof(*mysql_sock));