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 680198 - the guest kernel will panic when ballooning memory
Summary: the guest kernel will panic when ballooning memory
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 693510
TreeView+ depends on / blocked
 
Reported: 2011-02-24 16:18 UTC by Alex Jia
Modified: 2011-05-27 20:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-28 09:38:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virtio_balloon driver (75.18 KB, image/png)
2011-02-24 16:21 UTC, Alex Jia
no flags Details
guest screen (1.07 MB, image/png)
2011-02-24 16:22 UTC, Alex Jia
no flags Details

Description Alex Jia 2011-02-24 16:18:15 UTC
Description of problem:
The guest kernel will panic when set memory on the active guest.

Version-Release number of selected component (if applicable):
# rpm -q libvirt 
libvirt-0.8.7-7.el6.x86_64

# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.145.el6.x86_64

# uname -r
2.6.32-113.el6.x86_6

How reproducible:
always

Steps to Reproduce:
1. virsh start domainname
2. virsh setmem domainname --kilobytes 131072
3. virt-viewer domainname
  
Actual results:
kernel panic

Expected results:
fix it

Additional info:
# virsh dominfo vr-rhel6u1-x86_64-kvm
Id:             25
Name:           vr-rhel6u1-x86_64-kvm
UUID:           a03093a1-5da6-a2a2-3baf-a845db2f10b9
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       1193.6s
Max memory:     2097152 kB
Used memory:    1048576 kB
Persistent:     yes
Autostart:      disable
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c104,c286 (permissive)

# virsh memtune vr-rhel6u1-x86_64-kvm
hard_limit     : unlimited
soft_limit     : unlimited
swap_hard_limit: unlimited

# virsh setmem vr-rhel6u1-x86_64-kvm --kilobytes 131072

# virsh dominfo vr-rhel6u1-x86_64-kvm
Id:             25
Name:           vr-rhel6u1-x86_64-kvm
UUID:           a03093a1-5da6-a2a2-3baf-a845db2f10b9
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       1225.2s
Max memory:     2097152 kB
Used memory:    194492 kB
Persistent:     yes
Autostart:      disable
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c104,c286 (permissive)

# virt-viewer vr-rhel6u1-x86_64-kvm

Note: current used memory does change, but use virt-viewer to check guest screen, which display Out of memory and kernel panic...

Comment 1 Alex Jia 2011-02-24 16:21:28 UTC
Created attachment 480795 [details]
virtio_balloon driver

Comment 2 Alex Jia 2011-02-24 16:22:29 UTC
Created attachment 480796 [details]
guest screen

Comment 4 Jiri Denemark 2011-02-25 15:33:47 UTC
That's the dark side of memory ballooning. If you want to shrink too much your guest may get into an OOM condition and start killing processes like crazy. Frankly, decreasing memory from 2GB to 128MB really sounds like too much to me. It's hard to find a general rule what amount of memory is still ok and what is already not enough for a guest so I don't think we can really do anything useful with this in libvirt. The user (of libvirt API, so it can even be an application higher in the stack) should know what the guest OS is, what processes need to run in it and what the memory consumption should look like.

I'm inclined to close this as CANTFIX although I'll wait a bit in case someone else has a better suggestion.

Comment 5 Daniel Berrangé 2011-02-25 15:37:47 UTC
Agreed, we have tried to set a minimum limit in the past, but had to remove it precisely because it will always be wrong for at least one person's valid use case.


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