Bug 803187
Summary: | Guest mouse and keyboard got unresponsive after resume from S3 with virtio devices | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Qunfang Zhang <qzhang> | ||||
Component: | kernel | Assignee: | Amit Shah <amit.shah> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 6.3 | CC: | acathrow, amit.shah, areis, bcao, bsarathy, dyasny, flang, juzhang, michen, mkenneth, rhod, tburke, virt-maint | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | kernel-2.6.32-262.el6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-06-20 08:34:20 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 804019 | ||||||
Attachments: |
|
Description
Qunfang Zhang
2012-03-14 07:19:42 UTC
Update: Ping works fine after guest resumes from S3 though the mouse and keyboard don't response. And test old kernel-231, the problem exists as well. Today I found guest will hang during resuming from S3 state with other virtio devices attached. Guest consumes 100% cpu resource. Command line is: /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe,-kvmclock -enable-kvm -m 4G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid 4c84db67-faf8-4498-9829-19a3d6431d9d -rtc base=localtime,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/home/rhel6.3-64.raw,if=none,format=raw,id=scsi0 -device virtio-scsi-pci,id=scsi0 -device scsi-hd,drive=scsi0 -netdev tap,vhost=on,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:42:10:66,bus=pci.0 -chardev socket,id=charchannel0,path=/tmp/qzhang-test,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -usb -device usb-tablet,id=input0 -boot c -monitor stdio -device virtio-balloon-pci,bus=pci.0,id=balloon0 -qmp tcp:0:4444,server,nowait -chardev socket,id=charserial0,path=/tmp/qzhang-isa,server,nowait -device isa-serial,chardev=charserial0,id=serial0 -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432 And I re-test again and remove all virtio device in the above command line except the virtio scsi system disk. Guest does not hang any more. Hit the problem in Comment 0 even without virtio block but have other virtio devices, such as virtio balloon, serial and nic. (In reply to comment #3) > Hit the problem in Comment 0 even without virtio block but have other virtio > devices, such as virtio balloon, serial and nic. Can you test w/o *any* virtio device? We like to isolate the mouse from virtio. Another request is to disable kvmclock (-cpu MODEL,-kvmclock). (In reply to comment #4) > (In reply to comment #3) > > Hit the problem in Comment 0 even without virtio block but have other virtio > > devices, such as virtio balloon, serial and nic. > > Can you test w/o *any* virtio device? We like to isolate the mouse from virtio. Hi, Dor As described in Comment 0, "0. No any virtio devices -> guest works well after s3" > Another request is to disable kvmclock (-cpu MODEL,-kvmclock). Yes, I have disabled kvmclock when hit this problem, also please refer to the command line in Comment 0 and Comment 2. :) Cause is in qemu; qemu resets devices after waking up from s3, causing the guest and host virtio state to go out of sync. Mike just confirmed that this happened with virtio-net on Windows too. On Windows, disabling the adapter and then enabling it gets network working again. (In reply to comment #7) > On > Windows, disabling the adapter and then enabling it gets network working again. Similarly, for Linux guests, rmmod and then modprobe the virtio-net driver makes it work again. (In reply to comment #6) > Cause is in qemu; qemu resets devices after waking up from s3, causing the > guest and host virtio state to go out of sync. Moving back to kernel. Gerd tells me a reset is to be expected even for S3. The fix then will be to handle this the same way in the kernel as S4 is done. Patches are posted upstream. Created attachment 573894 [details]
isa serial log with kernel-2.6.32-254.el6bz803187
File a new bug 808391 to track the issue described in comment 11 and comment 12. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Patch(es) available on kernel-2.6.32-262.el6 Verified this bug on kernel-2.6.32-262.el6, repeat more than 20 times and can not reproduce it any more. CLI: /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -m 2G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid 4c84db67-faf8-4498-9829-19a3d6431d9d -rtc base=localtime,driftfix=slew -drive file=/home/rhel6.3-64-new.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,addr=0x5 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:42:10:66,bus=pci.0,addr=0x3 -usb -device usb-tablet,id=input0 -boot c -monitor stdio -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -vnc :10 -qmp tcp:0:4444,server,nowait -bios /usr/share/seabios/bios-pm.bin -chardev socket,path=/tmp/qzhang-test,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -device virtio-serial-pci,id=virtio-serial0,max_ports=31,vectors=4,bus=pci.0 -chardev socket,id=channel0,path=/tmp/virtio-serial,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0 -device virtio-balloon-pci,bus=pci.0,id=balloon0 Steps: 1. boot the guest with the above command line. 2. ping external host with the virtio nic device. 3. ballooning mem to a smaller value. 4. transfer some data through virtio serial. 5. suspend guest to mem #pm-suspend 6. resume guest by press keyboard. 7. repeat step 2~6 for 20 times. Result: Guest can resume successfully and the guest devices (mouse, keyboard, network, balloon, virtio serial devices) still work well. So this issue is fixed. I will change the status to VERIFIED. 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. http://rhn.redhat.com/errata/RHSA-2012-0862.html |