[asterisk-dev] Interlocking of individual channels and the channels list in chan_sip.

David Vossel dvossel at digium.com
Thu Jun 16 10:04:58 CDT 2011




----- Original Message -----
> From: "Kirill Katsnelson" <kkm at adaptiveai.com>
> To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
> Sent: Thursday, June 16, 2011 2:52:23 AM
> Subject: Re: [asterisk-dev] Interlocking of individual channels and the channels list in chan_sip.
> On 110616 0041, Kirill Katsnelson wrote:
> >the rule should be to never cause an attempted
> > locking of the channels list while holding a lock on any channel.
> > Correct?
> 
> Looks like it is not even specific to chan_sip: ast_channel_lock is
> there ins ast_async_goto(). It seems that it is inherently
> deadlock-prone: call ast_async_goto() on one thread with a
> non-pbx-serviced channel, find_channel_...() on another, and there is
> a
> chance to lock. All necessary locking happens in these function.
> 
> -kkm
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev


Ah, yes. you have identified a complex issue.  This can be resolved now that we have ref counted channels though.  We just need to make sure no channels are locked when async goto is called I believe.

-- 
David Vossel
Digium, Inc. | Software Developer, Open Source Software
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
The_Boy_Wonder in #asterisk-dev



More information about the asterisk-dev mailing list