Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Libvirtd should expose the error message when the user passed wrong
size and unit for <shmem> element.
version:
libvirt-1.2.8-5.el7.x86_64
upstream qemu v2.1.0-1124-gb1d28ec
How reproducible:
100%
Step to reproduce:
1. config shmem with negative size in guest
# virsh edit r7
...
<devices>
...
<shmem name='shmem0'>
<size unit='M'>-1</size>
</shmem>
</devices>
...
2. although edit pass, some error is recorded in log:
2014-10-21 08:45:28.853+0000: 26945: error : virScaleInteger:334 :
numerical overflow: value too large: 18446744073709551615M
Expect results:
shmem's size doesn't accept negative value, and
the error message should be prompted in step 1.
Comment 1Martin Kletzander
2014-10-30 07:50:13 UTC
Fixed upstream by v1.2.10-rc1-19-g6c9a8a4:
commit 6c9a8a49c796f025f097a2cddb94116403296af1
Author: Martin Kletzander <mkletzan>
Date: Wed Oct 29 17:29:40 2014 +0100
conf: forbid negative values in virDomainParseScaledValue
Comment 2Martin Kletzander
2014-11-04 13:12:55 UTC
*** Bug 1160239 has been marked as a duplicate of this bug. ***
I can reproduce this issue with libvirt-1.2.8-16.el7.x86_64:
1. add invalid xml in guest:
# virsh edit test3
<shmem name='shmem0'>
<size unit='M'>-1</size>
</shmem>
Domain test3 XML configuration edited.
2. check the log in libvirtd.log:
2015-05-12 03:56:11.699+0000: 16181: error : virScaleInteger:334 : numerical overflow: value too large: 18446744073709551615M
And verify this bug with libvirt-1.2.15-1.el7.x86_64:
1. try to add the same xml in guest:
# virsh edit test3
<shmem name='shmem0'>
<size unit='M'>-1</size>
</shmem>
error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng
Extra element devices in interleave
Element domain failed to validate content
Failed. Try again? [y,n,i,f,?]:
error: XML error: Invalid value '-1' for element or attribute './size[1]'
Failed. Try again? [y,n,f,?]:
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/RHBA-2015-2202.html
Description of problem: Libvirtd should expose the error message when the user passed wrong size and unit for <shmem> element. version: libvirt-1.2.8-5.el7.x86_64 upstream qemu v2.1.0-1124-gb1d28ec How reproducible: 100% Step to reproduce: 1. config shmem with negative size in guest # virsh edit r7 ... <devices> ... <shmem name='shmem0'> <size unit='M'>-1</size> </shmem> </devices> ... 2. although edit pass, some error is recorded in log: 2014-10-21 08:45:28.853+0000: 26945: error : virScaleInteger:334 : numerical overflow: value too large: 18446744073709551615M Expect results: shmem's size doesn't accept negative value, and the error message should be prompted in step 1.