# Asterisk crashes on realtime with libc-2.17.so

**URL:** <https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791>\
**Category:** Asterisk Support\
**Created:** [March 4, 2021, 5:25pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791 "2021-03-04T17:25:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![grupogestion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/grupogestion/32/3277_2.png) [@grupogestion](https://community.asterisk.org/u/grupogestion)\
**Post date:** [March 4, 2021, 5:25pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/1 "2021-03-04T17:25:49Z")

</div>

Hello,

we have an Asterisk 16.9.0 in a Centos 7.  
After setting up realtime for ps\_endpoint, ps\_contacts, etc. and restart the asterisk service, it crashes.  
The odbc driver is → mysql-connector-odbc-5.3.14-linux-el7-x86-64bit

The configuration of the odbc.ini, etc is ok but as soon as res\_odbc.so is loaded it crashes.

This is the log:

```auto
 asterisk[26472]: segfault at 1010070 ip 00007f25729a166e sp 00007ffdd2731980 error 4 in libmyodbc5w.so

```

We’re not sure what would be the proper version of the odbc driver to get this working or at least not crashing Asterisk.

Can you help us with that please?.

Many thanks !!!  
Richi

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [March 4, 2021, 5:56pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/2 "2021-03-04T17:56:28Z")

</div>

[https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace](https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace)

Also, for crashes, you are likely to need the logs that Asterisk, itself, produces, leading up to the crash. The initial cause of the crash may happen some time before the crash.

---

<div class="post-metadata">

**Author:** ![grupogestion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/grupogestion/32/3277_2.png) [@grupogestion](https://community.asterisk.org/u/grupogestion)\
**Post date:** [March 4, 2021, 9:57pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/3 "2021-03-04T21:57:33Z")

</div>

I got more data.

We can start Asterisk with realtime setup as long as we don’t load the res\_odbc module. As soon as we load that module Asterisk crashes:

```auto
a2*CLI> module load res_odbc
a2*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

```

And this is the _dmesg_ log

```auto
[195056.829810] asterisk[12391]: segfault at 0 ip 00007f265b9e1016 sp 00007f25a3fc27f8 error 4 in libc-2.17.so[7f265b8a3000+1c2000]

```

It doesn’t look like a problem with ODBC it self because we are able to do a:

```auto
isql sipodbc -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>

```

Looks like smth is wrong with the res\_odbc module.

Thanks for your help with this 😉

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [March 4, 2021, 10:25pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/4 "2021-03-04T22:25:15Z")

</div>

You can get crashes on Load if the Asterisk core was compiled with different versions or options, from those used for the module.

---

<div class="post-metadata">

**Author:** ![grupogestion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/grupogestion/32/3277_2.png) [@grupogestion](https://community.asterisk.org/u/grupogestion)\
**Post date:** [March 6, 2021, 11:33am UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/5 "2021-03-06T11:33:56Z")

</div>

David … we’re trying to get the Backtrace using

```auto
/var/lib/asterisk/scripts/ast_coredumper --latest

```

but it takes so long that we don’t even know if it’s doing smth.  
The core is 109M … how long it would normally take to process it?

In the directory we just can see a .ast\_coredumper.gdbinit, not any .txt yet

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [March 6, 2021, 11:52am UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/6 "2021-03-06T11:52:27Z")

</div>

I’ve always done it manually, directly issuing gdb commands, and the actual processing time is quite short. I wouldn’t expect the script to take more than a few seconds to run, but I’ve run it on systems where all the files are probably still in the cache.

---

<div class="post-metadata">

**Author:** ![grupogestion](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/grupogestion/32/3277_2.png) [@grupogestion](https://community.asterisk.org/u/grupogestion)\
**Post date:** [March 6, 2021, 2:53pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/8 "2021-03-06T14:53:09Z")

</div>

It’s solved !!

I’m leaving here the solution.

The problem was the mysql-odbc-connector. The version really installed was the mysql-connector-odbc-5.2.7 one.  
We uninstall that one and install mysql-connector-odbc-8.0.23-1.el7.x86\_64.rpm with:

```auto
rpm -Uvh mysql-connector-odbc-8.0.23-1.el7.x86_64.rpm

```

Then the res\_odbc.so was loaded properly.

Thanks for your feedback !!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 5, 2021, 2:53pm UTC](https://community.asterisk.org/t/asterisk-crashes-on-realtime-with-libc-2-17-so/87791/9 "2021-04-05T14:53:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
