[asterisk-bugs] [Asterisk 0014661]: MOH Realtime crash

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Apr 9 12:30:42 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14661 
====================================================================== 
Reported By:                sum
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14661
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.0.6 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-03-13 09:43 CDT
Last Modified:              2009-04-09 12:30 CDT
====================================================================== 
Summary:                    MOH Realtime crash
Description: 
Situation:

Queue realtime, musiconhold realtime class = prueba
I have default class on musiconhold.conf
When a call is made to the Queue checks that is not on memory so goes to
the db, I had 2 situations:

1)	If digit was #. Asterisk crash (check dump.txt)
2)	With no digit, when I check the classes (check memoryclasses.txt)

seems bad memory managment.

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

---------------------------------------------------------------------- 
 (0103024) svnbot (reporter) - 2009-04-09 12:30
 http://bugs.digium.com/view.php?id=14661#c103024 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 187421

U   trunk/res/res_musiconhold.c

------------------------------------------------------------------------
r187421 | mmichelson | 2009-04-09 12:30:41 -0500 (Thu, 09 Apr 2009) | 21
lines

Fix a crash in res_musiconhold when using cached realtime moh.

The moh_register function links an mohclass and then immediately
unrefs the class since the container now has a reference. The problem
with using realtime music on hold is that the class is allocated,
registered, and started in one fell swoop. The refcounting logic 
resulted in the count being off by one. The same problem did not
happen when using a static config because the allocation and registration
of an mohclass is a separate operation from starting moh. This also did
not affect non-cached realtime moh because the classes are not registered
at all.

I also have modified res_musiconhold to use the _t_ variants of the ao2_
functions so that more info can be gleaned when attempting to trace the
refcounts. I found this to be incredibly helpful for debugging this issue
and there's no good reason to remove it.

(closes issue http://bugs.digium.com/view.php?id=14661)
Reported by: sum


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

http://svn.digium.com/view/asterisk?view=rev&revision=187421 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-09 12:30 svnbot         Checkin                                      
2009-04-09 12:30 svnbot         Note Added: 0103024                          
======================================================================




More information about the asterisk-bugs mailing list