| Summary: | virsh undefine command with '--remove-all-storage' or '--storage' option when storage volume is unmanaged will cause memory leak. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Peter Krempa <pkrempa> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | acathrow, codong, dallan, dyuan, hliu, lsu, mzhan, pkrempa |
| Target Milestone: | rc | Keywords: | Upstream |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.1.1-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 996050 | Environment: | |
| Last Closed: | 2014-06-13 11:17:08 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: | |
| Bug Depends On: | 996050 | ||
| Bug Blocks: | |||
|
Description
Peter Krempa
2013-08-20 16:02:26 UTC
Verified this fix.
Packages:
libvirt-1.1.1-3.el7.x86_64
kernel-3.10.0-14.el7.x86_64
qemu-kvm-1.5.3-2.el7.x86_64
Verify steps:
1. create a new volume
# dd if=/dev/null of=/root/foo bs=1 count=1 seek=10M
2. define a domain using that volume
# cat foo.xml
<domain type='kvm'>
<name>foo</name>
<uuid></uuid>
<memory>2097152</memory>
<currentMemory>2097152</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/root/foo'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>
# virsh define foo.xml
3.make sure the new volume is not managed by libvirt
# virsh vol-list default
Name Path
-----------------------------------------
4. check memory leak when undefined with remove-all-storage or --storage option
# valgrind -v --leak-check=full virsh undefine foo --remove-all-storage
or
# valgrind -v --leak-check=full virsh undefine foo --storage /root/foo
Results:
no memory leak.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |