[Home]

Summary:ASTERISK-13075: Memory Leakage
Reporter:Visu Kaka (visu)Labels:
Date Opened:2008-11-17 02:40:40.000-0600Date Closed:2011-06-07 14:03:26
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Asterisk trunk version (157167) seems to have a major memory leak. The memory leak increases with evey call and never reclaims.

[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.8  4.1 28948 10600 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  2.0  4.3 29348 10976 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  2.0  4.3 29348 11004 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.9  4.3 29348 11036 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.6  4.3 29348 11064 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.6  4.3 29480 11092 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.7  4.3 29480 11124 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]# ps aux | grep asterisk | grep -v grep
root     27631  1.6  4.3 29480 11152 pts/4   Sl+  11:01   0:00 asterisk -c
[root@centos sounds]#    

Let me know if more information required.            

****** ADDITIONAL INFORMATION ******


Dialplan is as simple as

exten => 100, 1, Dial(SIP/123456789@provider)
exten => 100, n, Hangup

exten => 101, 1, Playback(beep)
exten => 101, n, Hangup

If I dial 101, memory remains stable. Memory leak occurs when I dial 100
Comments:By: Terry Wilson (twilson) 2008-11-17 11:07:23.000-0600

This is not the proper way to see if memory is leaking.  Modern OSes will always use memory if it is available.  The number that ps is giving back to you is useless.  If you suspect a memory leak, compile asterisk with MALLOC_DEBUG and use the 'memory show summary' and 'memory show allocations' commands to print out how much memory asterisk is actually using (as opposed to what is being cached in memory by the OS).  I am closing for now, since this is most likely not a bug.  If you find some real numbers through MALLOC_DEBUG, feel free to reopen this issue and post your findings.  (just for fun, I tested with this and got the same number of allocations before and after the call had completed)