[asterisk-bugs] [JIRA] (ASTERISK-27756) bridge: Failure to impart a channel results in bad data causing crash

Morten Tryfoss (JIRA) noreply at issues.asterisk.org
Tue Feb 19 16:38:47 CST 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246262#comment-246262 ] 

Morten Tryfoss commented on ASTERISK-27756:
-------------------------------------------

I got a similar issue.

My scenario is:
Adding two channels to a bridge, and executing dial on the second (similar functionality as app_dial). That channel immediately gets a "603 Declined".
In my stasis app I then remove the first channel from the bridge on stasisend-event for the second and then hanging up. By just hanging up the first call leg, Asterisk will not crash.

I'm not that familiar with this part of Asterisk code, but the problem seems to be some kind of race condition related to this:

static int depart_channel(struct stasis_app_control *control, struct ast_channel *chan)
{
	ast_bridge_depart(chan);

	if (!ast_check_hangup(chan) && ast_channel_state(chan) != AST_STATE_UP) {
		/* Channel is still being dialed, so put it back in the dialing bridge */
		add_to_dial_bridge(control, chan); <----- As an experiment, commenting out this causes Asterisk not to crash for me
	}

	return 0;
}

> bridge: Failure to impart a channel results in bad data causing crash
> ---------------------------------------------------------------------
>
>                 Key: ASTERISK-27756
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27756
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_stasis
>    Affects Versions: 15.2.0, 15.3.0
>         Environment: Ubuntu 16.04 with asterisk 15.2.0 using ARI for bridge. 
>            Reporter: Abhay Gupta
>            Assignee: Unassigned
>            Severity: Minor
>              Labels: pjsip
>         Attachments: ari.txt, btfull.txt, btthread.txt, bt.txt, full, Full_main_ERROR_Log
>
>
> The is a incoming call on IAX channel and at times we get this message on trying to bridge this channel 
> [Mar 21 12:43:31] WARNING[1685][C-000066a0] bridge.c: Channel IAX2/2_1-10099 has a PBX thread and cannot be imparted into bridge 3cdd7200-ed20-403d-a6d9-53c2db73ed2c
>  at this time asterisk crashes with the following message . 
> [Mar 21 12:43:37] ERROR[1685][C-000066a0] stasis/control.c: FRACK!, Failed assertion bad magic number 0x0 for object 0x8f2ed2 (0)
> The ari log at the time of error is attached where the same IAX channel comes is stasis bridge command is fired and then asterisk crashes .



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list