Bug 219850 - xm mem-set allows bogus value to be set for Domain-0
xm mem-set allows bogus value to be set for Domain-0
Status: CLOSED DUPLICATE of bug 217443
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Xen Maintainance List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-15 14:03 EST by Jan Mark Holzer
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-26 16:37:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Mark Holzer 2006-12-15 14:03:38 EST
Description of problem:

Using "xm mem-set Domain-0 2000000000" will pretend it did set
the value , ignoring the fact there is not even remotely this amount
of memory in the system.

Version-Release number of selected component (if applicable):

RHEL5 / B2 rev 2747 and 2836 

How reproducible:

Always

Steps to Reproduce:
1. "xm list" to display current value of "Mem" for Domain-0
2. "xm mem-set Domain-0 2000000000" to set a (bogus) large value
3. "xm list" will now claim Domain-0 has been ballooned up 2000000000
  
Actual results:

"xm list" will display bogus value for Domain-0

Expected results:

Xen should prevent the user from setting a bogus value for Domain-0
It should return an error if a value is selected which is larger than
the available memory

Additional info:

Sample session

[root@woodie ~]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     2048     8 r-----  17125.8
rhel4pv-x86_64                            13     2048     1 -b----     89.9
rhel4u4esfv-x86_64                         2     2048     2 -b----   6838.6
rhel5b2vm01                                3     2048     2 -b----    820.2
rhel5b2vm02                               12     2048     1 -b----    167.5
[root@woodie ~]# xm mem-set 0 2000000000
[root@woodie ~]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0 2000000000     8 r-----  17132.1
rhel4pv-x86_64                            13     2048     1 -b----     89.9
rhel4u4esfv-x86_64                         2     2048     2 -b----   6839.0
rhel5b2vm01                                3     2048     2 -b----    820.2
rhel5b2vm02                               12     2048     1 -b----    167.5

Entries in /var/log/xen/xend.log

[2006-12-15 09:55:21 xend.XendDomainInfo 4110] DEBUG (XendDomainInfo:1014)
Setting memory target of domain Domain-0 (0) to 2048 MiB.
[2006-12-15 09:55:28 xend.XendDomainInfo 4110] DEBUG (XendDomainInfo:1014)
Setting memory target of domain Domain-0 (0) to 2000000000 MiB.

Entries from "xm dmesg"

(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (322 of 512)
(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (126 of 375)
(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (271 of 512)
(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (196 of 512)
(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (44 of 256)
(XEN) (file=memory.c, line=119) Could not allocate order=0 extent: id=0
memflags=0 (120 of 512)
8<---- snip 8<-----
Comment 1 Daniel Berrange 2007-03-26 16:37:11 EDT
The 'xm mem-set' command merely gives a target for the balloon driver.
Unfortunately 'xm list' is showing the target value, rather than the real
allocated value in this example.

This was previously reported & fixed in RHEL-5 & Fedora

* Tue Dec 05 2006 Rik van Riel <riel@redhat.com> - 3.0.3-12.el5
- make "xm list" display how much memory a domain really has (rhbz#217443)


*** This bug has been marked as a duplicate of 217443 ***

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