Bug 1173038

Summary: kernel panic if execute "echo 0 > /dev/watchdog" inside guest with potion "-watchdog-action shutdown"
Product: Red Hat Enterprise Linux 7 Reporter: Lin Chen <linchen>
Component: qemu-kvm-rhevAssignee: Radim Krčmář <rkrcmar>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: hhuang, juzhang, linchen, michen, shu, virt-maint, xfu
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: 2015-01-15 20:11:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Lin Chen 2014-12-11 10:46:55 UTC
Description of problem:
Boot guest with "-watchdog i6300esb -watchdog-action shutdown" CLI option, then execute "echo 0 > /dev/watchdog" inside guest. guest don't shutdown and kernel panic.
QE also tested it with:
1. 3.10.0-123.el7.x86_64 inside guest and qemu-kvm-rhev-2.1.2-16.el7.x86_64 inside host.
2. 3.10.0-123.el7.x86_64 inside guest and qemu-kvm-rhev-1.5.3-60.el7_0.11.x86_64 inside host.
in both scenario above,guest don't kernel panic but keep black screen and don't shutdown successfully.


Version-Release number of selected component (if applicable):
inside host:
  uname -r
  3.10.0-213.el7.x86_64
  rpm -qa|grep 
  qemu-kvm-rhev-2.1.2-16.el7.x86_64
inside guest:
  uname -r
  3.10.0-213.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with "-watchdog i6300esb -watchdog-action shutdown" CLI option.
2.Execute "echo 0 > /dev/watchdog" inside guest.

Actual results:
Guest don't shutdown and kernel panic.

Expected results:
Guest shall shutdown gracefully

Additional info:

Comment 3 Radim Krčmář 2014-12-11 19:24:58 UTC
(Don't other scenarios end at black screen because you have -no-shutdown?)

Does it fail the same if you enter 'system_powerdown' in the qemu monitor?
(Normal shutdown from guest works?)

Can you share the qemu command line?  I can't reproduce with the one I tried ...
(It is a problem with virtio storage, so it would be great if you could minimize it around that.)

Thanks.

Comment 4 Lin Chen 2014-12-12 04:26:16 UTC
> (Don't other scenarios end at black screen because you have -no-shutdown?)
QE didn't test these scenarios with option -no-shutdown.

> Does it fail the same if you enter 'system_powerdown' in the qemu monitor?
> (Normal shutdown from guest works?)
According to bug980692 QE can't confirm whether 'system_powerdown' in the qemu monitor successfully. However, it is normal if guest run in runlevel3.
And shutdown inside guest normally.


> Can you share the qemu command line?  I can't reproduce with the one I tried
my full command line:
/usr/libexec/qemu-kvm -cpu SandyBridge,+kvm_pv_eoi -m 2048 -smp 2,sockets=1,cores=2,threads=1 -M pc -enable-kvm -name RHEL7 -drive file=/home/guest/RHEL7.1-64.qcow2,if=none,format=qcow2,werror=stop,rerror=stop,cache=none,id=drive-blk -device virtio-blk-pci,drive=drive-blk,id=virtio-disk0 -nodefaults -nodefconfig -monitor stdio  -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=be:ba:0a:82:5a:78,id=net0  -vga qxl -spice port=5901,disable-ticketing -qmp tcp:0:4440,server,nowait -watchdog i6300esb -watchdog-action shutdown -serial unix:/tmp/ttys0,server,nowait

> (It is a problem with virtio storage, so it would be great if you could
> minimize it around that.)
QE will minimize and provide it later. 


additionally, QE tested it again but can't reproduce it as well and get some info as following:
[  109.969052] i6300esb: Unexpected close, not stopping watchdog!
Dec 11 22:05:13 unused kernel: i6300esb: Unexpected close, not stopping watchdog!
Dec 11 22:05:43 unused systemd-logind: Power key pressed.
Dec 11 22:05:43 unused gnome-session: (gnome-settings-daemon:2833): power-plugin-WARNING **: failed to turn the panel off: Display is not DPMS capable
Dec 11 22:05:43 unused NetworkManager[760]: <info>  sleep requested (sleeping: no  enabled: yes)
Dec 11 22:05:43 unused NetworkManager[760]: <info>  sleeping...
Dec 11 22:05:43 unused NetworkManager[760]: <info>  (eth0): device state change: disconnected -> unmanaged (reason 'sleeping') [30 10 37]
Dec 11 22:05:43 unused NetworkManager[760]: <info>  (eth0): link disconnected
Dec 11 22:05:43 unused NetworkManager[760]: <info>  NetworkManager state is now ASLEEP
Dec 11 22:05:44 unused systemd: Starting Sleep.
Dec 11 22:05:44 unused systemd: Reached target Sleep.
Dec 11 22:05:44 unused systemd: Starting Suspend...
Dec 11 22:05:44 unused systemd-sleep: Suspending system...
Dec 11 22:05:44 unused kernel: PM: Syncing filesystems ... done.

Comment 5 Radim Krčmář 2015-01-15 20:11:40 UTC
Not reproducible by QE anymore, going to presume it is fixed.

If you manage to hit it again, please reopen and give me access to the setup.