[asterisk-bugs] [Asterisk 0018310]: hint state changes deadlock/race

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Nov 17 01:27:53 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18310 
====================================================================== 
Reported By:                one47
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18310
Category:                   Core/PBX
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.14 
JIRA:                       SWP-2541 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-11-15 12:19 CST
Last Modified:              2010-11-17 01:27 CST
====================================================================== 
Summary:                    hint state changes deadlock/race
Description: 
VERY similar to https://issues.asterisk.org/view.php?id=18165, but this is a
different deadlock path, so I have
raised a separate report.

Thread 1: taskprocessor  -> handle_statechange
    Lock order = conlock, hints, hint, pvt
Thread 2: chan_sip.c:  handle_request_do -> handle_response_notify
    Lock order = pvt, conlock

Thread2 only gets into the conlock if STATECHANGEQUEUE is true, ie. there
are rapid state changes happening on a subscribed hint.
====================================================================== 

---------------------------------------------------------------------- 
 (0128913) schmidts (manager) - 2010-11-17 01:27
 https://issues.asterisk.org/view.php?id=18310#c128913 
---------------------------------------------------------------------- 
what i can see from the code is that the function ast_get_hint_extension is
called from 2 different locations in the code:
1) inside pbx.c when initialising hints by reading them from the config
file. They still should use the pbx_get_extension code part.
2) outside pbx.c like chan_sip.c which want to match a hint for
statechange. they use ast_get_hint to search the right exten.

IMO the lock only happens for the second type of functions and for this
functions we could use the container cause the hints are allready there. 
I have allready tried this but i had some problems so it took some time to
fix it. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-17 01:27 schmidts       Note Added: 0128913                          
======================================================================




More information about the asterisk-bugs mailing list