[asterisk-bugs] [Asterisk 0015023]: Bad locking logic on res_config_mysql.c

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 4 12:53:45 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=15023 
====================================================================== 
Reported By:                cristiandimache
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15023
Category:                   Addons/res_config_mysql
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.1.0 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-03 14:09 CDT
Last Modified:              2009-05-04 12:53 CDT
====================================================================== 
Summary:                    Bad locking logic on res_config_mysql.c
Description: 
store_mysql calls find_database(), which locks the database handle.
Then, it calls internal_require(), which calls require_mysql(), which
calls find_table(), which calls find_database(), thus requesting a new lock
on the database handle.
I could be wrong in the call chain, but the result is always the same:
Asterisk stops waiting for a lock to be released.
====================================================================== 

---------------------------------------------------------------------- 
 (0104111) tilghman (administrator) - 2009-05-04 12:53
 http://bugs.digium.com/view.php?id=15023#c104111 
---------------------------------------------------------------------- 
Okay, then compile with 'DEBUG_THREADS' and obtain a 'core show locks' when
this occurs.

A lockup should not occur, because we're using recursive locks in
Asterisk.  The fact that a mutex was already locked by our same thread
isn't relevant to our programming model. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-04 12:53 tilghman       Note Added: 0104111                          
======================================================================




More information about the asterisk-bugs mailing list