[asterisk-bugs] [Asterisk 0011862]: Possible deadlock on realtime queues.

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jan 29 11:41:36 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11862 
====================================================================== 
Reported By:                flujan
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   11862
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.17 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-29-2008 07:07 CST
Last Modified:              01-29-2008 11:41 CST
====================================================================== 
Summary:                    Possible deadlock on realtime queues.
Description: 
After some time working queues stop working. I try to place calls and it
works, i can even place members on a queue but the callers are not
delivered to the agents.


Recompiled asterisk with DONT_OPTIMIZE and DEBUG_THREADS and the core show
locks of the problems follows.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 01-29-08 11:41  
---------------------------------------------------------------------- 
There is a three-way deadlock here, and like most deadlocks it is caused by
an invalid locking order in certain cases. Two of the three threads
involved in the deadlock (threads 3070786448 and 3033901968) are doing what
seems logical. The other thread (thread 3036162960), however, is where the
real problem seems to be. The add_to_interfaces function locks the
interfaces lock, and this lock is all that is needed. However, prior to
being called, in some cases it has the queue list locked, and in other
cases it has a queue locked. What needs to happen here is that no locks
need to be held prior to calling add_to_interfaces. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-29-08 11:41  putnopvut      Note Added: 0081344                          
======================================================================




More information about the asterisk-bugs mailing list