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

Tim Chubb notifications at github.com
Mon Feb 8 15:13:10 CET 2016


**Backtrace**
```
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 892]
[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 -DDDddEe'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) backtrace
#0  0x0000000000000000 in ?? ()
#1  0x00007fab4634134d in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#2  0x00007fab463419ca in lh_retrieve () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#3  0x00007fab46343ef1 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#4  0x00007fab46344830 in ERR_get_state () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#5  0x00007fab46344a6f in ERR_clear_error () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#6  0x00007fab4665e1d0 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#7  0x00007fab46667b30 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
#8  0x00007fab3e081aea in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#9  0x00007fab3e08140c in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#10 0x00007fab3e077791 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#11 0x00007fab3e07864d in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#12 0x00007fab3e06251a in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#13 0x00007fab3e05d15e in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#14 0x00007fab3e05d9b2 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#15 0x00007fab3dfe253a in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#16 0x00007fab3e011246 in ?? () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#17 0x00007fab3dfe4e1b in SQLDriverConnectW () from /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
#18 0x00007fab45527978 in SQLDriverConnect () from /usr/lib/x86_64-linux-gnu/libodbc.so.2
#19 0x00007fab4577fff6 in db_unixodbc_new_connection (id=0x7fab4e2dccd8) at connection.c:155
#20 0x00007fab4850c456 in db_do_init2 (url=0x7fab482a2bd0 <db_url>, new_connection=0x7fab4577e922 <db_unixodbc_new_connection>, pooling=DB_POOLING_PERMITTED) at db.c:316
#21 0x00007fab4850b4c9 in db_do_init (url=0x7fab482a2bd0 <db_url>, new_connection=0x7fab4577e922 <db_unixodbc_new_connection>) at db.c:269
#22 0x00007fab45784aa0 in db_unixodbc_init (_url=0x7fab482a2bd0 <db_url>) at dbase.c:175
#23 0x00007fab48065f08 in acc_db_init_child (db_url=0x7fab482a2bd0 <db_url>) at acc.c:422
#24 0x00007fab4806f61a in child_init (rank=11) at acc_mod.c:711
#25 0x000000000051093d in init_mod_child (m=0x7fab4e0ba2d0, rank=11) at sr_module.c:915
#26 0x0000000000510678 in init_mod_child (m=0x7fab4e0bcb88, rank=11) at sr_module.c:912
#27 0x0000000000510678 in init_mod_child (m=0x7fab4e0be0a0, rank=11) at sr_module.c:912
#28 0x0000000000510678 in init_mod_child (m=0x7fab4e0be988, rank=11) at sr_module.c:912
#29 0x0000000000510678 in init_mod_child (m=0x7fab4e0bf4b8, rank=11) at sr_module.c:912
#30 0x0000000000510678 in init_mod_child (m=0x7fab4e0bffa0, rank=11) at sr_module.c:912
#31 0x0000000000510678 in init_mod_child (m=0x7fab4e0c09a8, rank=11) at sr_module.c:912
#32 0x0000000000510678 in init_mod_child (m=0x7fab4e0c1ec0, rank=11) at sr_module.c:912
#33 0x0000000000510678 in init_mod_child (m=0x7fab4e0c4a18, rank=11) at sr_module.c:912
#34 0x0000000000510678 in init_mod_child (m=0x7fab4e0c52f8, rank=11) at sr_module.c:912
#35 0x0000000000510678 in init_mod_child (m=0x7fab4e0c6348, rank=11) at sr_module.c:912
#36 0x0000000000510678 in init_mod_child (m=0x7fab4e0c6958, rank=11) at sr_module.c:912
#37 0x0000000000510678 in init_mod_child (m=0x7fab4e0c92e0, rank=11) at sr_module.c:912
#38 0x0000000000510678 in init_mod_child (m=0x7fab4e0c9bc8, rank=11) at sr_module.c:912
#39 0x0000000000510678 in init_mod_child (m=0x7fab4e0ca468, rank=11) at sr_module.c:912
#40 0x0000000000510678 in init_mod_child (m=0x7fab4e0caeb8, rank=11) at sr_module.c:912
#41 0x0000000000510678 in init_mod_child (m=0x7fab4e0cbf30, rank=11) at sr_module.c:912
#42 0x0000000000510678 in init_mod_child (m=0x7fab4e0cc828, rank=11) at sr_module.c:912
#43 0x0000000000510678 in init_mod_child (m=0x7fab4e0d2ce8, rank=11) at sr_module.c:912
#44 0x0000000000510678 in init_mod_child (m=0x7fab4e0d3260, rank=11) at sr_module.c:912
#45 0x0000000000510678 in init_mod_child (m=0x7fab4e0d4010, rank=11) at sr_module.c:912
#46 0x0000000000510678 in init_mod_child (m=0x7fab4e0d4a08, rank=11) at sr_module.c:912
#47 0x0000000000510678 in init_mod_child (m=0x7fab4e0d5020, rank=11) at sr_module.c:912
#48 0x0000000000510678 in init_mod_child (m=0x7fab4e0d5468, rank=11) at sr_module.c:912
#49 0x0000000000510678 in init_mod_child (m=0x7fab4e0d5d90, rank=11) at sr_module.c:912
#50 0x0000000000510678 in init_mod_child (m=0x7fab4e0d7658, rank=11) at sr_module.c:912
#51 0x0000000000510678 in init_mod_child (m=0x7fab4e0d7ca0, rank=11) at sr_module.c:912
#52 0x0000000000510678 in init_mod_child (m=0x7fab4e0d8040, rank=11) at sr_module.c:912
#53 0x0000000000510678 in init_mod_child (m=0x7fab4e0d8488, rank=11) at sr_module.c:912
#54 0x0000000000510678 in init_mod_child (m=0x7fab4e0d8ac8, rank=11) at sr_module.c:912
#55 0x0000000000510678 in init_mod_child (m=0x7fab4e0d9168, rank=11) at sr_module.c:912
#56 0x0000000000510678 in init_mod_child (m=0x7fab4e0d9600, rank=11) at sr_module.c:912
#57 0x0000000000510678 in init_mod_child (m=0x7fab4e0d9a50, rank=11) at sr_module.c:912
#58 0x0000000000510678 in init_mod_child (m=0x7fab4e0da110, rank=11) at sr_module.c:912
#59 0x0000000000510c44 in init_child (rank=11) at sr_module.c:941
#60 0x00000000004907f1 in fork_process (child_id=11, desc=0x7ffd3d895c60 "udp receiver child=2 sock=127.0.0.1:5050", make_sock=1) at pt.c:327
#61 0x0000000000501672 in main_loop () at main.c:1567
#62 0x00000000005083c3 in main (argc=4, argv=0x7ffd3d896008) at main.c:2553
(gdb)
```


**Local OS Info**
```
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.2 (jessie)
Release:        8.2
Codename:       jessie

uname -a
Linux kam01 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) x86_64 GNU/Linux
```

**Reproduction Steps**
wget https://download.microsoft.com/download/B/C/D/BCDD264C-7517-4B7D-8159-C99FC5535680/RedHat6/msodbcsql-11.0.2270.0.tar.gz
extract the drivers
clone https://github.com/Andrewpk/Microsoft--SQL-Server--ODBC-Driver-1.0-for-Linux-Fixed-Install-Scripts.git
Copy the install scripts you just cloned to the unpacked msodbc driver folder
Run `build_dm.sh`
Run `install.sh install`
Configure unixodbc dsn for a sql server using MS ODBC Driver
i.e. you have an entry like this in /etc/odbc.ini
[sqlserver.domain.name]
Driver = ODBC Driver 11 for SQL Server
ServerName = sqlserver.domain.name
Database = kamdb
UID = kamailio_user
PWD = password
TDS_Version = 7.3
MARS_Connection = Yes
Configure kamailio to use that unixodbc dsn to connect to 

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


More information about the sr-dev mailing list