[asterisk-dev] [Code Review]: Deadlocks dealing with dialplan hints during reload.

Kevin P. Fleming kpfleming at digium.com
Tue Jul 12 08:27:06 CDT 2011


On 07/11/2011 03:57 PM, rmudgett wrote:

> 1) The patch does not erase the locking order concept for contexts ->  hints ->  hint.  The new lock _only_ searializes access to the containers between handle_statechange() and ast_merge_contexts_and_delete() because ast_merge_contexts_and_delete() could conceivably radically change the links in the data structures.  You could see it as changing the locking order to: new-lock ->  contexts ->  hints ->  hint.  However, the new lock only affects handle_statechange() and ast_merge_contexts_and_delete(); no other function.  The ast_merge_contexts_and_delete() is only called during a module reload.

Not quite; this function is also called any time a PBX registrar is 
added or removed from the system. However, that's probably an even rarer 
occurrence than a 'reload', so I doubt it affects the logic here.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list