Summary:ASTERISK-22678: crash: play non-existent sound to bridge
Reporter:John Bigelow (jbigelow)Labels:
Date Opened:2013-10-10 11:41:46Date Closed:2013-10-11 11:30:01
Status:Closed/CompleteComponents:Bridges/bridge_native_rtp Bridges/bridge_softmix Resources/res_ari
Versions:SVN Frequency of
is duplicated byASTERISK-22679 crash: play unspecified sound to bridge
Environment:Asterisk 12 branch r400823Attachments:( 0) backtrace.txt
( 1) full.txt
( 2) jira_asterisk_22678_v12.patch
Description:With two SIP channels in a bridge, playing a non-existent sound file ('demo-congratszzzz') to the bridge caused Asterisk to crash. The backtrace and full log are attached.
Comments:By: Kinsey Moore (kmoore) 2013-10-10 14:39:02.748-0500

This is caused by a race condition in technology switching between native RTP bridge and softmix bridge and has nothing to do with ARI at all. In this situation, the bridging tech is switched from native RTP to softmix, and then back to native RTP fast enough that the softmix private data gets destroyed before the softmix thread gets started.

By: Kinsey Moore (kmoore) 2013-10-10 14:45:06.219-0500

In addition to this bug, it is probably a bug that the announcer channel ever gets created when the sound it is meant to play doesn't actually exist.

By: Richard Mudgett (rmudgett) 2013-10-10 16:16:32.082-0500

[^jira_asterisk_22678_v12.patch] - Fix race condition starting the softmix mixing thread and switching to another bridge technology.

By: Richard Mudgett (rmudgett) 2013-10-10 16:36:36.370-0500

It may be an optimization for a file, but any other type of stream I don't think it would work.  Also the filename is not readily accessible when the Announcer/ARI channel is created.  Playing back a non-existent file should be a rare occurrence anyway.

By: John Bigelow (jbigelow) 2013-10-10 17:38:20.058-0500

After applying the patch I attempted to reproduce the crash multiple times (>50) including back to back attempts and could not. It looks like this patch solves it.