[asterisk-bugs] [Asterisk 0012664]: [patch] MWI messages using MD message mutex and conditions

noreply at bugs.digium.com noreply at bugs.digium.com
Thu May 15 13:47:49 CDT 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12664 
====================================================================== 
Reported By:                tomo1657
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12664
Category:                   Resources/res_smdi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 116349 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-15-2008 13:47 CDT
Last Modified:              05-15-2008 13:47 CDT
====================================================================== 
Summary:                    [patch] MWI messages using MD message mutex and
conditions
Description: 
There are mutex and condition vars for each SMDI message type: MD and MWI.
iface->md_q_lock
iface->md_q_cond
iface->mwi_q_lock
iface->mwi_q_cond

The function ast_cond_timedwait() is called from both functions
ast_smdi_md_message() and ast_smdi_mwi_message(), but it uses md_q_lock and
md_q_cond for both types of SMDI messages.

This results in lock.h failing to wait on the condition and mutex and
floods the console with warning messages whenever ast_smdi_mwi_message() is
called:

lock.h:648 __ast_cond_timedwait: res_smdi.c line 443
(smdi_message_wait): mutex '&iface->md_q_lock' freed more times than
we've locked!
lock.h:665 __ast_cond_timedwait: res_smdi.c line 443
(smdi_message_wait): Error waiting on condition mutex 'Operation not
permitted'

This would also mean that the MWI mutex is not being used.

The fix is to make sure ast_cond_timedwait() use the correct variables
when calling ast_cond_timedwait().
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-15-08 13:47  tomo1657       Asterisk Version          => SVN             
05-15-08 13:47  tomo1657       SVN Branch (only for SVN checkou => N/A          
  
05-15-08 13:47  tomo1657       SVN Revision (number only!) => 116349          
======================================================================




More information about the asterisk-bugs mailing list