[asterisk-dev] [Code Review] Remove some unnecessary locking from ast_hangup()

Alec Davis reviewboard at asterisk.org
Wed Feb 8 01:37:58 CST 2012


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

Ship it!


Even using your 2nd patch, and the dialplans from https://reviewboard.asterisk.org/r/1400/ (specifically the [en_phone] and [en_pickup]) that involve multiple local chan calls, and multiple local chan pickups, I was unable to get any locks, or orphaned channels.

Patch 3 is obviusly more correct, but my testing with patch 2 was to try to force a lockup or an orphan, which I was unable to do.

- Alec


On Feb. 7, 2012, 7:28 p.m., Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1712/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2012, 7:28 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch removes some unnecessary locking of the channels container in ast_hangup().  The reason this came up is that this lock can very quickly block the entire system.  If any of the channel cleanup code decides to block, it causes a problem for the whole system.  For example, when audiohooks get destroyed, if that blocks for a while waiting on the mixmonitor thread to exit because it's busy blocking on some I/O, it causes a problem for many other threads in the meantime.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/channel.c 354394 
> 
> Diff: https://reviewboard.asterisk.org/r/1712/diff
> 
> 
> Testing
> -------
> 
> Ran under load in a test environment, about 1/2 million calls
> 
> 
> Thanks,
> 
> Russell
> 
>

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


More information about the asterisk-dev mailing list