[Home]

Summary:ASTERISK-24622: chan_sip: Crash when disposing of dialog in scheduled callback __sip_autodestruct
Reporter:Antonis Psaras (apsaras)Labels:
Date Opened:2014-12-16 05:46:46.000-0600Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Channels/chan_sip/General
Versions:11.14.1 13.18.4 Frequency of
Occurrence
Frequent
Related
Issues:
is related toASTERISK-24621 chan_sip: Crash caused by invalid reference to object in __sip_autodestruct
Environment:Linux Debian 6.0.6 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux - Digium, Inc. Wildcard TCE400P transcoder base card - Digium TE820Attachments:( 0) backtrace_16.12.txt
( 1) bt.txt
( 2) sip.conf
Description:Asterisk crashes very often with no reason. I have to restart it. My kern.log shows:
asterisk[11327]: segfault at 10 ip 000000000044ca6a sp 00007f4afc1d8960 error 4 in asterisk[400000+203000]
Please I need Your help, to get asterisk work flawlessly.
I attach backtrace file.
Comments:By: Matt Jordan (mjordan) 2014-12-16 09:01:30.559-0600

We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Please make sure you have 'sip set debug on' enabled as well.

By: Antonis Psaras (apsaras) 2014-12-19 14:16:19.783-0600

I have the same issue with 11.12. Problem is random and can not reproduced. Setting debug to 5 produces too much data so we can not have that on, on a production system. Would the debug compile time flags help to detect and resolve that issue?

A hint that might help you, is that we record each call twice with Audio Hook enable
{noformat}
MixMonitor(${UNIQUEID}.wav,ba)
Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
{noformat}
and on Dial we execute a Macro on Answer which does the same to the answered Channel
{noformat}
Dial(SIP/trunk/${EXTEN},,M(rec))

[macro-rec]
MixMonitor(${UNIQUEID}.wav,a)
Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
{noformat}


By: Antonis Psaras (apsaras) 2014-12-19 14:21:18.167-0600

back trace from Asterisk 11.12

By: Rusty Newton (rnewton) 2015-01-09 19:48:58.980-0600

[~apsaras]

This crash may involve a reference counting issue. Your sip.conf would be helpful in trying to reproduce this issue.

Please follow the instructions [1] to get a Reference debug log, along with a debug log leading up to the crash [2]. A backtrace from the same run should also be provided. That should show the reference count error along with what particular object went bad.

[1] https://wiki.asterisk.org/wiki/display/AST/Reference+Count+Debugging
[2] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Make sure your Asterisk system is compiled with DONT_OPTIMIZE and BETTER_BACKTRACES for the trace.



By: Rusty Newton (rnewton) 2015-01-09 19:50:36.002-0600

I'm temporarily changing the reporter to Antonis Psaras since the original reporter is not responding. (So that I can assign the issue in Waiting on Feedback to Antonis)

By: Antonis Psaras (apsaras) 2015-01-12 13:33:00.918-0600

Just activate BETTER_BACKTRACES and DONT_OPTIMIZE.

I will send sip.conf in a moment.