[asterisk-dev] [Code Review] 2756: Fix deadlocks in chan_sip in REFER and BYE handling

opticron reviewboard at asterisk.org
Tue Aug 13 11:48:00 CDT 2013



> On Aug. 13, 2013, 11:28 a.m., Mark Michelson wrote:
> > trunk/channels/chan_sip.c, lines 26465-26488
> > <https://reviewboard.asterisk.org/r/2756/diff/2/?file=43976#file43976line26465>
> >
> >     I'm not really seeing the point of this block of code. Since ast_rtp_instance_set_stats_vars() affects both the passed-in channel and the bridged peer, this seems to just be re-doing what the previous call did.

ast_rtp_instance_set_stats_vars() does slightly different things to the channel versus the bridged channel with the bridged channel getting variables set on it with the BRIDGED suffix. Running it on each channel ensures that both channels get a copy of each set of variables (one for itself and one for the bridged channel). I will shuffle things around a bit to reduce the number of lock dances that must be performed.


- opticron


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2756/#review9399
-----------------------------------------------------------


On Aug. 12, 2013, 4:18 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2756/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2013, 4:18 p.m.)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Bugs: ASTERISK-22215
>     https://issues.asterisk.org/jira/browse/ASTERISK-22215
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This resolves several deadlocks in chan_sip relating to usage of ast_channel_bridge_peer and improves accessibility of lock debugging function calls.
> 
> These issues were found while fixing the sip attended transfer integration tests for the referenced bug.
> 
> 
> Diffs
> -----
> 
>   trunk/channels/chan_sip.c 396504 
>   trunk/include/asterisk/lock.h 396504 
>   trunk/main/utils.c 396504 
> 
> Diff: https://reviewboard.asterisk.org/r/2756/diff/
> 
> 
> Testing
> -------
> 
> With these changes, chan_sip no longer stalls part of the way through the rewritten sip attended transfer tests on the REFER or at the end on the final BYE.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130813/c8e9456b/attachment.htm>


More information about the asterisk-dev mailing list