[asterisk-dev] [Code Review] BLF Subscriptions Causes SIP Deadlock

David Vossel reviewboard at asterisk.org
Thu Nov 3 11:35:04 CDT 2011


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


We have a circular reference between the sip_pvt and the sip_peer and we are trying to lock both of them at the same time... That is about as complex and messy as it gets.

The more I looked at this the more I realized the correct fix is to avoid locking the sip peer and sip pvt at the same time.  I've attached a patch of my approach for this on this issue, https://issues.asterisk.org/jira/browse/ASTERISK-18663.  It has only been compile tested for 1.8, but I think it offers a good alternate solution that should be considered.


- David


On Nov. 3, 2011, 10:15 a.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1563/
> -----------------------------------------------------------
> 
> (Updated Nov. 3, 2011, 10:15 a.m.)
> 
> 
> Review request for Asterisk Developers and David Vossel.
> 
> 
> Summary
> -------
> 
> Fix a locking inversion that causes deadlocks during BLF subscriptions.  This moves locking back outside of sip_send_mwi_to_peer and adds locking where it was needed.
> 
> 
> This addresses bug ASTERISK-18663.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18663
> 
> 
> Diffs
> -----
> 
>   trunk/channels/chan_sip.c 342600 
> 
> Diff: https://reviewboard.asterisk.org/r/1563/diff
> 
> 
> Testing
> -------
> 
> Compile
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111103/2d96a52f/attachment-0001.htm>


More information about the asterisk-dev mailing list