[asterisk-bugs] [Asterisk 0010895]: deadlock between ast_softhangup and zt_bridge (using mixmonitor on bridged channels)
noreply at bugs.digium.com
noreply at bugs.digium.com
Fri Oct 5 11:23:57 CDT 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=10895
======================================================================
Reported By: peterh
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 10895
Category: Channels/chan_zap
Reproducibility: random
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.4.11
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 10-05-2007 05:44 CDT
Last Modified: 10-05-2007 11:23 CDT
======================================================================
Summary: deadlock between ast_softhangup and zt_bridge (using
mixmonitor on bridged channels)
Description:
mixmonitor claims channel->lock (c1) and makes ast_softhangup for
the bridged peer(c0) but chan_zap holds the lock for c0 -> deadlock
--- chan_zap.c.orig 2007-08-14 11:09:09.000000000 +0200
+++ chan_zap.c 2007-10-04 16:31:01.000000000 +0200
@@ -3338,7 +3338,10 @@
/* Here's our main loop... Start by locking things,
looking for private parts,
and then balking if anything is wrong */
ast_mutex_lock(&c0->lock);
- ast_mutex_lock(&c1->lock);
+ if (ast_mutex_trylock(&c1->lock)) {
+ ast_mutex_unlock(&c0->lock);
+ continue;
+ }
p0 = c0->tech_pvt;
p1 = c1->tech_pvt;
======================================================================
----------------------------------------------------------------------
svnbot - 10-05-07 11:23
----------------------------------------------------------------------
Repository: asterisk
Revision: 84783
U branches/1.4/channels/chan_zap.c
------------------------------------------------------------------------
r84783 | russell | 2007-10-05 11:23:56 -0500 (Fri, 05 Oct 2007) | 4 lines
Do deadlock avoidance in a couple more places. You can't lock two
channels
at the same time without doing extra work to make sure it succeeds.
(closes issue http://bugs.digium.com/view.php?id=10895, patch by me)
------------------------------------------------------------------------
Issue History
Date Modified Username Field Change
======================================================================
10-05-07 11:23 svnbot Checkin
10-05-07 11:23 svnbot Note Added: 0071535
10-05-07 11:23 svnbot Status new => assigned
10-05-07 11:23 svnbot Assigned To => russell
======================================================================
More information about the asterisk-bugs
mailing list