[Home]

Summary:ASTERISK-17092: [patch] moh reload leaks file descriptors to dahdi timing channel
Reporter:Kevin McAllister (mcallist)Labels:
Date Opened:2010-12-10 15:17:19.000-0600Date Closed:2011-02-01 11:05:40.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_musiconhold
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 18457-closetimer_trunk.diff
( 1) 18457-closetimer.diff
Description:Issuing an moh reload or even unload/load on res_musiconhold.so causes DAHDI_FILE_PSEUDO to be opened, and the old reference to the open file to be leaked.

This eventually can lead to exhaustion of the DAHDI channels and locking out of meetme usage.

****** ADDITIONAL INFORMATION ******

The calls to both load_module() and reload()
Call:
load_moh_classes()
moh_register()
init_app_class()

In init app class: class->pseudofd is clobbered and a new open is issued, with the previous fd never being closed.
Comments:By: Andrew Latham (lathama) 2010-12-17 11:21:40.000-0600

Could be related to https://issues.asterisk.org/view.php?id=18262

By: Jason Parker (jparker) 2011-01-03 16:54:55.000-0600

In theory, these patches should solve the leak.  I don't know that it's related to 18262, but it's possible.  I'll add a relationship in mantis anyways.

By: Kevin McAllister (mcallist) 2011-01-04 10:00:12.000-0600

I've applied the patch to my lab build and have validated that moh reload doesn't seem to be leaking descriptors any longer.  I plan some more tests before rolling to production but so far so good.

Thanks!

By: Ronald Chan (loloski) 2011-01-16 13:39:43.000-0600

mcallist,

I believed we have bumped the same issue as you do, could you please confirm if this patch fix your issue on your production environment?

Thanks

By: Kevin McAllister (mcallist) 2011-01-17 08:29:19.000-0600

I've not yet put it into production.  It's running fine in my lab under active development and test however.

By: Ronald Chan (loloski) 2011-01-21 05:42:54.000-0600

the patch has been put in production for 4 days now, no ill effects has been observed :D so far

By: Digium Subversion (svnbot) 2011-02-01 11:00:56.000-0600

Repository: asterisk
Revision: 305471

U   branches/1.4/res/res_musiconhold.c

------------------------------------------------------------------------
r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines

Close file descriptor for timing source when a MOH class gets destroyed.

(closes issue ASTERISK-17092)
Reported by: mcallist
Patches:
     18457-closetimer.diff uploaded by qwell (license 4)
     18457-closetimer_trunk.diff uploaded by qwell (license 4)
Tested by: qwell, loloski

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

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

By: Digium Subversion (svnbot) 2011-02-01 11:02:10.000-0600

Repository: asterisk
Revision: 305472

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

------------------------------------------------------------------------
r305472 | qwell | 2011-02-01 11:02:09 -0600 (Tue, 01 Feb 2011) | 16 lines

Merged revisions 305471 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines
 
 Close file descriptor for timing source when a MOH class gets destroyed.
 
 (closes issue ASTERISK-17092)
 Reported by: mcallist
 Patches:
       18457-closetimer.diff uploaded by qwell (license 4)
       18457-closetimer_trunk.diff uploaded by qwell (license 4)
 Tested by: qwell, loloski
........

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

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

By: Digium Subversion (svnbot) 2011-02-01 11:04:24.000-0600

Repository: asterisk
Revision: 305473

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

------------------------------------------------------------------------
r305473 | qwell | 2011-02-01 11:04:24 -0600 (Tue, 01 Feb 2011) | 23 lines

Merged revisions 305472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r305472 | qwell | 2011-02-01 11:02:09 -0600 (Tue, 01 Feb 2011) | 16 lines
 
 Merged revisions 305471 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines
   
   Close file descriptor for timing source when a MOH class gets destroyed.
   
   (closes issue ASTERISK-17092)
   Reported by: mcallist
   Patches:
         18457-closetimer.diff uploaded by qwell (license 4)
         18457-closetimer_trunk.diff uploaded by qwell (license 4)
   Tested by: qwell, loloski
 ........
................

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

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

By: Digium Subversion (svnbot) 2011-02-01 11:05:39.000-0600

Repository: asterisk
Revision: 305474

_U  trunk/
U   trunk/res/res_musiconhold.c

------------------------------------------------------------------------
r305474 | qwell | 2011-02-01 11:05:39 -0600 (Tue, 01 Feb 2011) | 30 lines

Merged revisions 305473 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r305473 | qwell | 2011-02-01 11:04:23 -0600 (Tue, 01 Feb 2011) | 23 lines
 
 Merged revisions 305472 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r305472 | qwell | 2011-02-01 11:02:09 -0600 (Tue, 01 Feb 2011) | 16 lines
   
   Merged revisions 305471 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines
     
     Close file descriptor for timing source when a MOH class gets destroyed.
     
     (closes issue ASTERISK-17092)
     Reported by: mcallist
     Patches:
           18457-closetimer.diff uploaded by qwell (license 4)
           18457-closetimer_trunk.diff uploaded by qwell (license 4)
     Tested by: qwell, loloski
   ........
 ................
................

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

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