[asterisk-bugs] [Asterisk 0017081]: [patch] Memory Leak in app_queue

Asterisk Bug Tracker noreply at bugs.digium.com
Wed May 5 17:02:40 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17081 
====================================================================== 
Reported By:                wliegel
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   17081
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2.9
Asterisk Version:           1.6.0.26 
JIRA:                       SWP-1136 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-03-23 07:12 CDT
Last Modified:              2010-05-05 17:02 CDT
====================================================================== 
Summary:                    [patch] Memory Leak in app_queue
Description: 
Hello,
on a system with lots of realtime queues I have a problem with very high
memory consumption in app_queue.
According to "memory show summary", there is a high number of allocations
in
/usr/src/asterisk-1.6.0.26/include/asterisk/strings.h:390 (>5.000.000
allocations per Day) as well as high memory consumption in app_queue.c:1449
in only a few allocations (>1GB in 778 allocations).

This issue is simply reproducible by typing "queue show" several times in
the cli and watch the allocation summary.
The more (realtime?)queues are configured the faster grows the memory
consumption after each "queue show" command.
====================================================================== 

---------------------------------------------------------------------- 
 (0121446) wliegel (reporter) - 2010-05-05 17:02
 https://issues.asterisk.org/view.php?id=17081#c121446 
---------------------------------------------------------------------- 
I set up a test environment with 40 realtime queues patched with your
changes.
Your patch seems to fix the string allocations problem.
The string allocations didn't increase within 1000 "queue show" commands.

But there's still an increasing amount of allocations in app_queue.c at
line 1449 (line 1454 after patching app_queue.c).

I uploaded a simple script which you can use to check the allocations at
app_queue.c
queue_mem_check_output.txt contains the ouput of this script.
In queue_mem_allocations.txt you can see the memory allocations after 2100
times running "queue show". 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-05 17:02 wliegel        Note Added: 0121446                          
======================================================================




More information about the asterisk-bugs mailing list