Bug 1260576
Summary: | guest which use big maxmemory will lose track after restart libvirtd | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.2 | CC: | dyuan, mzhan, rbalakri |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.3.1-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:23:20 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: |
Description
Luyao Huang
2015-09-07 09:49:58 UTC
commit 645881139b3d2c86acf9d644c3a1471520bc9e57 Author: Peter Krempa <pkrempa> Date: Tue Dec 1 14:08:37 2015 +0100 qemu: domain: Prevent overflows in memory alignment code Since libvirt for dubious historical reasons stores memory size as kibibytes, it's possible that the alignments done in the qemu code overflow the the maximum representable size in bytes. The XML parser code handles them in bytes in some stages. Prevent this by doing overflow checks when alinging the size and add a test case. Verify this bug with libvirt-1.3.4-1.el7.x86_64: 1. prepare a inactive guest: # virsh list --all Id Name State ---------------------------------------------------- - rhel72-test shut off 2. change guest maxmemory to 9007199254740991KiB: # virsh dumpxml rhel72-test |grep max <maxMemory slots='16' unit='KiB'>9007199254740991</maxMemory> 3. start guest: # virsh start rhel72-test error: Failed to start domain rhel72-test error: unsupported configuration: maximum memory size overflowed after alignment 4. change guest memory to 9007199254740991KiB: # virsh dumpxml rhel72 |grep emory <memory unit='KiB'>9007199254740991</memory> <currentMemory unit='KiB'>9007199254740991</currentMemory> 5. start guest # virsh start rhel72 error: Failed to start domain rhel72 error: unsupported configuration: initial memory size overflowed after alignment 6. test guest used a maxmemory which won't cause overflowed problem: # virsh dumpxml rhel72-test |grep max <maxMemory slots='16' unit='KiB'>9007199254739968</maxMemory> # virsh start rhel72-test Domain rhel72-test started # service libvirtd restart Redirecting to /bin/systemctl restart libvirtd.service # virsh list --all Id Name State ---------------------------------------------------- 51 rhel72-test running 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-2016-2577.html |