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

rmudgett reviewboard at asterisk.org
Mon Feb 6 09:51:37 CST 2012


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



/branches/1.8/main/channel.c
<https://reviewboard.asterisk.org/r/1712/#comment10002>

    We need to remove the framehooks and audiohooks between these lines here as well or noone else will.  The pending masquerade will just release the channel.



/branches/1.8/main/channel.c
<https://reviewboard.asterisk.org/r/1712/#comment10003>

    The zombie flag needs to be set before the unlock and unlinking from the container or a pickup race will occur.  Also since the zombie flag is tested later, we need to save the current zombie flag before setting it.


- rmudgett


On Feb. 5, 2012, 4:27 a.m., Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1712/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2012, 4:27 a.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 354045 
> 
> 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/20120206/f34d08d1/attachment-0001.htm>


More information about the asterisk-dev mailing list