[asterisk-bugs] [Asterisk 0013505]: Memory leak in channel variables
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Sep 18 04:25:01 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: feedback
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-09-18 04:25 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).
======================================================================
----------------------------------------------------------------------
(0092655) pj (reporter) - 2008-09-18 04:25
http://bugs.digium.com/view.php?id=13505#c92655
----------------------------------------------------------------------
Asterisk SVN-trunk-r143405 + 20080917__bug13505__trunk__debug.diff.txt
allocation in config.c isn't growing anymore (still 10 allocations) after
22 calls processed, but instead, another modules starts leaking, mainly
chan_sip, and pbx.c, mmlog is clean
example of possible leaking modules:
55 bytes allocated in copy_vars at line 11725 of
chan_sip.c
63 bytes allocated in copy_vars at line 11725 of
chan_sip.c
63 bytes allocated in copy_vars at line 11725 of
chan_sip.c
55 bytes allocated in copy_vars at line 11725 of
chan_sip.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
28 bytes allocated in add_pattern_node at line 1430 of pbx.c
Issue History
Date Modified Username Field Change
======================================================================
2008-09-18 04:25 pj Note Added: 0092655
======================================================================
More information about the asterisk-bugs
mailing list