[sr-dev] [kamailio] MS ODBC Driver crashes kamailio on boot (#501)

Tim Chubb notifications at github.com
Wed Feb 10 12:20:08 CET 2016


Latest backtrace, made using the ubuntu compiled version of the driver, as frame 19 is the same as previous backtrace included the requested info below.

```
gdb kamailio /core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kamailio...done.
[New LWP 23380]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `kamailio -f /etc/kamailio/kamailio.cfg -DDddEe'.
Program terminated with signal SIGQUIT, Quit.
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38      ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
(gdb) bt
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fc3b4f5e423 in futex_get (lock=0x7fc3b79e05a4) at ../../futexlock.h:121
#2  0x00007fc3b4f5f98c in locking_f (mode=9, n=1, file=0x7fc3b4a69c9b "err.c", line=446) at tls_locking.c:107
#3  0x00007fc3b49e39c3 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#4  0x00007fc3b49e3ecd in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#5  0x00007fc3b49e4840 in ERR_get_state () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#6  0x00007fc3b49e4a7f in ERR_clear_error () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#7  0x00007fc3b4cfe270 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#8  0x00007fc3ac2e3282 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#9  0x00007fc3ac2e44cc in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#10 0x00007fc3ac2d95b8 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#11 0x00007fc3ac2d9c9f in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#12 0x00007fc3ac2b711f in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#13 0x00007fc3ac2b502f in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#14 0x00007fc3ac2b59a2 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#15 0x00007fc3ac22fea1 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#16 0x00007fc3ac263de6 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#17 0x00007fc3ac232c66 in SQLDriverConnectW () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
#18 0x00007fc3b3bc7abd in SQLDriverConnect (hdbc=0x22df030, hwnd=0x0, conn_str_in=0x23006e0 "D", len_conn_str_in=-1, conn_str_out=0x7fffeeef1930 "`\031\357\356\377\177", conn_str_out_max=0,
    ptr_conn_str_out=0x7fffeeef192e, driver_completion=1) at SQLDriverConnect.c:1490
