RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 768860 - memory leak on libvirt_virConnectOpenAuth
Summary: memory leak on libvirt_virConnectOpenAuth
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Alex Jia
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-19 08:14 UTC by Alex Jia
Modified: 2012-06-20 06:39 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 06:39:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Alex Jia 2011-12-19 08:14:39 UTC
Description of problem:
Plug memory leak on libvirt_virConnectOpenAuth.

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

# rpm -q libvirt-python
libvirt-python-0.9.8-1.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. valgrind -v --leak-check=full virt-clone --print-xml

Note: it can hit the issue although options are incomplete.

  
Actual results:

==1801== 12 bytes in 1 blocks are definitely lost in loss record 25 of 3,270
==1801==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==1801==    by 0xCF1F60E: libvirt_virConnectOpenAuth (libvirt-override.c:1507)
==1801==    by 0x3AFEEDE7F3: PyEval_EvalFrameEx (ceval.c:3794)
==1801==    by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
==1801==    by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
==1801==    by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
==1801==    by 0x3AFEEDF99E: PyEval_EvalFrameEx (ceval.c:3880)
==1801==    by 0x3AFEEE0466: PyEval_EvalCodeEx (ceval.c:3044)
==1801==    by 0x3AFEEE0541: PyEval_EvalCode (ceval.c:545)
==1801==    by 0x3AFEEFB88B: run_mod (pythonrun.c:1351)
==1801==    by 0x3AFEEFB95F: PyRun_FileExFlags (pythonrun.c:1337)
==1801==    by 0x3AFEEFCE4B: PyRun_SimpleFileExFlags (pythonrun.c:941)

Expected results:
Fix memory leak.

Additional info:
Leak introduced in commit 5ab109f.

Comment 1 Alex Jia 2011-12-19 08:18:21 UTC
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2011-December/msg00811.html

Comment 2 Alex Jia 2011-12-20 02:38:24 UTC
In POST:

commit 78496224f7b5dc7dc05a9a3ed2f3ac600b049150
Author: Alex Jia <ajia>
Date:   Mon Dec 19 16:12:19 2011 +0800

    python: plug memory leak on libvirt_virConnectOpenAuth
    
    * Detected by valgrind. Leak introduced in commit 5ab109f.
    
    * python/libvirt-override.c: avoid memory leak on libvirt_virConnectOpenAuth.
    
    * How to reproduce?
    
      % valgrind -v --leak-check=full virt-clone --print-xml
      Note: it can hit the issue although options are incomplete.

Comment 4 Wayne Sun 2012-01-11 03:10:21 UTC
# rpm -q libvirt libvirt-python
libvirt-0.9.9-1.el6.x86_64
libvirt-python-0.9.9-1.el6.x86_64

# valgrind -v --leak-check=full virt-clone --print-xml
......
==29537== LEAK SUMMARY:
==29537==    definitely lost: 0 bytes in 0 blocks
==29537==    indirectly lost: 0 bytes in 0 blocks
==29537==      possibly lost: 77,664 bytes in 164 blocks
==29537==    still reachable: 4,883,446 bytes in 35,434 blocks
==29537==         suppressed: 0 bytes in 0 blocks
......

so, no definitely lost now.

Comment 6 errata-xmlrpc 2012-06-20 06:39:18 UTC
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


Note You need to log in before you can comment on or make changes to this bug.