Bug 704541

Summary: Invoking qpid-config leads to memory leak
Product: Red Hat Enterprise MRG Reporter: Pavel Moravec <pmoravec>
Component: qpid-cppAssignee: Kim van der Riet <kim.vdriet>
Status: CLOSED DUPLICATE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: gsim, jross
Target Milestone: 2.2   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-08 09:34:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Pavel Moravec 2011-05-13 14:22:20 UTC
Description of problem:
Any run of qpid-config tool causes a small memory consumption increase of qpidd process.

Version-Release number of selected component (if applicable):
MRG(M) 1.3

How reproducible:
Every time running reproduction steps.

Steps to Reproduce:
1. Start qpidd service with any configuration (i.e. default qpidd.conf).
2. Run in a loop qpid-config with any argument(s). Some examples are below.
3. Monitor qpidd process (physical) memory usage - it will slowly grow.

Actual results:
Examples to step 2:
(*) for i in $(seq 1 100); do qpid-config; sleep 5; done
(*) for i in $(seq 1 100); do qpid-config queues; sleep 5; done
(*) for i in $(seq 1 100); do qpid-config queues -b; sleep 5; done
(*) for i in $(seq 1 100); do qpid-config exchanges; sleep 5; done
(*) for i in $(seq 1 100); do qpid-config exchanges -b; sleep 5; done
(*) for i in $(seq 1 50); do qpid-config add queue some_name; sleep 5; qpid-config del queue some_name; sleep 5; done
(*) for i in $(seq 1 50); do qpid-config add exchange topic some_name; sleep 5; qpid-config del exchange some_name; sleep 5; done

In all such cases, the 100 runs of qpid-config tool increased memory usage by approx. 1MB, i.e. 1 run of the tool consumes around 10kB.


Expected results:
No memory consumption grow should occur. As e.g. qpid-config tool can be used to regularly monitoring of QPid status, memory consumption would be steadily growing forever.

Additional info:

Comment 1 Pavel Moravec 2011-05-17 11:32:31 UTC
I left infinite loop running qpid-config command to be run for several days and at the end the memory utilisation stabilised on 83m of RES memory - and it is not further growing for >24 hours.

Anyway, why the physical memory usage has increased from 7MB to 83MB?

Comment 2 Pavel Moravec 2011-05-19 13:11:53 UTC
The test continued further and memory usage started to grow again..

Comment 3 Pavel Moravec 2012-01-04 10:18:56 UTC
Re-tested it on qpid-cpp-server-0.10-9.el5 even with MALLOC_MMAP_THRESHOLD_=8 to prevent memory fragmentation and the mem.leak is still there: both VSZ and RSS is increasing.

Comment 4 Pavel Moravec 2012-03-08 09:34:01 UTC
Closing as duplicate of bz 729441 / JIRA 3403 (verified by myself).

*** This bug has been marked as a duplicate of bug 729441 ***