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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 20 08:19:11 CST 2010


The issue 0016554 has been set as DUPLICATE OF the following issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13505 
====================================================================== 
Reported By:                mav3rick
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   13505
Category:                   Channels/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 143334 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-09-17 11:06 CDT
Last Modified:              2010-01-20 08:19 CST
====================================================================== 
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
has duplicate       0016554 [patch] Huge memory leak
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-20 08:19 seanbright     Relationship added       has duplicate 0016554
======================================================================




More information about the asterisk-bugs mailing list