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 682249 - more memory bugs in libvirt
Summary: more memory bugs in libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 656795 679164
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-04 15:39 UTC by Eric Blake
Modified: 2011-05-19 13:28 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.8.7-10.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 679164
Environment:
Last Closed: 2011-05-19 13:28:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Eric Blake 2011-03-04 15:39:39 UTC
another memleak fix was posted upstream after bug 679164 had already been verified.  By cloning, I've made both bz's reference each other, so that any backporting doesn't forget to pull in all the changes.

+++ This bug was initially created as a clone of Bug #679164 +++

Description of problem:
valgrind reports the use of uninitialized memory affecting libvirtd execution, as well as several leaks directly attributable to libvirt

Latest upstream leak patch:

https://www.redhat.com/archives/libvir-list/2011-March/msg00180.html

Comment 3 Eric Blake 2011-03-04 17:18:57 UTC
In POST:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00108.html

Among other leaks, this can be tested with:

valgrind --leak-check=full virsh
virsh # cd
virsh # quit

which used to leak a string the size of the user's HOME directory.

Comment 5 zhanghaiyan 2011-03-08 03:53:29 UTC
Reproduced this bug with older package libvirt-0.8.7-8.el6.x86_64
# valgrind --leak-check=full virsh
==3042== Memcheck, a memory error detector
==3042== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==3042== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==3042== Command: virsh
==3042== 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # cd

virsh # quit

==3042== 
==3042== HEAP SUMMARY:
==3042==     in use at exit: 103,940 bytes in 224 blocks
==3042==   total heap usage: 512 allocs, 288 frees, 1,555,339 bytes allocated
==3042== 
==3042== 6 bytes in 1 blocks are definitely lost in loss record 2 of 53
==3042==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==3042==    by 0x3E1D27FD91: strdup (in /lib64/libc-2.12.so)
==3042==    by 0x4C5DC38: ??? (in /usr/lib64/libvirt.so.0.8.7)
==3042==    by 0x40A92B: ??? (in /usr/bin/virsh)
==3042==    by 0x416819: ??? (in /usr/bin/virsh)
==3042==    by 0x41F1DE: ??? (in /usr/bin/virsh)
==3042==    by 0x3E1D21EC9C: (below main) (in /lib64/libc-2.12.so)
==3042== 
==3042== LEAK SUMMARY:
==3042==    definitely lost: 6 bytes in 1 blocks
==3042==    indirectly lost: 0 bytes in 0 blocks
==3042==      possibly lost: 0 bytes in 0 blocks
==3042==    still reachable: 103,934 bytes in 223 blocks
==3042==         suppressed: 0 bytes in 0 blocks
==3042== Reachable blocks (those to which a pointer was found) are not shown.
==3042== To see them, rerun with: --leak-check=full --show-reachable=yes
==3042== 
==3042== For counts of detected and suppressed errors, rerun with: -v
==3042== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 6 from 6)


Verified this bug PASS with the fixed package libvirt-0.8.7-10.el6.x86_64
# valgrind --leak-check=full virsh
==2831== Memcheck, a memory error detector
==2831== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2831== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==2831== Command: virsh
==2831== 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # cd

virsh # quit

==2831== 
==2831== HEAP SUMMARY:
==2831==     in use at exit: 103,854 bytes in 217 blocks
==2831==   total heap usage: 505 allocs, 288 frees, 1,555,242 bytes allocated
==2831== 
==2831== LEAK SUMMARY:
==2831==    definitely lost: 0 bytes in 0 blocks
==2831==    indirectly lost: 0 bytes in 0 blocks
==2831==      possibly lost: 0 bytes in 0 blocks
==2831==    still reachable: 103,854 bytes in 217 blocks
==2831==         suppressed: 0 bytes in 0 blocks
==2831== Reachable blocks (those to which a pointer was found) are not shown.
==2831== To see them, rerun with: --leak-check=full --show-reachable=yes
==2831== 
==2831== For counts of detected and suppressed errors, rerun with: -v
==2831== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)

Comment 6 zhanghaiyan 2011-03-08 04:00:07 UTC
- kernel-2.6.32-118.el6.x86_64
- qemu-kvm-0.12.1.2-2.149.el6.x86_64
- valgrind-3.6.0-3.el6.x86_64
- libnl-1.1-13.el6.x86_64

Comment 9 errata-xmlrpc 2011-05-19 13:28:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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