[asterisk-bugs] [Asterisk 0019394]: missing ast_channel_lock() in func_odbc.c function acf_fetch()

Asterisk Bug Tracker noreply at bugs.digium.com
Tue May 31 18:24:53 CDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19394 
====================================================================== 
Reported By:                archie172
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19394
Category:                   Functions/func_odbc
Reproducibility:            random
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-31 18:24 CDT
Last Modified:              2011-05-31 18:24 CDT
====================================================================== 
Summary:                    missing ast_channel_lock() in func_odbc.c function
acf_fetch()
Description: 
We occasionally see Asterisk threads getting hung/deadlocked while
attempting an ODBC call to the database.

Visual inspection revealed a possible cause, which is a failure to lock
the channel before invoking ast_channel_datastore_find() in acf_fetch().
See attached patch.

Although we are using and obsolete version of Asterisk (1.6.0), this bug
exists in all versions of Asterisk up through trunk.

This is just a hunch and completely unverified. However, it should take
only 5 seconds to confirm or reject this bug (I'm not an Asterisk locking
expert so I'm sure myself).

If this bug is real, I would very much appreciate any insight into whether
it would possibly cause the symptoms we are seeing, i.e., channels
deadlocking while attempting ODBC queries.


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-31 18:24 archie172      New Issue                                    
2011-05-31 18:24 archie172      Asterisk Version          => SVN             
2011-05-31 18:24 archie172      Regression                => No              
2011-05-31 18:24 archie172      SVN Branch (only for SVN checkouts, not tarball
releases) =>  trunk          
======================================================================




More information about the asterisk-bugs mailing list