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 1144303 - memory leak when starting a domain with cpu mode='host-model'
Summary: memory leak when starting a domain with cpu mode='host-model'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1144304
TreeView+ depends on / blocked
 
Reported: 2014-09-19 08:07 UTC by Ján Tomko
Modified: 2015-03-05 07:44 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.8-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1144304 (view as bug list)
Environment:
Last Closed: 2015-03-05 07:44:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Ján Tomko 2014-09-19 08:07:29 UTC
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>
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 07:23:56 UTC
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 07:44:52 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.

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.