Thanks for the reply. Here is the new output with the debugging symbols.
First, the simple backtrace:
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64 -M 8 -u kamailio -g kamailio'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fc3d554df7e in get_ctype (parser=parser@entry=0x7fff89556470)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:307
307 parser->bytes_at_pos= parser->query->cs->cset->ctype(parser->query->cs,
(gdb) backtrace
#0 0x00007fc3d554df7e in get_ctype (parser=parser@entry=0x7fff89556470)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:307
#1 0x00007fc3d554dfac in init_parser (parser=parser@entry=0x7fff89556470, pq=pq@entry=0xececf0)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:236
#2 0x00007fc3d554ec41 in parse (pq=pq@entry=0xececf0) at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:824
#3 0x00007fc3d5553484 in prepare (stmt=stmt@entry=0xecd200,
query=0xeae0b0 "select table_version from version where table_name='dispatcher'", query_length=63)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/my_stmt.c:369
#4 0x00007fc3d554ece8 in my_SQLPrepare (hstmt=hstmt@entry=0xecd200, szSqlStr=<optimized out>, cbSqlStr=<optimized out>,
dupe=<optimized out>) at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/prepare.c:103
#5 0x00007fc3d554ed7e in MySQLPrepare (hstmt=hstmt@entry=0xecd200, query=<optimized out>, len=<optimized out>,
dupe=dupe@entry=1 '\001') at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/prepare.c:74
#6 0x00007fc3d5559e9c in SQLPrepareWImpl (hstmt=hstmt@entry=0xecd200, str=<optimized out>, str_len=63)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/unicode.c:804
#7 0x00007fc3d5559eb9 in SQLExecDirectW (hstmt=0xecd200, str=<optimized out>, str_len=<optimized out>)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/unicode.c:332
#8 0x00007fc3de43b05f in SQLExecDirect (statement_handle=0xec33f0,
statement_text=0xe32810 "select table_version from version where table_name='dispatcher'", text_length=63)
at SQLExecDirect.c:378
#9 0x00007fc3de695302 in db_unixodbc_submit_query (_h=0x7fc3de934680, _s=0x7fc3de4242a0 <sql_str>) at dbase.c:129
#10 0x00007fc3de21522e in db_do_submit_query (_h=0x7fc3de934680, _query=0x7fc3de4242a0 <sql_str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>) at db_query.c:55
#11 0x00007fc3de215cf7 in db_do_query_internal (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990,
_c=0x7fff895569b0, _n=1, _nc=1, _o=0x0, _r=0x7fff89556988, val2str=0x7fc3de69afca <db_unixodbc_val2str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>, store_result=0x7fc3de695b21 <db_unixodbc_store_result>, _l=0)
at db_query.c:131
#12 0x00007fc3de21661a in db_do_query (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990, _c=0x7fff895569b0,
_n=1, _nc=1, _o=0x0, _r=0x7fff89556988, val2str=0x7fc3de69afca <db_unixodbc_val2str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>, store_result=0x7fc3de695b21 <db_unixodbc_store_result>)
at db_query.c:156
#13 0x00007fc3de696d90 in db_unixodbc_query (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990,
---Type <return> to continue, or q <return> to quit---
_c=0x7fff895569b0, _n=1, _nc=1, _o=0x0, _r=0x7fff89556988) at dbase.c:253
#14 0x00007fc3de20ce90 in db_table_version (dbf=0x7fc3da42eea0 <ds_dbf>, connection=0x7fc3de934680,
table=0x7fc3da42e570 <ds_table_name>) at db.c:400
#15 0x00007fc3da209693 in init_ds_db () at dispatch.c:686
#16 0x00007fc3da1f4f1a in mod_init () at dispatcher.c:317
#17 0x0000000000520e8d in init_mod (m=0x7fc3de8d9fe0) at sr_module.c:966
#18 0x0000000000520be8 in init_mod (m=0x7fc3de8da5c0) at sr_module.c:963
#19 0x000000000052119a in init_modules () at sr_module.c:995
#20 0x0000000000517951 in main (argc=11, argv=0x7fff89556f08) at main.c:2519
And next, the full backtrace:
(gdb) bt full
#0 0x00007fc3d554df7e in get_ctype (parser=parser@entry=0x7fff89556470)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:307
No locals.
#1 0x00007fc3d554dfac in init_parser (parser=parser@entry=0x7fff89556470, pq=pq@entry=0xececf0)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:236
No locals.
#2 0x00007fc3d554ec41 in parse (pq=pq@entry=0xececf0) at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/parse.c:824
parser = {pos = 0xeae0b0 "select table_version from version where table_name='dispatcher'",
bytes_at_pos = -716353152, ctype = 32707, quote = 0x0, query = 0xececf0, syntax = 0xececf0}
#3 0x00007fc3d5553484 in prepare (stmt=stmt@entry=0xecd200,
query=0xeae0b0 "select table_version from version where table_name='dispatcher'", query_length=63)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/my_stmt.c:369
No locals.
#4 0x00007fc3d554ece8 in my_SQLPrepare (hstmt=hstmt@entry=0xecd200, szSqlStr=<optimized out>, cbSqlStr=<optimized out>,
dupe=<optimized out>) at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/prepare.c:103
stmt = 0xecd200
#5 0x00007fc3d554ed7e in MySQLPrepare (hstmt=hstmt@entry=0xecd200, query=<optimized out>, len=<optimized out>,
dupe=dupe@entry=1 '\001') at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/prepare.c:74
stmt = 0xecd200
#6 0x00007fc3d5559e9c in SQLPrepareWImpl (hstmt=hstmt@entry=0xecd200, str=<optimized out>, str_len=63)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/unicode.c:804
stmt = 0xecd200
errors = 0
conv = <optimized out>
#7 0x00007fc3d5559eb9 in SQLExecDirectW (hstmt=0xecd200, str=<optimized out>, str_len=<optimized out>)
at /usr/src/debug/mysql-connector-odbc-5.2.5-src/driver/unicode.c:332
error = <optimized out>
#8 0x00007fc3de43b05f in SQLExecDirect (statement_handle=0xec33f0,
statement_text=0xe32810 "select table_version from version where table_name='dispatcher'", text_length=63)
at SQLExecDirect.c:378
s1 = 0xec3ef0
---Type <return> to continue, or q <return> to quit---
statement = 0xec33f0
ret = <optimized out>
s1 = <optimized out>
s2 = "\210eU\211\377\177\000\000:\274\022\337\303\177\000\000\320\033\351\000\000\000\000\000\320\033\351\000\000\000\000\000\230I\223\336\303\177\000\000g\270F\336\303\177\000\000\320\033\351\000\000\000\000\000\230I\223\336\303\177\000\000\340\304h\336\303\177\000\000\022\303B\336\303\177\000\000\000\000\000\000\000\000\000\000\060U\355\000\000\000\000\000\016(\344", '\000' <repeats 61 times>, "\202-/7\000\000\000\000\200gU\211\377\177\000\000 TA\000\000\000\000\000\000oU\211\377\177\000\000PgU\211\377\177\000\000"...
#9 0x00007fc3de695302 in db_unixodbc_submit_query (_h=0x7fc3de934680, _s=0x7fc3de4242a0 <sql_str>) at dbase.c:129
ret = 0
sqlstate = "\020\027\351\000\000\000"
__FUNCTION__ = "db_unixodbc_submit_query"
#10 0x00007fc3de21522e in db_do_submit_query (_h=0x7fc3de934680, _query=0x7fc3de4242a0 <sql_str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>) at db_query.c:55
ret = -1990891600
ms = 0
__FUNCTION__ = "db_do_submit_query"
#11 0x00007fc3de215cf7 in db_do_query_internal (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990,
_c=0x7fff895569b0, _n=1, _nc=1, _o=0x0, _r=0x7fff89556988, val2str=0x7fc3de69afca <db_unixodbc_val2str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>, store_result=0x7fc3de695b21 <db_unixodbc_store_result>, _l=0)
at db_query.c:131
off = 63
ret = 23
__FUNCTION__ = "db_do_query_internal"
#12 0x00007fc3de21661a in db_do_query (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990, _c=0x7fff895569b0,
_n=1, _nc=1, _o=0x0, _r=0x7fff89556988, val2str=0x7fc3de69afca <db_unixodbc_val2str>,
submit_query=0x7fc3de694bcc <db_unixodbc_submit_query>, store_result=0x7fc3de695b21 <db_unixodbc_store_result>)
at db_query.c:156
No locals.
#13 0x00007fc3de696d90 in db_unixodbc_query (_h=0x7fc3de934680, _k=0x7fff895569c0, _op=0x0, _v=0x7fff89556990,
_c=0x7fff895569b0, _n=1, _nc=1, _o=0x0, _r=0x7fff89556988) at dbase.c:253
---Type <return> to continue, or q <return> to quit---
No locals.
#14 0x00007fc3de20ce90 in db_table_version (dbf=0x7fc3da42eea0 <ds_dbf>, connection=0x7fc3de934680,
table=0x7fc3da42e570 <ds_table_name>) at db.c:400
key = {0x7fff89556970}
col = {0x7fff89556960}
val = {{type = DB1_STR, nul = 0, free = -1990889728, val = {int_val = -561128392, ll_val = 140479229189176,
double_val = 6.9405961096630734e-310,
time_val = 140479229189176, string_val = 0x7fc3de8ddc38 "dispatcher",
str_val = {s = 0x7fc3de8ddc38 "dispatcher", len = 10}, blob_val = {s = 0x7fc3de8ddc38 "dispatcher",
len = 10}, bitmap_val = 3733838904}}}
res = 0x0
ver = 0x0
version = 0x9c9500 <version_table>
tmp1 = {s = 0x7fc3de21f085 "table_name", len = 10}
tmp2 = {s = 0x7fc3de21f090 "table_version", len = 13}
ret = 32707
__FUNCTION__ = "db_table_version"
#15 0x00007fc3da209693 in init_ds_db () at dispatch.c:686
ret = 0
__FUNCTION__ = "init_ds_db"
#16 0x00007fc3da1f4f1a in mod_init () at dispatcher.c:317
avp_spec = {type = 2304076624, getf = 0x7fc3da432989 <mod_init+2289>, setf = 0x0, pvp = {pvn = {type = -542456480,
nfree = 0x7fff89556b40, u = {isname = {type = -561146352, name = {n = 1865003490, s = {
s = 0x6f29b1e2 <Address 0x6f29b1e2 out of bounds>, len = 4247429}, re = 0x6f29b1e2}},
dname = 0x7fc3de8d9610}}, pvi = {type = -630909564, u = {ival = 7466096, dval = 0x71ec70}}},
trans = 0x415420 <_start>}
__FUNCTION__ = "mod_init"
#17 0x0000000000520e8d in init_mod (m=0x7fc3de8d9fe0) at sr_module.c:966
__FUNCTION__ = "init_mod"
#18 0x0000000000520be8 in init_mod (m=0x7fc3de8da5c0) at sr_module.c:963
__FUNCTION__ = "init_mod"
#19 0x000000000052119a in init_modules () at sr_module.c:995
---Type <return> to continue, or q <return> to quit---
t = 0x372f2d82
i = 200
__FUNCTION__ = "init_modules"
#20 0x0000000000517951 in main (argc=11, argv=0x7fff89556f08) at main.c:2519
cfg_stream = 0xe2c010
c = -1
r = 11538501
tmp = 0x7fff89557f70 ""
tmp_len = 0
port = 0
proto = 32767
options = 0x71cbe8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
ret = -1
seed = 2941590855
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0xf63d4e2e
p = 0x7fc3dfaa2000 ""
__FUNCTION__ = "main"