Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1408389 - [RHEL6.8.z] KVM guest shuts itself down after 128th reboot
[RHEL6.8.z] 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
high Severity medium
: rc
: ---
Assigned To: Ladi Prosek
Virtualization Bugs
: Patch, Regression, ZStream
Depends On: 1392520
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-23 04:03 EST by Marcel Kolaja
Modified: 2017-07-13 14:56 EDT (History)
24 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.491.el6_8.4
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: 1392520
Environment:
Last Closed: 2017-02-23 12:44:21 EST
Type: ---
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:0309 normal SHIPPED_LIVE Important: qemu-kvm security and bug fix update 2017-02-23 17:35:59 EST

  None (edit)
Description Marcel Kolaja 2016-12-23 04:03:51 EST
This bug has been copied from bug #1392520 and has been proposed
to be backported to 6.8 z-stream (EUS).
Comment 5 Yash Mankad 2017-01-09 12:52:09 EST
Fix included in qemu-kvm-0.12.1.2-2.491.el6.4
Comment 6 Yash Mankad 2017-01-09 12:55:43 EST
Error in build N-V-R in comment 5

Actual N-V-R:
Fix included in qemu-kvm-0.12.1.2-2.491.el6_8.4
Comment 8 Yiqian Wei 2017-01-19 06:25:03 EST
Reproduce this bz:
host version
qemu-kvm:qemu-kvm-0.12.1.2-2.491.el6_8.3.x86_64
kernel:kernel-2.6.32-642.el6.x86_64
guest:RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso

test steps:
a. repeat virtio-balloon driver increases
1. Boot guest with following cmd
/usr/libexec/qemu-kvm \
-name rhel6.8 \
-M pc \
-cpu Nehalem,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/bz1408389/rhel6.8.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/bz1408389/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=serial0 \
-chardev socket,id=serialchardev0,host=127.0.0.1,port=12345,server,nowait \
-device virtserialport,id=port0,chardev=serialchardev0,bus=serial0.0,name=com.redhat.rhevm.vdsm \
-chardev pty,id=charconsole0 \
-device virtconsole,chardev=charconsole0,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 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 40
done

Test results:
guest shutdown when repeat 126 times
127
error: Requested operation is not valid: domain is not running

128
error: Requested operation is not valid: domain is not running

129
error: Requested operation is not valid: domain is not running

---------------------------------------------------
Verify this bug on "qemu-kvm-0.12.1.2-2.491.el6_8.5.x86_64" as same steps above.
a.
Test results:
guest normal work and qemu not quit.
b.
Test results:
guest not shutdown when repeat 126 times,guest normal work.
Comment 9 Chao Yang 2017-01-19 20:31:43 EST
(In reply to Yiqian Wei from comment #8)
> Reproduce this bz:
> Verify this bug on "qemu-kvm-0.12.1.2-2.491.el6_8.5.x86_64" as same steps
> above.
> a.
> Test results:
> guest normal work and qemu not quit.
> b.
> Test results:
> guest not shutdown when repeat 126 times,guest normal work.

Here you mean after 128 times, right?
Comment 10 Yiqian Wei 2017-01-19 22:01:24 EST
(In reply to Chao Yang from comment #9)
> (In reply to Yiqian Wei from comment #8)
> > Reproduce this bz:
> > Verify this bug on "qemu-kvm-0.12.1.2-2.491.el6_8.5.x86_64" as same steps
> > above.
> > a.
> > Test results:
> > guest normal work and qemu not quit.
> > b.
> > Test results:
> > guest not shutdown when repeat 126 times,guest normal work.
> 
> Here you mean after 128 times, right?

yes,please ignore "126 times" this words,right is 129 times.

b.
Test results:
guest no shutdown when repeat 129 times,guest normal work.
Comment 13 Danilo Cesar de Paula 2017-02-21 05:52:48 EST
Copied the Doc text based on the original bug.
Comment 14 errata-xmlrpc 2017-02-23 12:44:21 EST
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-0309.html
Comment 15 Shiva Prasad Rao 2017-07-09 19:21:23 EDT
I am able to reproduce this on a RHEL 7.3 
qemu-kvm 1.5.3.126.el7
Comment 16 Yash Mankad 2017-07-10 10:32:27 EDT
Hi Shiva,

It was fixed in qemu-kvm-1.5.3-128.el7 for RHEL-7.3

Here's the RHEL 7.3 BZ clone:
https://bugzilla.redhat.com/show_bug.cgi?id=1377968
Comment 17 Shiva Prasad Rao 2017-07-13 14:56:34 EDT
I cant find this in the repo.

The latest package available is this:
Name        : qemu-kvm
Arch        : x86_64
Epoch       : 10
Version     : 1.5.3
Release     : 126.el7_3.10

Also this bug seems to be an internal one:
https://bugzilla.redhat.com/show_bug.cgi?id=1377968

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