Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1392520 - [RHEL6.9] KVM guest shuts itself down after 128th reboot
[RHEL6.9] KVM guest shuts itself down after 128th reboot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.9
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Ladi Prosek
Virtualization Bugs
: Patch, Regression, ZStream
Depends On: 1377968 1392521
Blocks: 1392507 1408389
  Show dependency treegraph
 
Reported: 2016-11-07 11:34 EST by Ladi Prosek
Modified: 2017-03-21 05:40 EDT (History)
21 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.498.el6
Doc Type: Bug Fix
Doc Text:
Previously, rebooting a guest virtual machine more than 128 times in a short period of time caused the guest to shut down instead of rebooting, because the virtqueue was not cleaned properly. This update ensures that the virtqueue is cleaned more reliably, which prevents the described problem from occurring.
Story Points: ---
Clone Of: 1377968
: 1408389 (view as bug list)
Environment:
Last Closed: 2017-03-21 05:40:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0621 normal SHIPPED_LIVE Moderate: qemu-kvm security and bug fix update 2017-03-21 08:28:31 EDT

  None (edit)
Comment 7 Yash Mankad 2016-12-14 14:14:03 EST
Fix included in qemu-kvm-0.12.1.2-2.498.el6
Comment 10 Yiqian Wei 2017-01-04 06:01:29 EST
Reproduce this bug
Host version:
             qemu-kvm-0.12.1.2-2.496.el6.x86_64
             kernel-2.6.32-680.el6.x86_64
guest:kernel-2.6.32-680.el6.x86_64

Following is the details
a. repeat virtio-balloon driver increases
1. Boot guest with following cmd
/usr/libexec/qemu-kvm \
-M pc \
-cpu Nehalem,enforce \
-m 4G \
-name rhel6.9 \
-uuid 2fd41914-5019-4d17-a6cc-fa653ba516f5 \
-boot menu=on  \
-qmp tcp:0:4444,server,nowait \
-monitor stdio \
-vga qxl \
-usbdevice mouse \
-usbdevice tablet \
-nodefaults \
-rtc base=utc \
-smp 2,sockets=2,cores=1,threads=1 \
-enable-kvm \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-serial unix:/tmp/console,server,nowait \
-bios /usr/share/seabios/bios.bin \
-chardev file,path=/home/seabios.log,id=seabios \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-spice port=5932,disable-ticketing \
-drive file=/home/bug1392520/test.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-device virtio-balloon-pci,id=virtio-balloon0 \
-usbdevice tablet \
-netdev tap,id=hostnet1 \
-device virtio-net-pci,netdev=hostnet1,id=net1,mac=54:52:00:B6:40:22 \

2. In guest, repeat following operation
  for n in $(seq 200); do
    echo $n
    modprobe -r virtio-balloon
    modprobe virtio-balloon
  done

Test results:
guest will be shutdown and qemu quit with "qemu-kvm: Virtqueue size exceeded"

b.reboot guest 
1.Boot guest through libvirt
2.reboot guest through following scripts
#!/bin/bash
for i in  $(seq 129);
do    
	echo $i
        virsh qemu-monitor-command generic --hmp "system_reset"
        sleep 30
done

Test results:
guest shutdown when repeat 128 times
129
error: Requested operation is not valid: domain is not running
-------------------------------------------------------------------
Verify this bug on "qemu-kvm-0.12.1.2-2.499.el6.x86_64" as same steps above.
a.
Test results:
guest normal work and qemu not quit.
b.
Test results:
guest not shutdown when repeat 128 times

Conclusion:
  According to result above,this bug has been fixed.
Comment 13 Yiqian Wei 2017-02-06 05:02:59 EST
Verify this bug 
Host version:
             qemu-kvm-0.12.1.2-2.499.el6.x86_64
             kernel-2.6.32-680.el6.x86_64
guest:kernel-2.6.32-680.el6.x86_64

Following is the details
a. repeat virtio-balloon driver increases
1. Boot guest with following cmd
/usr/libexec/qemu-kvm \
-name rhel6.9 \
-M pc \
-cpu SandyBridge,enforce  \
-m 2G \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 87a8008b-d8bd-42ce-b1b8-d329116c174c \
-nodefaults \
-rtc base=utc,driftfix=slew \
-drive file=/home/bz1392520/rhel6.9.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:cb:b4:5e,bus=pci.0,addr=0x3 \
-spice port=5930,disable-ticketing \
-monitor stdio \
-usbdevice tablet \
-vga qxl \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 \
-drive file=/home/bz1392520/data.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2 \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=3 \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0 \
-device virtio-serial-pci,id=virtio-serial0 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=port1,bus=virtio-serial0.0,id=port1 \
-device virtio-serial-pci,id=virtio-serial1 \
-chardev pty,id=console0 \
-device virtconsole,chardev=console0,id=console0 \

2. In guest, repeat following operation
  for n in $(seq 200); do
    echo $n
    modprobe -r virtio-balloon
    modprobe virtio-balloon
  done

Test results:
guest normal work and qemu not quit.

b.reboot guest 
1.Boot guest through libvirt
2.reboot guest through following scripts
#!/bin/bash
for i in  $(seq 129);
do    
	echo $i
        virsh qemu-monitor-command generic --hmp "system_reset"
        sleep 30
done

Test results:
guest not shutdown when repeat 128 times,guest normal work.
Comment 16 errata-xmlrpc 2017-03-21 05:40:48 EDT
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-2017-0621.html

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