It seems that the crash is inside the mysql connector for unixodbc. What
leaves Kamailio seems to be correct, as you can see next the query looks
ok and the length is proper value as well:
#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
Not sure if it is something that can be fixed in Kamailio. Doesn't work
to use db_mysql instead of db_unixodbc?
Cheers,
Daniel
On 05/03/15 15:17, Lucas Wals Ochoa wrote:
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
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany -
http://www.kamailioworld.com