[asterisk-bugs] [Asterisk 0016677]: deadlock in app_queue with use_weight during reload

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 22 17:47:51 CST 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16677 
====================================================================== 
Reported By:                tim_ringenbach
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16677
Category:                   Applications/app_queue
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.29 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-22 17:47 CST
Last Modified:              2010-01-22 17:47 CST
====================================================================== 
Summary:                    deadlock in app_queue with use_weight during reload
Description: 
There's a deadlock possible in app_queue if the use_weight global variable
is set, and someone reloads app_queue at the right point in time while a
call is coming in. The call's thread locks the queue list lock, but doesn't
unlock it, resulting in a dead lock when other threads try to do anything
with the queue list.

To reproduce easily, add a sleep() between the first if (use_weight) and
grabbing the lock.

I'll attach a patch that fixes the problem by using a local variable to
store a copy of use_weight.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-22 17:47 tim_ringenbach New Issue                                    
2010-01-22 17:47 tim_ringenbach Asterisk Version          => 1.4.29          
2010-01-22 17:47 tim_ringenbach Regression                => No              
2010-01-22 17:47 tim_ringenbach SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list