[asterisk-bugs] [Asterisk 0011999]: memory leak

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Apr 15 16:01:18 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11999 
====================================================================== 
Reported By:                destiny6628
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11999
Category:                   Core-General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.18 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             02-15-2008 01:20 CST
Last Modified:              04-15-2008 16:01 CDT
====================================================================== 
Summary:                    memory leak
Description: 
hi we are using asterisk 1.4.18 , zaptel-1.4.8 and libpri 1.4.3 with 4 e1
card on ibm x3200 server and 90 active calls running on asterisk cli and
after some hours of dialing , swap memory starts getting used and asterisk
gives core dump .

Asterisk is running with safe_asterisk.

vmstat ouput is as follows 

[root at localhost cron]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system--
-----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id
wa st
 1  0    568  57308  44708 1848488    0    0    10   119 1293  509  2  2
95  0  0

Free -m is as follows 

[root at localhost cron]# free -m
             total       used       free     shared    buffers     cached
Mem:          2025       1974         51          0         43       1806
-/+ buffers/cache:        124       1901
Swap:         1983          0       1983


OPERATING SYSTEM is centos 5 and kernel version is [root at localhost cron]#
uname -a
Linux localhost.localdomain 2.6.18-8.el5 http://bugs.digium.com/view.php?id=1
SMP Thu Mar 15 19:57:35 EDT
2007 i686 i686 i386 GNU/Linux

Cannot do valgrind test as it put heavy load on the server and its a
production server .

RAM On the server is 2GB .

Only Asterisk application is running on that .



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0012008 Asterisk Frequent Crash
has duplicate       0011991 Zap procedding is coming twice
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 04-15-08 16:01  
---------------------------------------------------------------------- 
Here's an explanation of what is happening.

When you place a call to a Zap channel, app_dial tries to read a frame
from the channel. In the case that the Zap channel was busy, its DSP
detects the busy signal and stores a "busy" frame. Chan_zap passes a
reference to this frame to app_dial. app_dial's reaction upon seeing a
"busy" frame is to hang up the channel. When the channel is hung up, its
DSP is freed, meaning that the reference that app_dial has to the frame is
no longer valid, so any operations that are made on that frame require
reading or writing invalid memory. The fix necessary is a bit bizarre, but
because there is precedent for such a change, it shouldn't take too long to
make the change.

Thanks for your patience on this and thanks very much for providing the
valgrind output. I understand that could put extra load on your already
busy systems, but the data that it provides is hands-down more helpful than
anything else when it comes to memory corruption errors. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-15-08 16:01  putnopvut      Note Added: 0085526                          
======================================================================




More information about the asterisk-bugs mailing list