[Asterisk-code-review] pbx: Deadlock between contexts container and context merge l... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Jan 6 13:58:29 CST 2016


Joshua Colp has posted comments on this change.

Change subject: pbx: Deadlock between contexts container and context_merge locks
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.asterisk.org/#/c/1857/2/main/pbx.c
File main/pbx.c:

Line 3871: 	/*
         : 	 * Hold off ast_merge_contexts_and_delete, but do it by holding the contexts lock.
         : 	 * If the context_merge_lock is held there is the potential for a deadlock.
         : 	 */
         : 	ast_rdlock_contexts();
> I may need more clarification. This is how I understood the problem:
That is the current problem - however it was introduced as a result of the original fix, and as we've seen stuff can behave in unpredictable ways and going back to locking we know worked originally is a good thing. That's what this new approach should attempt to do.


Line 3944: static void hint_change_cb(void *unused, struct stasis_subscription *sub, struct stasis_message *msg)
> I had originally thought about that, but it is going to require some refact
I think the impact of making changes to those functions shouldn't be THAT bad. I'd prefer it over changing locking.


-- 
To view, visit https://gerrit.asterisk.org/1857
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f67ce4b4c94b731c23932cc2ba9e0a4a720813d
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list