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

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 14 14:19:51 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15023 
====================================================================== 
Reported By:                cristiandimache
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15023
Category:                   Addons/res_config_mysql
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-05-03 14:09 CDT
Last Modified:              2009-05-14 14:19 CDT
====================================================================== 
Summary:                    [patch] 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.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015090 [patch] chan_sip random deadlock
====================================================================== 

---------------------------------------------------------------------- 
 (0104774) svnbot (reporter) - 2009-05-14 14:19
 https://issues.asterisk.org/view.php?id=15023#c104774 
---------------------------------------------------------------------- 
Repository: asterisk-addons
Revision: 913

_U  branches/1.6.1/
U   branches/1.6.1/res/res_config_mysql.c

------------------------------------------------------------------------
r913 | tilghman | 2009-05-14 14:19:50 -0500 (Thu, 14 May 2009) | 14 lines

Merged revisions 910 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-addons/trunk

........
  r910 | tilghman | 2009-05-14 14:16:53 -0500 (Thu, 14 May 2009) | 7 lines
  
  Change database list to be rwlist locks, to avoid a potential deadlock
between 2 readers.
  (closes issue https://issues.asterisk.org/view.php?id=15023, related to issue
https://issues.asterisk.org/view.php?id=15090)
   Reported by: cristiandimache
   Patches: 
         20090514__issue15090.diff.txt uploaded by tilghman (license 14)
   Tested by: cristiandimache
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk-addons?view=rev&revision=913 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-14 14:19 svnbot         Checkin                                      
2009-05-14 14:19 svnbot         Note Added: 0104774                          
======================================================================




More information about the asterisk-bugs mailing list