Bug 1618908
| Summary: | qpid client leaks memory when it connects to an unreachable broker ip address. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise MRG | Reporter: | Mike Cressman <mcressma> | ||||
| Component: | qpid-cpp | Assignee: | Mike Cressman <mcressma> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Zdenek Kraus <zkraus> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 3.2 | CC: | jross, zkraus | ||||
| Target Milestone: | 3.2.11 | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | qpid-cpp-1.36.0-20 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Cause:
If a qpid client attempts to connect to an unreachable broker ip address repeatedly,
Consequence:
each iteration causes a small memory leak, and this can accumulate over time, causing system memory issues.
Fix:
Now after a failed connection, the temporary data is freed correctly,
Result:
and thus repeated attempts to connect will no longer cause memory to accumulate.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-09-11 17:20:33 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
To run the reproducer using the attached qpid-client-memleak.cpp source file: > g++ qpid-client-memleak.cpp -I /usr/include/qpid/messaging/ -lqpidmessaging -lqpidtypes -g -o qpid-client-memleak > valgrind --log-file=./log-qpid-client-memleak_valgrind.log --leak-check=full --trace-children=yes --error-limit=no ./qpid-client-memleak Run for at least 10 minutes, then examine the end of the valgrind log. It should show some memory "definitely lost". After the fix, this message is no longer there. Tested on RHEL 6 i386 and x86_64 and RHEL 7 x86_64, with following packages: qpid-cpp-client-1.36.0-15 qpid-cpp-client-devel-1.36.0-15 Fix works as expected. -> VERIFIED Please ignore comment #4 it contains a typo in the version. Tested on RHEL 6 i386 and x86_64 and RHEL 7 x86_64, with following packages: qpid-cpp-client-1.36.0-20 qpid-cpp-client-devel-1.36.0-20 Fix works as expected. -> VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2680 |
Created attachment 1476731 [details] reproducer to show memory leak Description of problem: The qpid client leaks memory when it connects to an unreachable broker ip address. In some client applications, this is a regular occurrence, so memory leaks can become significant over time. Version-Release number of selected component (if applicable): qpid-cpp-1.36.0-15 (also present in qpid-cpp-0.18-50) How reproducible: 100% Steps to Reproduce: See attached reproducer program (shows leak when run under valgrind) Actual results: some memory is "definitely lost" according to valgrind Expected results: no memory "definitely lost" Additional info: See below for reproducer instructions.