[asterisk-bugs] [Asterisk 0013235]: Memory leak in Asterisk 1.4 and Trunk

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Aug 30 15:34:40 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13235 
====================================================================== 
Reported By:                falves11
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13235
Category:                   Core/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!): 13058 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-04 18:31 CDT
Last Modified:              2008-08-30 15:34 CDT
====================================================================== 
Summary:                    Memory leak in Asterisk 1.4 and Trunk
Description: 
Both versions of Asterisk have a huge memory leak. I thought that it was
Trunk only and ported my app to 1.4. After 1 day and 17 hours the memory
has gone up 1.2 GB. I only have 300 open calls. My machine is open for
inspection. I am not using "malloc debug" and "don't optimize", for
performance reasons,but I will restart tonight the server. if somebody
wants to suggest any diagnostic technique, please let me know before I
restart.
====================================================================== 

---------------------------------------------------------------------- 
 (0091940) falves11 (reporter) - 2008-08-30 15:34
 http://bugs.digium.com/view.php?id=13235#c91940 
---------------------------------------------------------------------- 
I believe to have found the issue of the dramatic memory leak. It seems to
be unrelated to CDR or ODBC. It is the Dial function:
I wrote a simple dialplan like this:
exten =>_X.,1,Set(i=100000)
exten =>_X.,n,While($[${i} >= 0])
exten =>_X.,n,Dial(SIP/333333333333 at xx.xx.xx.xx) ; call to cisco fails
immediately
exten =>_X.,n,Set(i=$[${i} - 1])
exten =>_X.,n,EndWhile

I sent 12 calls only to the loop, using two SIP phones, and the memory
keeps growing as it shows this command:
ps auxf --width=200 | grep -v grep | grep usr/sbin/asterisk

Over time, the memory will exhaust and Asterisk will have to be restarted. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-30 15:34 falves11       Note Added: 0091940                          
======================================================================




More information about the asterisk-bugs mailing list