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.

Bug 1155882

Summary: Guest kernel panic when doing memory balloon
Product: Red Hat Enterprise Linux 7 Reporter: Yang Xue <yaxue>
Component: qemu-kvm-rhevAssignee: Luiz Capitulino <lcapitulino>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: chayang, cheliu, coli, fyang, hhuang, juzhang, michen, ngu, scui, shuang, virt-maint, xiagao, xuhan, xutian, ypu, yuhuang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-24 02:51:06 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:
Attachments:
Description Flags
serial_log none

Description Yang Xue 2014-10-23 05:42:29 UTC
Description of problem:
RHEL6.6 Guest kernel panic when doing memory balloon ,the guest default memory is 16G.

Version-Release number of selected component (if applicable):
Host: kernel-3.10.0-191.el7.x86_64
      qemu-kvm-rhev-2.1.2-4.el7.x86_64

Guest:kernel-2.6.32-504.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Mount nfs server to host
10.66.90.115:/vol/s2imagetest /mnt/nfs_images nfs4 rw,sync,relatime,vers=4.0,rsize=65536,wsize=65536,namlen=255,soft,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.66.106.28,local_lock=none,addr=10.66.90.115 0 0

2.Install RHEL6.6 guest with the following command line:
/bin/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1'  \
    -sandbox off  \
    -M pc  \
    -nodefaults  \
    -vga cirrus  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20141022-193557-QJLhjXuR,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20141022-193557-QJLhjXuR,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20141022-193557-QJLhjXuR,path=/tmp/seabios-20141022-193557-QJLhjXuR,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20141022-193557-QJLhjXuR,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \
    -drive id=drive_image1,if=none,cache=writethrough,snapshot=off,aio=native,file=/mnt/nfs_images/RHEL-Server-6.6-64-virtio.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04 \
    -device virtio-net-pci,mac=9a:20:21:22:23:24,id=idVW1oir,vectors=4,netdev=idRBRvtc,bus=pci.0,addr=05  \
    -netdev tap,id=idRBRvtc,vhost=on,vhostfd=23,fd=22  \
    -m 16384  \
    -smp 16,cores=4,threads=2,sockets=2  \
    -cpu 'Westmere',+kvm_pv_unhalt \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off \
    -device virtio-balloon-pci,id=ballooning \
    -no-kvm-pit-reinjection \
    -enable-kvm

3.Execute the command with qmpmonitor 
(Host){'execute': 'qmp_capabilities', 'id': 'PoXVO27J'}
      {'execute': 'query-cpus', 'id': 'pDIQVMqu'}
      {'execute': 'balloon', 'arguments': {'value': 4096}, 'id': 'a9wcLaCf'}

Actual results:
Guest kernel panic occured.

Expected results:
Guest memory balloon successfully

Additional info:
virtio_balloon virtio2: Out of puff! Can't get 256 pages

See more details from the attatchment(serial_log)

The guest memory before balloon:
RedHat       
Kernel2.6.32-504.el6.x86_64                                            
localhost.localdomain         login:                
MemTotal:                     16327544    kB        
MemFree:                      15918920    kB        
Buffers:                      21024       kB        
Cached:                       111036      kB        
SwapCached:                   0           kB        
Active:                       87648       kB        
Inactive:                     107056      kB        
Active(anon):                 62952       kB        
Inactive(anon):               996         kB        
Active(file):                 24696       kB        
Inactive(file):               106060      kB        
Unevictable:                  0           kB        
Mlocked:                      0           kB        
SwapTotal:                    4194300     kB        
SwapFree:                     4194300     kB        
Dirty:                        852         kB        
Writeback:                    0           kB        
AnonPages:                    63072       kB        
Mapped:                       32700       kB        
Shmem:                        1172        kB        
Slab:                         79160       kB        
SReclaimable:                 14692       kB        
SUnreclaim:                   64468       kB        
KernelStack:                  3344        kB        
PageTables:                   8828        kB        
NFS_Unstable:                 0           kB        
Bounce:                       0           kB        
WritebackTmp:                 0           kB        
CommitLimit:                  12358072    kB        
Committed_AS:                 340448      kB        
VmallocTotal:                 34359738367 kB        
VmallocUsed:                  41484       kB        
VmallocChunk:                 34359694180 kB        
HardwareCorrupted:            0           kB        
AnonHugePages:                2048        kB        
HugePages_Total:              0                     
HugePages_Free:               0                     
HugePages_Rsvd:               0                     
HugePages_Surp:               0                     
Hugepagesize:                 2048        kB        
DirectMap4k:                  8064        kB        
DirectMap2M:                  16769024    kB        
MemTotal:                     16324472    kB        
MemFree:                      15915920    kB        
Buffers:                      21024       kB        
Cached:                       111056      kB        
SwapCached:                   0           kB        
Active:                       89600       kB        
Inactive:                     107112      kB        
Active(anon):                 64896       kB        
Inactive(anon):               996         kB        
Active(file):                 24704       kB        
Inactive(file):               106116      kB        
Unevictable:                  0           kB        
Mlocked:                      0           kB        
SwapTotal:                    4194300     kB        
SwapFree:                     4194300     kB        
Dirty:                        852         kB        
Writeback:                    0           kB        
AnonPages:                    64900       kB        
Mapped:                       32820       kB        
Shmem:                        1172        kB        
Slab:                         79168       kB        
SReclaimable:                 14696       kB        
SUnreclaim:                   64472       kB        
KernelStack:                  3320        kB        
PageTables:                   8780        kB        
NFS_Unstable:                 0           kB        
Bounce:                       0           kB        
WritebackTmp:                 0           kB        
CommitLimit:                  12356536    kB        
Committed_AS:                 340452      kB        
VmallocTotal:                 34359738367 kB        
VmallocUsed:                  41484       kB        
VmallocChunk:                 34359694180 kB        
HardwareCorrupted:            0           kB        
AnonHugePages:                4096        kB        
HugePages_Total:              0                     
HugePages_Free:               0                     
HugePages_Rsvd:               0                     
HugePages_Surp:               0                     
Hugepagesize:                 2048        kB        
DirectMap4k:                  8064        kB        
DirectMap2M:                  16769024    kB

Comment 1 Yang Xue 2014-10-23 05:45:09 UTC
Created attachment 949640 [details]
serial_log

Comment 5 Yang Xue 2014-10-24 02:51:06 UTC
Verify the case again ,and found that the unit of the qmp is KB and  the hmp unit is MB ,it looks some of my peration is some wrong , so close as NOTABUG.
Thanks,
yaxue

Comment 6 Luiz Capitulino 2014-10-24 12:37:50 UTC
The unit in QMP is bytes. So, when you do:

{'execute': 'balloon', 'arguments': {'value': 4096}, 'id': 'a9wcLaCf'}

You're setting the guest memory to 4KB.