[asterisk-bugs] [Asterisk 0016840]: [patch] Deadlock in chan_local when obtaining locks on local_pvt->lock
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Apr 2 18:47:59 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16840
======================================================================
Reported By: bzing2
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 16840
Category: Channels/chan_local
Reproducibility: random
Severity: major
Priority: normal
Status: closed
Asterisk Version: 1.6.2.2
JIRA: SWP-925
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-02-16 11:40 CST
Last Modified: 2010-04-02 18:47 CDT
======================================================================
Summary: [patch] Deadlock in chan_local when obtaining locks
on local_pvt->lock
Description:
Deadlock condition in chan_local when two brideged threads attempt to
obtain
locks to eachothers local_pvt structures in the opposite order. All
processing of SIP traffic halts when an attempt is made to hangup the
call.
Thread A obtains a lock to its local_pvt->lock when in local_write. When
in check_bridge a call is made to ast_bridged_channel, this in turn calls
local_bridgedchannel which attempts to obtain a lock on the bridged
channels
local_pvt->lock.
Thread B follows a similar path. It holds its own lock, and during a call
to
ast_channel_masquerade again local_bridgedchannel is called. This
attempts to
obtain a lock to the bridged channel.
At this point either side has deadlocked. Then a user attempts to hangup
the
call and again local_bridgedchannel is called, and blocks while attempting
to
get the lock. Unfortunalty sip netlock is held and everything grinds to a
halt.
======================================================================
----------------------------------------------------------------------
(0120107) svnbot (reporter) - 2010-04-02 18:47
https://issues.asterisk.org/view.php?id=16840#c120107
----------------------------------------------------------------------
Repository: asterisk
Revision: 256017
_U branches/1.6.1/
U branches/1.6.1/channels/chan_local.c
------------------------------------------------------------------------
r256017 | russell | 2010-04-02 18:47:58 -0500 (Fri, 02 Apr 2010) | 23
lines
Merged revisions 256015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r256015 | russell | 2010-04-02 18:46:45 -0500 (Fri, 02 Apr 2010) | 16
lines
Merged revisions 256014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r256014 | russell | 2010-04-02 18:45:56 -0500 (Fri, 02 Apr 2010) | 9
lines
Resolve a deadlock that occurs due to a pointless call to
ast_bridged_channel()
(closes issue https://issues.asterisk.org/view.php?id=16840)
Reported by: bzing2
Patches:
patch.txt uploaded by bzing2 (license 902)
issue_16840.rev1.diff uploaded by russell (license 2)
Tested by: bzing2, russell
........
................
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=256017
Issue History
Date Modified Username Field Change
======================================================================
2010-04-02 18:47 svnbot Checkin
2010-04-02 18:47 svnbot Note Added: 0120107
======================================================================
More information about the asterisk-bugs
mailing list