Bug 1135388

Summary: Memory leak in testDomainGenerateIfnames
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: agedosier, berrange, clalancette, itamar, jforbes, jtomko, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.3.6-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-19 10:13:46 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:
Bug Depends On:    
Bug Blocks: 910269    

Description Richard W.M. Jones 2014-08-29 08:08:04 UTC
Description of problem:

==12033==    at 0x4C2745D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12033==    by 0x60C960F: __vasprintf_chk (in /usr/lib64/libc-2.18.so)
==12033==    by 0x541AF45: virVasprintfInternal (stdio2.h:210)
==12033==    by 0x541B03A: virAsprintfInternal (virstring.c:358)
==12033==    by 0x54DA65C: testDomainGenerateIfnames (test_driver.c:409)
==12033==    by 0x54DC133: testConnectOpen (test_driver.c:915)
==12033==    by 0x549D216: do_open (libvirt.c:1239)
==12033==    by 0x549FA98: virConnectOpenAuth (libvirt.c:1481)
==12033==    by 0x5267F3: v2v_dumpxml (domainxml-c.c:88)
==12033==    by 0x46A8DE: camlInput_libvirt__fun_1089 (utils.ml:29)
==12033==    by 0x4576E5: camlV2v__main_1021 (v2v.ml:43)
==12033==    by 0x4589B0: camlV2v__entry (v2v.ml:359)

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

libvirt-1.1.3.5-2.fc20.x86_64

Unfortunately I was not able to test this with upstream
libvirt since it seems the ./run script is broken.  My program
is unable to connect to the session libvirtd socket.

How reproducible:

With 1.1.3.5-2, 100% reproducible.

Steps to Reproduce:
1. Run virt-v2v under valgrind.
2. Supply the libvirt test XML from here:

https://github.com/libguestfs/libguestfs/blob/master/v2v/test-v2v-networks-and-bridges.xml.in

3. Something about the bridges & networks in this XML causes a
memory leak in the test driver, as shown above.

Comment 1 Ján Tomko 2014-09-02 10:39:22 UTC
Fixed upstream by:
commit 628c2255a9959b496f08dc501ae65a692ff9daa6
Author:     Ján Tomko <jtomko>
CommitDate: 2014-09-02 11:57:39 +0200

    Free ifname in testDomainGenerateIfnames
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1135388

git describe: v1.2.8-2-g628c225 

Backported to v1.1.3-maint as: v1.1.3.5-8-ga36e39c

Comment 2 Fedora Update System 2014-09-14 19:00:29 UTC
libvirt-1.1.3.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-10432/libvirt-1.1.3.6-1.fc20

Comment 3 Fedora Update System 2014-09-19 10:13:46 UTC
libvirt-1.1.3.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.