[Home]

Summary:ASTERISK-25863: Occasionally Asterisk crashes when a iax2 channels connects
Reporter:Eyal Hasson (eyal@kolhl.com)Labels:
Date Opened:2016-03-24 03:29:41Date Closed:2020-01-14 11:13:30.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Channels
Versions:13.7.2 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:FreePBX 12.0.76.2 distroAttachments:( 0) astcnf.zip
( 1) backtrace.txt
Description:We am using FreePBX 12.0.76.2 with asterisk 13.7.2, with a big ARI implementation (1000 lines). We occasionally have asterisk crashes (every few days), and looking into the core dump, we see:

Program terminated with signal 11, Segmentation fault.

0 0x00000000005183be in ast_format_get_codec ()
Missing separate debuginfos, use: debuginfo-install asterisk13-core-13.7.2-1.shmz65.1.94.x86_64
^[[?1034h(gdb) bt

0 0x00000000005183be in ast_format_get_codec ()
1 0x00000000004d7559 in ast_codec_samples_count ()
2 0x00007ff135d0139b in ?? () from /usr/lib64/asterisk/modules/chan_iax2.so
3 0x00007ff135d017fc in ?? () from /usr/lib64/asterisk/modules/chan_iax2.so
4 0x00007ff135d01fc2 in ?? () from /usr/lib64/asterisk/modules/chan_iax2.so

Looking in the full log at that time we found:

[2016-03-20 08:30:05] VERBOSE[2897] chan_iax2.c: Accepting AUTHENTICATED call from 213.151.45.44:55001:

requested format = alaw,
requested prefs = (),
actual format = ulaw,
host prefs = (ulaw|alaw|siren14|siren7|g722|slin16|slin|g726|g726aal2|adpcm|gsm|ilbc|speex|lpc10|g729|g723),
priority = mine
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [1001@from-internal:1] Gosub("IAX2/9105-2459", "StartKhlListen,start,1(from-internal,1001)") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:1] NoOp("IAX2/9105-2459", "entering from-internal / 1001 from 9105") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:2] Set("IAX2/9105-2459", "CONTEXT2=from-internal") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:3] Set("IAX2/9105-2459", "EXTEN2=1001") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:4] Set("IAX2/9105-2459", "AGC(rx)=32000") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:5] Set("IAX2/9105-2459", "AGC(tx)=32000") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:6] Set("IAX2/9105-2459", "DENOISE(rx)=on") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:7] Set("IAX2/9105-2459", "DENOISE(tx)=on") in new stack
[2016-03-20 08:30:05] VERBOSE[57923][C-0000396d] pbx.c: Executing [start@StartKhlListen:8] Stasis("IAX2/9105-2459", "KhlSystemApp") in new stack

Thanks,
Eyal Hasson
Comments:By: Asterisk Team (asteriskteam) 2016-03-24 03:29:42.274-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2016-03-24 06:38:10.462-0500

Thank you for the crash report. However, we need more information to investigate the crash. Please provide:

1. A backtrace generated from a core dump using the instructions provided on the Asterisk wiki [1].
2. Specific steps taken that lead to the crash.
3. All configuration information necesary to reproduce the crash.

Thanks!

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

Note that the backtrace has to be produced with debug symbols and without optimizations enabled. If this is not done the backtrace won't be useful. As well the configuration and complete console output is also needed.

By: Eyal Hasson (eyal@kolhl.com) 2016-03-24 08:26:38.299-0500

Hello Joshua,

1. I had attached the backtrace log. Isn't it good?
2. I do not have the specific steps that cause the crash. All I could see is when the crash occurs a iax2 device was trying to connect - and not a specific one device.
3. I am attaching all the config files from /etc/asterisk folder.

By: Joshua C. Colp (jcolp) 2016-03-24 08:30:00.975-0500

The backtrace is not really usable, no. It does not contain debug symbols and is optimized.

By: Eyal Hasson (eyal@kolhl.com) 2016-03-24 08:39:21.497-0500

I see. This is a FreePBX distro, and to have it not optimized, I'll have to rebuild asterisk. And since it is a heavy used (at least 100 users any minute of the day) 7x24 production system, it will not be easy. Isn't there any other way?

By: Joshua C. Colp (jcolp) 2016-03-24 08:41:39.219-0500

Without a backtrace to show exactly where it crashed it is a guessing game, which can take quite a lot of time. A backtrace shows exactly where it crashed and why.

By: Asterisk Team (asteriskteam) 2016-04-07 12:00:01.311-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines