[asterisk-dev] [Code Review] Fix a deadlock in agents occuring due to trying to lock a channel while having a lock on the pvt.
jrose
reviewboard at asterisk.org
Thu Feb 2 09:01:23 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1708/
-----------------------------------------------------------
(Updated Feb. 2, 2012, 9:01 a.m.)
Review request for Asterisk Developers, Mark Michelson, rmudgett, and Matt Jordan.
Changes
-------
Fixes the issue with using ast_indicate_data while holding pvt lock Richard mentioned before.
I'm not 100% sure how safe it is to use p->moh on this occasion, but when I looked into copying a string over I became a little daunted at the idea of copying the string to use with the function since it would either die pretty quickly or need to be freed somewhere.
Summary
-------
Also adds locking to a number of other functions which are calling ast_bridged_channel (which is documented as requiring a lock for safe running, which was the purpose of irroot's original locking patch in action_agents.
Unlike the other patch on reviewboard right now, this opts to enforce locking order instead of using deadlock avoidance.
Celebrity endorsement: "This looks incredibly sane to me." - MMichelson
This addresses bug ASTERISK-19285.
https://issues.asterisk.org/jira/browse/ASTERISK-19285
Diffs (updated)
-----
/branches/1.8/channels/chan_agent.c 353685
Diff: https://reviewboard.asterisk.org/r/1708/diff
Testing
-------
Not much I'm afraid to say. I can't reproduce the issue since it involves real world use over a period of time. I'll ask Alex Villacís Lasso to give it a shot though.
Thanks,
jrose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120202/9bbf07f6/attachment.htm>
More information about the asterisk-dev
mailing list