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 1069068 - memory leak when lookup pool list with unsupported pool type option
Summary: memory leak when lookup pool list with unsupported pool type option
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-24 05:34 UTC by Shanzhi Yu
Modified: 2014-04-04 21:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-04 21:26:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shanzhi Yu 2014-02-24 05:34:04 UTC
Description of problem:

memory leak when look up pool list with unsupported pool type option
 
Version-Release number of selected component (if applicable):

libvirt-0.10.2-29.el6_5.4.x86_64

How reproducible:

100%

Steps to Reproduce:
1.# valgrind --leak-check=full virsh pool-list --type unsupported
==20086== Memcheck, a memory error detector
==20086== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==20086== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==20086== Command: virsh pool-list --type unsupported
==20086==
error: Invalid pool type

==20086==
==20086== HEAP SUMMARY:
==20086==     in use at exit: 138,314 bytes in 1,557 blocks
==20086==   total heap usage: 4,093 allocs, 2,536 frees, 21,364,507 bytes allocated
==20086==
==20086== 12 bytes in 1 blocks are definitely lost in loss record 11 of 84
==20086==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==20086==    by 0x393B8810C1: strdup (in /lib64/libc-2.12.so)
==20086==    by 0x40EB40: ??? (in /usr/bin/virsh)
==20086==    by 0x40FC68: ??? (in /usr/bin/virsh)
==20086==    by 0x42A9F9: ??? (in /usr/bin/virsh)
==20086==    by 0x40D240: ??? (in /usr/bin/virsh)
==20086==    by 0x410B4A: ??? (in /usr/bin/virsh)
==20086==    by 0x393B81ED1C: (below main) (in /lib64/libc-2.12.so)
==20086==
==20086== LEAK SUMMARY:
==20086==    definitely lost: 12 bytes in 1 blocks
==20086==    indirectly lost: 0 bytes in 0 blocks
==20086==      possibly lost: 0 bytes in 0 blocks
==20086==    still reachable: 138,302 bytes in 1,556 blocks
==20086==         suppressed: 0 bytes in 0 blocks
==20086== Reachable blocks (those to which a pointer was found) are not shown.
==20086== To see them, rerun with: --leak-check=full --show-reachable=yes
==20086==
==20086== For counts of detected and suppressed errors, rerun with: -v
==20086== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 6)

2.
3.

Actual results:


Expected results:

no memory leak when lookup pool list with unsupported type

Additional info:

Comment 2 Martin Kletzander 2014-02-24 08:31:01 UTC
This should be already fixed by commit v1.1.1-176-gd64af6c:

commit d64af6ce3cce0d353238086c4e1ec0fd59217cf0                 
Author: Peter Krempa <pkrempa>                       
Date:   Thu Aug 15 18:20:05 2013 +0200                          
                                                                
    virsh: modify vshStringToArray to duplicate the elements too

Comment 3 Peter Krempa 2014-02-24 08:58:11 UTC
Backtrace with debuginfo:

==2472== 5 bytes in 1 blocks are definitely lost in loss record 5 of 84
==2472==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==2472==    by 0x3B88281171: strdup (strdup.c:43)
==2472==    by 0x40EB40: _vshStrdup (virsh.c:129)
==2472==    by 0x40FC68: vshStringToArray (virsh.c:182)
==2472==    by 0x42A9F9: cmdPoolList (virsh-pool.c:857)
==2472==    by 0x40D240: vshCommandRun (virsh.c:1652)
==2472==    by 0x410B4A: main (virsh.c:3093)

Comment 5 RHEL Program Management 2014-04-04 21:26:35 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


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