[asterisk-bugs] [Asterisk 0017216]: [patch] Deadlock between ast_hangup and pri_dchannel
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri May 7 10:33:53 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17216
======================================================================
Reported By: lmsteffan
Assigned To: jpeeler
======================================================================
Project: Asterisk
Issue ID: 17216
Category: Channels/chan_dahdi
Reproducibility: random
Severity: major
Priority: normal
Status: acknowledged
Target Version: 1.6.2.9
Asterisk Version: SVN
JIRA: SWP-1328
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 236802
Request Review:
======================================================================
Date Submitted: 2010-04-20 19:49 CDT
Last Modified: 2010-05-07 10:33 CDT
======================================================================
Summary: [patch] Deadlock between ast_hangup and pri_dchannel
Description:
I think what causes the deadlock is the following :
Ast_hangup performs a lock of the channel then, through dahdi_hangup,
tries to lock the private (Dahdi) part of the channel.
Meanwhile, pri_dchannel first seizes the private part of the channel,
then, in ast_softhangup_nolock, tries to lock the channel that owns this
private part.
A deadlock occurs as both threads attempt to seize both deadlocks in
reverse order.
I include a full trace and a snapshot of the locks.
======================================================================
----------------------------------------------------------------------
(0121550) svnbot (reporter) - 2010-05-07 10:33
https://issues.asterisk.org/view.php?id=17216#c121550
----------------------------------------------------------------------
Repository: asterisk
Revision: 261866
U trunk/channels/sig_pri.c
------------------------------------------------------------------------
r261866 | jpeeler | 2010-05-07 10:33:52 -0500 (Fri, 07 May 2010) | 14
lines
Fix deadlock in sig_pri when hanging up.
The pri_dchannel thread currently violates locking order by locking the
private
and then attempting to queue a frame, which needs to lock the channel.
Queueing
a frame is unneccesary though and is actually a regression since sig_pri.
All the places that currently use ast_softhangup_nolock now will just set
the
softhangup value directly as before.
(closes issue https://issues.asterisk.org/view.php?id=17216)
Reported by: lmsteffan
Patches:
bug17216.patch uploaded by jpeeler (license 325)
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=261866
Issue History
Date Modified Username Field Change
======================================================================
2010-05-07 10:33 svnbot Note Added: 0121550
======================================================================
More information about the asterisk-bugs
mailing list