[Home]

Summary:ASTERISK-27484: Crash in attempting to bridge channels
Reporter:Joshua Elson (joshelson)Labels:pjsip
Date Opened:2017-12-15 13:43:02.000-0600Date Closed:2020-01-14 11:14:10.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:15.1.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) unoptimized_bt.txt
Description:Latest Asterisk 15.1.4 crash when attempting to bridge audio. Don't have a repro on this one reliably.

Interestingly, this is the dialplan we see in leading up to the crash, which doesn't on the surface seem related to the crash itself:

[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: Unable to parse packet for number of samples: corrupted stream
[2017-12-15 11:46:29] WARNING[17172][C-0000029c] translate.c: no samples for opustolin
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: decoding: corrupted stream
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: Unable to parse packet for number of samples: corrupted stream
[2017-12-15 11:46:29] WARNING[17172][C-0000029c] translate.c: no samples for opustolin
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: decoding: corrupted stream
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: Unable to parse packet for frame data: corrupted stream
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: decoding: corrupted stream
[2017-12-15 11:46:29] WARNING[17174][C-0000029c] chan_pjsip.c: Can't send 470645312 type frames with PJSIP
[2017-12-15 11:46:29] WARNING[17174][C-0000029c] chan_pjsip.c: Can't send 470645312 type frames with PJSIP
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: Unable to parse packet for number of samples: corrupted stream
[2017-12-15 11:46:29] WARNING[17172][C-0000029c] translate.c: no samples for opustolin
[2017-12-15 11:46:29] ERROR[17172][C-0000029c] codec_opus.c: Opus: decoding: corrupted stream
[2017-12-15 11:46:29] WARNING[17174][C-0000029c] chan_pjsip.c: Can't send 469762168 type frames with PJSIP
Comments:By: Asterisk Team (asteriskteam) 2017-12-15 13:43:03.344-0600

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 Elson (joshelson) 2017-12-15 13:44:03.030-0600

Attaching unoptimized backtrace.

By: Joshua Elson (joshelson) 2017-12-15 13:45:36.719-0600

Fixed unoptimized backtrace.

By: Richard Mudgett (rmudgett) 2017-12-15 14:15:47.621-0600

Your backtrace appears to contain a memory corruption. We need one or both of the following items to continue investigation of the issue:
1. Valgrind output. See https://wiki.asterisk.org/wiki/display/AST/Valgrind for instructions on how to use Valgrind with Asterisk.
2. MALLOC_DEBUG output. See https://wiki.asterisk.org/wiki/display/AST/MALLOC_DEBUG+Compiler+Flag for instructions on how to use the MALLOC_DEBUG option.

Note that MALLOC_DEBUG and Valgrind are mutually exclusive options. Valgrind output is preferable, but will be more system resource intensive and may be difficult to get on a production system. In such a case, you may have better luck getting the necessary output from MALLOC_DEBUG.

----

Memory corruption could be the cause that codec_opus is complaining of a corrupted stream.

ASTERISK-27238 and ASTERISK-27412 are also memory corruption issues which were recently fixed and have not gone out in a release yet.

You'll have to use valgrind since you are using codec_opus and MALLOC_DEBUG alters the allocation API to track memory.


By: Asterisk Team (asteriskteam) 2017-12-30 12:00:01.124-0600

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