[asterisk-bugs] [JIRA] (ASTERISK-24600) Stuck IAX channels, Asterisk stops responding to most traffic, potential deadlock

Matt Jordan (JIRA) noreply at issues.asterisk.org
Tue Dec 9 09:46:30 CST 2014


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

Matt Jordan commented on ASTERISK-24600:
----------------------------------------

I think I know what's happening here. You can't hold the channel lock while reaching across a bridge for a peer:

{code}
	iax2_lock_owner(fr->callno);
	if (!iaxs[fr->callno]) {
		/* The call dissappeared so discard this frame that we could not send. */
		iax2_frame_free(fr);
		return -1;
	}
	if ((owner = iaxs[fr->callno]->owner)) {
		bridge = ast_channel_bridge_peer(owner);
	}
{code}

That's a deadlock waiting to happen. Which, incidentally, happened.

> Stuck IAX channels, Asterisk stops responding to most traffic, potential deadlock
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24600
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24600
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_iax2
>    Affects Versions: 13.0.1
>         Environment: Ubuntu 14.04.1 LTS (trusty) x86_64
>            Reporter: Jeff Collell
>            Assignee: Jeff Collell
>         Attachments: asterisk-bug.PNG, backtrace-threads.txt, core-show-locks.txt, iax.conf, threads-of-interest.txt
>
>
> Setup:
> 20 endpoints, register locally over SIP (no NAT)
> 1 IAX trunk to another remote Asterisk box (unauthenticated, IP restricted on firewalls)
> Server randomly gets 2 IAX channels "stuck" (most likely after the call has ended since we haven't had complaints of dropped calls), stops responding to IAX, SIP registrations, etc. High CPU usage on 2 threads (see attached).
> Issue seems to be happening randomly with calls over trunk (SIP to IAX and IAX to SIP). I can reproduce it by simply creating lots of channels over the trunk (it's not rare, but more channels just means I get the issue to happen sooner, not a load issue). Happens every few dozen calls made by the client (about daily since this is a small office).
> Our next steps will be to configure a SIP trunk between sites to isolate if the issue is IAX specific.



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



More information about the asterisk-bugs mailing list