[Home]

Summary:ASTERISK-14372: [patch] Memory leak in func_audiohookinherit.c
Reporter:Grigoriy Puzankin (boroda)Labels:
Date Opened:2009-06-25 05:35:03Date Closed:2009-11-10 16:23:13.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug15394_memoryleak_diff2.txt
Description:After processing 2881 calls "memory show summary" shows 2877 allocations:
91868 bytes in 2877 allocations in file 'func_audiohookinherit.c'

Each call in dialplan has priority with Set(AUDIOHOOK_INHERIT(MixMonitor)=yes).

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

Later, when a little bit more calls processed:
# asterisk -rx "memory show allocations" | grep func_audiohookinherit | sort | uniq -c
13         18 bytes allocated in setup_inheritable_audiohook at line   133 of func_audiohookinherit.c
2878         32 bytes allocated in setup_inheritance_datastore at line   110 of func_audiohookinherit.c
Comments:By: David Brooks (dbrooks) 2009-07-08 16:01:56

I spoke with the original author of that function, and this patch is the result. Please see if it fixes the problem. Thanks!

By: Grigoriy Puzankin (boroda) 2009-07-09 02:24:09

Patched and compiled successfully. I could restart asterisk on next day. Then I'll report if memory leak fixed.

By: Grigoriy Puzankin (boroda) 2009-07-10 00:20:25

After 45 calls processed and with 6 active calls:

# asterisk -rx "memory show allocations" | grep func_audiohookinherit | sort | uniq -c

6         18 bytes allocated in setup_inheritable_audiohook at line   133 of func_audiohookinherit.c
45         32 bytes allocated in setup_inheritance_datastore at line   110 of func_audiohookinherit.c

By: David Brooks (dbrooks) 2009-07-13 14:50:14

Sorry, I made a mistake there. Please try the new patch I just uploaded. It should work for you.

By: Grigoriy Puzankin (boroda) 2009-07-15 01:22:50

It's ok now. Number of allocations equals to number of active calls. With no active calls there are no allocations in func_audiohookinherit.

By: David Brooks (dbrooks) 2009-09-16 16:22:19

is it safe to assume that I can commit this patch?

By: Grigoriy Puzankin (boroda) 2009-10-09 01:04:55

If your question was addressed to me, then my answer is yes. Server has been working great for about 2 months.

By: Digium Subversion (svnbot) 2009-11-06 09:10:00.000-0600

Repository: asterisk
Revision: 228268

U   trunk/funcs/func_audiohookinherit.c

------------------------------------------------------------------------
r228268 | dvossel | 2009-11-06 09:10:00 -0600 (Fri, 06 Nov 2009) | 9 lines

fixes memory leak in func_audiohookinherit.c

(closes issue ASTERISK-14372)
Reported by: boroda
Patches:
     bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790)
Tested by: dbrooks, boroda


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

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

By: Digium Subversion (svnbot) 2009-11-06 09:10:58.000-0600

Repository: asterisk
Revision: 228269

_U  branches/1.6.2/
U   branches/1.6.2/funcs/func_audiohookinherit.c

------------------------------------------------------------------------
r228269 | dvossel | 2009-11-06 09:10:58 -0600 (Fri, 06 Nov 2009) | 15 lines

Merged revisions 228268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r228268 | dvossel | 2009-11-06 09:04:24 -0600 (Fri, 06 Nov 2009) | 9 lines
 
 fixes memory leak in func_audiohookinherit.c
 
 (closes issue ASTERISK-14372)
 Reported by: boroda
 Patches:
       bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790)
 Tested by: dbrooks, boroda
........

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

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

By: Digium Subversion (svnbot) 2009-11-06 09:11:23.000-0600

Repository: asterisk
Revision: 228270

_U  branches/1.6.1/
U   branches/1.6.1/funcs/func_audiohookinherit.c

------------------------------------------------------------------------
r228270 | dvossel | 2009-11-06 09:11:23 -0600 (Fri, 06 Nov 2009) | 15 lines

Merged revisions 228268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r228268 | dvossel | 2009-11-06 09:04:24 -0600 (Fri, 06 Nov 2009) | 9 lines
 
 fixes memory leak in func_audiohookinherit.c
 
 (closes issue ASTERISK-14372)
 Reported by: boroda
 Patches:
       bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790)
 Tested by: dbrooks, boroda
........

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

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

By: Digium Subversion (svnbot) 2009-11-06 09:11:55.000-0600

Repository: asterisk
Revision: 228271

_U  branches/1.6.0/
U   branches/1.6.0/funcs/func_audiohookinherit.c

------------------------------------------------------------------------
r228271 | dvossel | 2009-11-06 09:11:55 -0600 (Fri, 06 Nov 2009) | 15 lines

Merged revisions 228268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r228268 | dvossel | 2009-11-06 09:04:24 -0600 (Fri, 06 Nov 2009) | 9 lines
 
 fixes memory leak in func_audiohookinherit.c
 
 (closes issue ASTERISK-14372)
 Reported by: boroda
 Patches:
       bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790)
 Tested by: dbrooks, boroda
........

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

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