Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1144303 - memory leak when starting a domain with cpu mode='host-model'
memory leak when starting a domain with cpu mode='host-model'
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.1
Unspecified Linux
unspecified Severity low
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks: 1144304
  Show dependency treegraph
 
Reported: 2014-09-19 04:07 EDT by Ján Tomko
Modified: 2015-03-05 02:44 EST (History)
5 users (show)

See Also:
Fixed In Version: libvirt-1.2.8-4.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1144304 (view as bug list)
Environment:
Last Closed: 2015-03-05 02:44:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 07:10:54 EST

  None (edit)
Description Ján Tomko 2014-09-19 04:07:29 EDT
Description of problem:


Version-Release number of selected component (if applicable):
libvirt-1.2.8-2.el7

How reproducible:
100%

Steps to Reproduce:
1. Run libvirtd under valgrind:
valgrind --leak-check=full libvirtd
on a host supporting invtsc 
2. Start a domain with <cpu mode='host-model'>

Actual results:
==4403== 7 bytes in 1 blocks are definitely lost in loss record 93 of 1,783
==4403==    at 0x4C2A820: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4403==    by 0x84ABC19: strdup (in /lib64/libc-2.19.so)
==4403==    by 0x52F0C94: virStrdup (virstring.c:679)
==4403==    by 0x5358CD2: virCPUDefCopyModel (cpu_conf.c:126)
==4403==    by 0x535F594: x86UpdateHostModel (cpu_x86.c:2089)
==4403==    by 0x535F594: x86Update (cpu_x86.c:2126)
==4403==    by 0x20342A: qemuBuildCpuArgStr (qemu_command.c:6159)
==4403==    by 0x20342A: qemuBuildCommandLine (qemu_command.c:7705)
==4403==    by 0x1E734D: qemuProcessStart (qemu_process.c:4306)
==4403==    by 0x1A62C0: qemuDomainObjStart (qemu_driver.c:6235)
==4403==    by 0x1A6882: qemuDomainCreateWithFlags (qemu_driver.c:6290)
==4403==    by 0x5380E31: virDomainCreate (libvirt.c:9001)
==4403==    by 0x172845: remoteDispatchDomainCreate (remote_dispatch.h:3190)
==4403==    by 0x172845: remoteDispatchDomainCreateHelper (remote_dispatch.h:3168)
==4403==    by 0x53DCA98: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
==4403==    by 0x53DCA98: virNetServerProgramDispatch (virnetserverprogram.c:307)


Expected results:
No leak shown in x86UpdateHostModel

Additional information:
Fixed upstream by:
commit 5b5631dedf59e540661bfeac774e543d8d38531b
Author:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2014-09-18 14:49:01 +0200

    Fix leak in x86UpdateHostModel
    
    Commit de0aeaf introduced a memory leak.

git describe: v1.2.8-198-g5b5631d
Comment 3 zhenfeng wang 2014-10-09 03:23:56 EDT
Reproduce this bug with libvirt-1.2.8-2.el7
1.steps follow the comment 0, see the mem leak in x86UpdateHostModel

=12932== 7 bytes in 1 blocks are definitely lost in loss record 69 of 860
==12932==    at 0x4C28BBD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12932==    by 0x82D18B9: strdup (strdup.c:42)
==12932==    by 0x52EC014: virStrdup (virstring.c:676)
==12932==    by 0x5354123: virCPUDefCopyModel (cpu_conf.c:121)
==12932==    by 0x535AA7C: x86UpdateHostModel (cpu_x86.c:2089)
==12932==    by 0x535AA7C: x86Update (cpu_x86.c:2126)
==12932==    by 0x1C3EC0EB: qemuBuildCpuArgStr (qemu_command.c:6110)
==12932==    by 0x1C3EC0EB: qemuBuildCommandLine (qemu_command.c:7603)
==12932==    by 0x1C41741B: qemuProcessStart (qemu_process.c:4215)
==12932==    by 0x1C467930: qemuDomainObjStart (qemu_driver.c:6227)
==12932==    by 0x1C467F31: qemuDomainCreateWithFlags (qemu_driver.c:6282)
==12932==    by 0x5386D7B: virDomainCreate (libvirt.c:9001)
==12932==    by 0x1426AB: remoteDispatchDomainCreate (remote_dispatch.h:3129)
==12932==    by 0x1426AB: remoteDispatchDomainCreateHelper (remote_dispatch.h:3107)
==12932==    by 0x53E9571: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
==12932==    by 0x53E9571: virNetServerProgramDispatch (virnetserverprogram.c:307)


2.update the libvirt to libvirt-1.2.8-4.el7, re-do the steps in comment 0 , didn't see the mem leak info in x86UpdateHostModel, so mark this bug verifed
Comment 5 errata-xmlrpc 2015-03-05 02:44:52 EST
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://rhn.redhat.com/errata/RHSA-2015-0323.html

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