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 1392520 - [RHEL6.9] KVM guest shuts itself down after 128th reboot
Summary: [RHEL6.9] KVM guest shuts itself down after 128th reboot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.9
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Ladi Prosek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1377968 1392521
Blocks: 1392507 1408389
TreeView+ depends on / blocked
 
Reported: 2016-11-07 16:34 UTC by Ladi Prosek
Modified: 2017-03-21 09:40 UTC (History)
21 users (show)

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.
Clone Of: 1377968
: 1408389 (view as bug list)
Environment:
Last Closed: 2017-03-21 09:40:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0621 0 normal SHIPPED_LIVE Moderate: qemu-kvm security and bug fix update 2017-03-21 12:28:31 UTC

Comment 7 Yash Mankad 2016-12-14 19:14:03 UTC
Fix included in qemu-kvm-0.12.1.2-2.498.el6

Comment 10 Yiqian Wei 2017-01-04 11:01:29 UTC
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 10:02:59 UTC
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 09:40:48 UTC
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.