#19 0x00007fc3b3e1f016 in db_unixodbc_new_connection (id=0x7fc3bca2ca08) at connection.c:155
#20 0x00007fc3b6bac456 in db_do_init2 (url=0x7fc3b7011e10 <db_url>, new_connection=0x7fc3b3e1d942 <db_unixodbc_new_connection>, pooling=DB_POOLING_PERMITTED) at db.c:316
#21 0x00007fc3b6bab4c9 in db_do_init (url=0x7fc3b7011e10 <db_url>, new_connection=0x7fc3b3e1d942 <db_unixodbc_new_connection>) at db.c:269
#22 0x00007fc3b3e24749 in db_unixodbc_init (_url=0x7fc3b7011e10 <db_url>) at dbase.c:175
#23 0x00007fc3b6dea471 in mi_child_init () at ul_mod.c:459
#24 0x00007fc3bc2e78a0 in init_mi_child (rank=-128, mode=1) at mi.c:118
#25 0x00007fc3bb9b0035 in fifo_process (rank=1) at mi_fifo.c:255
#26 0x00007fc3bb9afa0d in mi_child_init (rank=0) at mi_fifo.c:234
#27 0x000000000051093d in init_mod_child (m=0x7fc3bc755a20, rank=0) at sr_module.c:915
#28 0x0000000000510678 in init_mod_child (m=0x7fc3bc756008, rank=0) at sr_module.c:912
#29 0x0000000000510678 in init_mod_child (m=0x7fc3bc758990, rank=0) at sr_module.c:912
#30 0x0000000000510678 in init_mod_child (m=0x7fc3bc759690, rank=0) at sr_module.c:912
#31 0x0000000000510678 in init_mod_child (m=0x7fc3bc759c98, rank=0) at sr_module.c:912
#32 0x0000000000510678 in init_mod_child (m=0x7fc3bc75aae8, rank=0) at sr_module.c:912
#33 0x0000000000510678 in init_mod_child (m=0x7fc3bc75b5c8, rank=0) at sr_module.c:912
#34 0x0000000000510678 in init_mod_child (m=0x7fc3bc75c4a0, rank=0) at sr_module.c:912
#35 0x0000000000510678 in init_mod_child (m=0x7fc3bc75ed58, rank=0) at sr_module.c:912
#36 0x0000000000510678 in init_mod_child (m=0x7fc3bc760270, rank=0) at sr_module.c:912
#37 0x0000000000510678 in init_mod_child (m=0x7fc3bc760b58, rank=0) at sr_module.c:912
#38 0x0000000000510678 in init_mod_child (m=0x7fc3bc761688, rank=0) at sr_module.c:912
#39 0x0000000000510678 in init_mod_child (m=0x7fc3bc762170, rank=0) at sr_module.c:912
#40 0x0000000000510678 in init_mod_child (m=0x7fc3bc762b78, rank=0) at sr_module.c:912
#41 0x0000000000510678 in init_mod_child (m=0x7fc3bc764090, rank=0) at sr_module.c:912
#42 0x0000000000510678 in init_mod_child (m=0x7fc3bc766be8, rank=0) at sr_module.c:912
#43 0x0000000000510678 in init_mod_child (m=0x7fc3bc7674c8, rank=0) at sr_module.c:912
#44 0x0000000000510678 in init_mod_child (m=0x7fc3bc768518, rank=0) at sr_module.c:912
#45 0x0000000000510678 in init_mod_child (m=0x7fc3bc768b28, rank=0) at sr_module.c:912
#46 0x0000000000510678 in init_mod_child (m=0x7fc3bc76b7c0, rank=0) at sr_module.c:912
#47 0x0000000000510678 in init_mod_child (m=0x7fc3bc76c0a8, rank=0) at sr_module.c:912
#48 0x0000000000510678 in init_mod_child (m=0x7fc3bc76c948, rank=0) at sr_module.c:912
#49 0x0000000000510678 in init_mod_child (m=0x7fc3bc76d398, rank=0) at sr_module.c:912
#50 0x0000000000510678 in init_mod_child (m=0x7fc3bc76e410, rank=0) at sr_module.c:912
#51 0x0000000000510678 in init_mod_child (m=0x7fc3bc76ed08, rank=0) at sr_module.c:912
#52 0x0000000000510678 in init_mod_child (m=0x7fc3bc7751c8, rank=0) at sr_module.c:912
#53 0x0000000000510678 in init_mod_child (m=0x7fc3bc775740, rank=0) at sr_module.c:912
#54 0x0000000000510678 in init_mod_child (m=0x7fc3bc7764f0, rank=0) at sr_module.c:912
#55 0x0000000000510678 in init_mod_child (m=0x7fc3bc776ee8, rank=0) at sr_module.c:912
#56 0x0000000000510678 in init_mod_child (m=0x7fc3bc777500, rank=0) at sr_module.c:912
#57 0x0000000000510678 in init_mod_child (m=0x7fc3bc777948, rank=0) at sr_module.c:912
#58 0x0000000000510678 in init_mod_child (m=0x7fc3bc778270, rank=0) at sr_module.c:912
#59 0x0000000000510678 in init_mod_child (m=0x7fc3bc779b38, rank=0) at sr_module.c:912
#60 0x0000000000510678 in init_mod_child (m=0x7fc3bc77a180, rank=0) at sr_module.c:912
#61 0x0000000000510678 in init_mod_child (m=0x7fc3bc77a520, rank=0) at sr_module.c:912
#62 0x0000000000510678 in init_mod_child (m=0x7fc3bc77a968, rank=0) at sr_module.c:912
#63 0x0000000000510678 in init_mod_child (m=0x7fc3bc77afa8, rank=0) at sr_module.c:912
#64 0x0000000000510678 in init_mod_child (m=0x7fc3bc77b648, rank=0) at sr_module.c:912
#65 0x0000000000510678 in init_mod_child (m=0x7fc3bc77bae0, rank=0) at sr_module.c:912
#66 0x0000000000510678 in init_mod_child (m=0x7fc3bc77bf30, rank=0) at sr_module.c:912
#67 0x0000000000510678 in init_mod_child (m=0x7fc3bc77c5f0, rank=0) at sr_module.c:912
#68 0x0000000000510678 in init_mod_child (m=0x7fc3bc77ccd8, rank=0) at sr_module.c:912
#69 0x0000000000510c44 in init_child (rank=0) at sr_module.c:941
#70 0x0000000000502258 in main_loop () at main.c:1654
#71 0x00000000005083c3 in main (argc=4, argv=0x7fffeeef3088) at main.c:2553
(gdb) frame 19
#19 0x00007fc3b3e1f016 in db_unixodbc_new_connection (id=0x7fc3bca2ca08) at connection.c:155
155             ret = SQLDriverConnect(ptr->dbc, NULL, (SQLCHAR*)conn_str, SQL_NTS,
(gdb) p *id
$1 = {url = {s = 0x7fc3bca2ca50 "unixodbc://username:password@localhost/dsn", len = 72}, scheme = 0x7fc3bc905be8 "unixodbc", username = 0x7fc3bc905b78 "username",
  password = 0x7fc3bc77d950 "password", host = 0x7fc3bc77df90 "localhost", port = 0, database = 0x7fc3bc7ea410 "dsn", pid = 23380, poolid = 0}
(gdb) p ptr
$2 = (struct my_con *) 0x7fc3bc77e380
(gdb) p *ptr
$3 = {id = 0x0, ref = 1, next = 0x0, env = 0x22dea40, stmt_handle = 0x0, dbc = 0x22df030, row = 0x0, timestamp = 0}
(gdb) p con_str
No symbol "con_str" in current context.
(gdb) info locals
outstr = "`\031\357\356\377\177\000\000\\\204\365\264\303\177\000\000\210\000\000\000\000\000\000\000(\005\236\267\303\177\000\000\021", '\000' <repeats 11 times>, "\001\000\000\000\240\031\357\356\377\177\000\000\a\205\365\264\303\177\000\000\212\306\371\264\303\177\000\000\212\306\371\264\303\177\000\000\360\230\371\264\303\177\000\000\022\001\000\000\210\000\000\000\320\031\357\356\001\000\000\000 mF\270\303\177\000\000\300\031\357\356\377\177\000\000\253\205\365\264\303\177\000\000\030\000\000\000\000\000\000\000\210\000\000\000\000\000\000\000\344\300\245\264\303\177\000\000\370\201\225\264\303\177\000\000\020\032\357\356\377\177\000\000\250lF\270\303\177\000\000\250lF\270\303\177\000\000\200\000\000\000\000\000\000\000\021\000\000\000\000\000\000\000"...
outstrlen = 0
ret = 0
ptr = 0x7fc3bc77e380
conn_str = "DSN=dsn;UID=username;PWD=password;\000_A\000\000\000\000\000\200\060\357\356\377\177", '\000' <repeats 19 times>, "\022\357\356\377\177\000\000\276\236A\000\000\000\000\000 at _A\000\000\000\000\000H\022\357\356\377\177\000\000L\022\357\356\377\177\000\000\000\000\000\000\000\000\000\000\310Û\274\001", '\000' <repeats 19 times>, "\001\000\000\000\000\000\000\000\320͓\274\303\177\000\000h舼\303\177\000\000`\022\357\356\377\177\000\000z\235A", '\000' <repeats 13 times>...
__FUNCTION__ = "db_unixodbc_new_connection"
```

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/501#issuecomment-182322646
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160210/c3683834/attachment.html>


More information about the sr-dev mailing list