[asterisk-dev] [Code Review] [patch] Use of MASTER_CHANNEL causes a race condition ending in a deadlock among channels

Brett Bryant reviewboard at asterisk.org
Fri Feb 25 13:40:19 CST 2011

This is an automatically generated e-mail. To reply, visit:

Review request for Asterisk Developers.


Use of MASTER_CHANNEL in chan_sip causes pbx_setvar_helper to potentially lock a channel before iterating through the channel container to find the master channel. This violates locking order, and when two threads are doing this at the same time they can both end up in a deadlock holding the channel locks that the others are trying to acquire through the iterator.


  /tags/1.8.3-rc2/channels/chan_sip.c 308543 

Diff: https://reviewboard.asterisk.org/r/1127/diff


Tested functionality of code and accuracy before and after change which removed the use of the MASTER_CHANNEL function.



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

More information about the asterisk-dev mailing list