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

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Apr 9 14:15:50 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14661 
====================================================================== 
Reported By:                sum
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   14661
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-03-13 09:43 CDT
Last Modified:              2009-04-09 14:15 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.

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

---------------------------------------------------------------------- 
 (0103045) svnbot (reporter) - 2009-04-09 14:15
 http://bugs.digium.com/view.php?id=14661#c103045 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 187496

_U  branches/1.6.2/
U   branches/1.6.2/res/res_musiconhold.c

------------------------------------------------------------------------
r187496 | mmichelson | 2009-04-09 14:15:50 -0500 (Thu, 09 Apr 2009) | 31
lines

Merged revisions 187421,187424 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r187421 | mmichelson | 2009-04-09 12:30:39 -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
........
  r187424 | mmichelson | 2009-04-09 12:34:39 -0500 (Thu, 09 Apr 2009) | 3
lines
  
  Use safe macro practices even though they really aren't necessary.
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-09 14:15 svnbot         Checkin                                      
2009-04-09 14:15 svnbot         Note Added: 0103045                          
======================================================================




More information about the asterisk-bugs mailing list