[asterisk-bugs] [Asterisk 0013505]: Memory leak in channel variables

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Oct 14 17:21:26 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13505 
====================================================================== 
Reported By:                mav3rick
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   13505
Category:                   Channels/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 143334 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-17 11:06 CDT
Last Modified:              2008-10-14 17:21 CDT
====================================================================== 
Summary:                    Memory leak in channel variables
Description: 
I detected the leak on Asterisk 1.4.21.2. I reproduced the bug easily on
the SVN trunk version. 

After 5000 calls, Asterisk is using more than 500Mb. 

I recompiled with MALLOC_DEBUG (and DONT_OPTIMIZE), and after around 500
calls I found :

661364 bytes in 6321 allocations in file 'config.c'
(numbers increase with calls).

That was the only abnormal allocation (and the only increasing).

All 'config.c' allocations are :

XX bytes allocated in ast_variable_new at line 240 of config.c
(appeared a lot of times with different values).

I added debug to config.c to know which variable was concerned. The only
variables I saw was the variables I set in call files (outgoing calls).

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0013543 Memory leacks in stress test with failure
====================================================================== 

---------------------------------------------------------------------- 
 (0093653) Corydon76 (administrator) - 2008-10-14 17:21
 http://bugs.digium.com/view.php?id=13505#c93653 
---------------------------------------------------------------------- 
pj: the additional dumps are not helpful.  I am closing out this issue, as
it solves the issue for the original reporter.  You are welcome to open a
new issue with your output, but additional research is needed as to where
chan_sip is actually leaking.  We can all see that it is leaking, but the
problem is that it's not easy to figure out where the memory should be
freed (or rather why the memory isn't being freed where it should be). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-14 17:21 Corydon76      Note Added: 0093653                          
======================================================================




More information about the asterisk-bugs mailing list