[asterisk-bugs] [Asterisk 0015637]: [patch] Deadlock after peer answeres queue call

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Aug 10 12:11:05 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15637 
====================================================================== 
Reported By:                cstadlmann
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15637
Category:                   Core/Channels
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 204834 
Request Review:              
====================================================================== 
Date Submitted:             2009-08-03 08:43 CDT
Last Modified:              2009-08-10 12:11 CDT
====================================================================== 
Summary:                    [patch] Deadlock after peer answeres queue call
Description: 
We have the following set up:

Asterisk is hosting a queue with 4 members, ring strategy 'least recent'.
The complete setup is realtime, but I don't think this has anything to do
with the deadlock.

The queue is playing MOH, which is a wav-file (no .mp3). After the SIP
peer answeres the call, MOH stops playing, and exactly in this moment the
deadlock occurs.

It does not matter if queue members are 'Local/' or 'SIP/' channels,
patching Asterisk as stated in Bug 14112 only makes the deadlock occur
every 6 hours, with SIP channels the deadlock occurs every 3 hours or so.

The only way to get Asterisk running again is to 'kill -9' the process. No
other CLI command than one 'core show locks' is working, any subsequent CLI
command does not produce any response anymore.
====================================================================== 

---------------------------------------------------------------------- 
 (0108856) cstadlmann (reporter) - 2009-08-10 12:11
 https://issues.asterisk.org/view.php?id=15637#c108856 
---------------------------------------------------------------------- 
Just right before the line 16751 of chan_sip.c, there are the following
lines in the code:

			/*! \note If we can't get a lock on an interface, skip it and come
			 * back later. Note that there is the possibility of a deadlock with
			 * sip_hangup otherwise, because sip_hangup is called with the channel
			 * locked first, and the iface lock is attempted second.
			 */
			if (ast_mutex_trylock(&sip->lock))
				continue;

Sorry, I was a kind of blind not to read what's in the comment, which
states that there IS a possibility of deadlock...

So please could you assist in coping with that issue? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-10 12:11 cstadlmann     Note Added: 0108856                          
======================================================================




More information about the asterisk-bugs mailing list