[asterisk-bugs] [Asterisk 0014357]: [patch] lockout after AEL reload
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Feb 18 09:49:12 CST 2009
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14357
======================================================================
Reported By: pj
Assigned To: murf
======================================================================
Project: Asterisk
Issue ID: 14357
Category: PBX/General
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 170794
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-01-28 13:01 CST
Last Modified: 2009-02-18 09:49 CST
======================================================================
Summary: [patch] lockout after AEL reload
Description:
My asterisk get locked, after AEL reload,
It seems, that it happen, if I use pattern match for hints in dialplan,
like:
hint(SIP/${EXTEN}) _ZXX! => NoOP;
CLI console output with some errors before lock happen is attached,
also 'core show locks' output is attached
======================================================================
----------------------------------------------------------------------
(0100306) svnbot (reporter) - 2009-02-18 09:49
http://bugs.digium.com/view.php?id=14357#c100306
----------------------------------------------------------------------
Repository: asterisk
Revision: 176944
_U branches/1.6.0/
U branches/1.6.0/main/pbx.c
------------------------------------------------------------------------
r176944 | murf | 2009-02-18 09:49:11 -0600 (Wed, 18 Feb 2009) | 53 lines
Merged revisions 176943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r176943 | murf | 2009-02-18 08:35:26 -0700 (Wed, 18 Feb 2009) | 45 lines
This patch fixes merge_contexts_and_delete so it does not deadlock when
hints are present.
Reason: when I re-engineered the merge_and_delete func to
reduce its lock time, I failed to notice that the
functions it calls still also do locking as before.
This leads to deadlocks on dialplan reloads, when
there are actually living, subscribed hints registered
in the system.
While the reporter come across this problem while using
AEL, I might note that these deadlocks should also happen
if extensions.conf were used.
Here I added these routines to pbx.c:
ast_add_extension_nolock
add_pri_lockopt
ast_add_extension2_lockopt
find_context
add_hint_nolock
All of the above routines are static and restricted
to be used only within pbx.c, and more specifically
within the merge_contexts_and_delete routine.
They are pretty much the same as their counterparts
except they don't lock contexts or hints.
Most of them now do the real work of their
name-alike, with optional locking via extra arguments,
and are called by their name-alike. The goal was to
have the original functions so they would behave
exactly as before.
Both PJ and I tested these fixes, and the deadlocking
problem is no longer encountered.
(closes issue http://bugs.digium.com/view.php?id=14357)
Reported by: pj
Patches:
14357.diff uploaded by murf (license 17)
Tested by: pj, murf
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=176944
Issue History
Date Modified Username Field Change
======================================================================
2009-02-18 09:49 svnbot Checkin
2009-02-18 09:49 svnbot Note Added: 0100306
======================================================================
More information about the asterisk-bugs
mailing list