Could someone give me a hint to understand why Asterisk is crashing, this is happening once per week, sometimes often.
That’s the Asterisk Settings:
[root@server admin]# asterisk -rx 'core show settings'
Setting max files open to 65000
PBX Core settings
Build Options: LOADABLE_MODULES, BUILD_NATIVE, G711_NEW_ALGORITHM
Maximum calls: 200 (Current 28)
Maximum open file handles: 65000
Root console verbosity: 5
Current console verbosity: 0
Debug level: 0
Maximum load average: 0.000000
Minimum free memory: 0 MB
Startup time: 10:45:37
Last reload time: 10:45:37
System: Linux/3.10.0-957.12.1.el7.x86_64 built by root on x86_64 2019-06-28 15:21:34 UTC
System name: system
Entity ID: 00:0c:29:c4:ef:18
Default language: en
Language prefix: Enabled
User name and group: asterisk/asterisk
Executable includes: Disabled
Transcode via SLIN: Enabled
Transmit silence during rec: Disabled
Generic PLC: Enabled
Min DTMF duration:: 80
I’m aware that this Version is obsolete already, and is no longer supported, but at the moment we can’t upgrade it to the newest version, if someone can just give some little information (settings/module/configuration issue) - that will help me a lot. Attached is also a debug file from the core-dump.
OS: CentOS 7 x64.
crash_debug.txt (173.9 KB)
It is crashing in the MariaDB database library which is being used by the MySQL dialplan application.
Thank’s a lot for your message.
I thought the same - and i even tried different versions of MariaDB libraries, also i replaced MariaDB library with MySQL, with different versions as well - but still the same issue, that’s why i thought maybe i’m looking in the wrong way. I will continue to investigate that, and will post here if i will get any result.
Just a guess here, but it looks like the underlying mysql object is getting released mid query. If you look in “Thread 93” you can see that the mysql object is getting destroyed for the same channel that is attempting the query in “Thread 1”. The object’s memory gets freed, then an attempt is made to reference it, then crash.
After glancing at the code it appears there is no lock protecting the release of the mysql object while executing a command in app_mysql. Upgrading won’t help since the “bug” appears to still exist in master.
The app_mysql module is deprecated, so it’s highly unlikely to see a fix for this issue. It has been replaced by the func_odbc module. I’d recommend porting your calls to that.
Also see more on getting started with Asterisk and ODBC.
I think you’re right, I paid too much attention for MariaDB/MySQL libraries - but I forgot about the app_mysql. I’m going to swap to func_odbc as you recommended to see how it will work. It’s going to take some time because we have a lot of queries.
Thanks a lot for your time and recommendation.
You have the BEST Open Source Product ever.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.