Bug 870710 - fail to resume the win7-64 guest by pressing the keyboard after do S3 if use remote-viewer
Summary: fail to resume the win7-64 guest by pressing the keyboard after do S3 if use ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 880458 (view as bug list)
Depends On:
Blocks: 912287 924476
TreeView+ depends on / blocked
 
Reported: 2012-10-28 05:57 UTC by Sibiao Luo
Modified: 2013-11-21 08:02 UTC (History)
25 users (show)

Fixed In Version: virt-viewer-0.5.6-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Keyboard events are not sent to the guest when it is suspended. Consequence: The guest doesn't wake up. Fix: Send all key events to guest, regardless of its state. Result: Press any key when the guest is suspended, and the guest will be wakeup.
Clone Of:
: 924476 (view as bug list)
Environment:
Last Closed: 2013-11-21 08:02:57 UTC
Target Upstream Version:


Attachments (Terms of Use)
memory-dump (269.76 KB, application/vnd.tcpdump.pcap)
2012-12-18 07:31 UTC, yunpingzheng
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1578 normal SHIPPED_LIVE virt-viewer bug fix and enhancement update 2013-11-20 21:39:50 UTC

Description Sibiao Luo 2012-10-28 05:57:13 UTC
Description of problem:
Boot a win7 sp1 64bit guest and use 'remote-viewer spice://$host_ip:$port' to connect guest desktop, then do S3, but fail to press the keyboard when resume the guest, and the menu if 'Send key' is gray and unusable.
btw, I tried 'spicec -h $ip_addr -p $port' did not hit this issue. 
if send "system_wakeup" qemu command to resume it, it did not hit this issue, but there is existing anther bug 870708.

Version-Release number of selected component (if applicable):
host info:
kernel-2.6.32-335.el6.x86_64
qemu-kvm-0.12.1.2-2.331.el6.x86_64
seabios-0.6.1.2-25.el6.x86_64
spice-server-0.12.0-1.el6.x86_64
package gtk is not installed
spice-gtk-0.14-4.el6.x86_64
virt-viewer-0.5.2-14.el6.x86_64
guest info:
win7 sp1 64bit
virtio-win-prewhql-0.1-41

How reproducible:
always

Steps to Reproduce:
1.sync the host time with ntp server.
# ntpdate $ntp_server
2.boot guest with " -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0"
3.use 'remote-viewer spice://$host_ip:$port' to connect guest desktop.
# remote-viewer spice://10.66.9.97:5931
4.sync guest system clock same to host.
5.suspend guest to memory inside guest:
click Star ---> sleep
6.Wakeup guest by pressing any keyboard.
  
Actual results:
after the step 6, it fail to resume the guest.

Expected results:
can resume the guest by pressing any keyboard successfully.

Additional info:
# /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu Opteron_G3 -enable-kvm -m 2048 -smp 4,sockets=2,cores=2,threads=1 -usb -device usb-tablet,id=input0 -name sluo_acpi -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/windows_7_ultimate_sp1_x64.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_drive,bus=pci.0,addr=0x4,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x5 -device usb-ehci,id=ehci,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -spice port=5931,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x8 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -boot menu=on -monitor stdio

Comment 1 Sibiao Luo 2012-10-28 05:58:07 UTC
My host cpu info:
processor	: 3
vendor_id	: AuthenticAMD
cpu family	: 16
model		: 2
model name	: AMD Phenom(tm) 9600B Quad-Core Processor
stepping	: 3
cpu MHz		: 1150.000
cache size	: 512 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 5
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs npt lbrv svm_lock
bogomips	: 4587.55
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

Comment 2 Sibiao Luo 2012-10-28 06:04:49 UTC
(In reply to comment #0)
> Description of problem:
> Boot a win7 sp1 64bit guest and use 'remote-viewer spice://$host_ip:$port'
> to connect guest desktop, then do S3, but fail to press the keyboard when
> resume the guest, and the menu if 'Send key' is gray and unusable.

rhel guest did not hit this issue, it can resume successfully.

Comment 5 Dor Laor 2012-11-13 16:45:28 UTC
This looks like a virtio driver issue (we have bugs there), need to find the exact duplicate

Comment 6 Sibiao Luo 2012-11-14 05:06:29 UTC
(In reply to comment #5)
> This looks like a virtio driver issue (we have bugs there), need to find the
> exact duplicate

The "system_wakeup" command can work correctly for remote-viewer, just fail to wakeup guest by pressing any keyboard. 
I paste the mice info here,
(qemu) info mice 
* Mouse #1: QEMU USB Tablet
  Mouse #0: QEMU PS/2 Mouse

btw, also reproduce this issue w/ 'e1000 + ide + remote-viewer + press keyboard',  but "system_wakeup" command can work correctly for remote-viewer, just fail to wakeup guest by pressing any keyboard.
eg:...-drive file=/home/windows_7_ultimate_sp1_x64.qcow2,if=none,id=drive-ide1-0-1,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,drive=drive-ide1-0-1,id=ide1-0-1,bus=ide.1,unit=1,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x4
(qemu) info mice
* Mouse #1: QEMU USB Tablet
  Mouse #0: QEMU PS/2 Mouse
(qemu) info block
drive-ide1-0-1: removable=0 io-status=ok file=/home/windows_7_ultimate_sp1_x64.qcow2 ro=0 drv=qcow2 encrypted=0
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]

Best Regards.
sluo

Comment 7 Mike Cao 2012-11-14 05:11:29 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > This looks like a virtio driver issue (we have bugs there), need to find the
> > exact duplicate
> 
> The "system_wakeup" command can work correctly for remote-viewer, just fail
> to wakeup guest by pressing any keyboard. 
> I paste the mice info here,
> (qemu) info mice 
> * Mouse #1: QEMU USB Tablet
>   Mouse #0: QEMU PS/2 Mouse

Pls retest w/o USB mice .I remember usb mouse/keyboard does not support to wake system up

> 
> btw, also reproduce this issue w/ 'e1000 + ide + remote-viewer + press
> keyboard',  but "system_wakeup" command can work correctly for
> remote-viewer, just fail to wakeup guest by pressing any keyboard.
> eg:...-drive
> file=/home/windows_7_ultimate_sp1_x64.qcow2,if=none,id=drive-ide1-0-1,
> format=qcow2,cache=none,werror=stop,rerror=stop -device
> ide-drive,drive=drive-ide1-0-1,id=ide1-0-1,bus=ide.1,unit=1,bootindex=1
> -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device
> e1000,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,
> addr=0x4
> (qemu) info mice
> * Mouse #1: QEMU USB Tablet
>   Mouse #0: QEMU PS/2 Mouse
> (qemu) info block
> drive-ide1-0-1: removable=0 io-status=ok
> file=/home/windows_7_ultimate_sp1_x64.qcow2 ro=0 drv=qcow2 encrypted=0
> floppy0: removable=1 locked=0 tray-open=0 [not inserted]
> sd0: removable=1 locked=0 tray-open=0 [not inserted]
> 
> Best Regards.
> sluo

Comment 8 Sibiao Luo 2012-11-14 05:30:25 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> Pls retest w/o USB mice .I remember usb mouse/keyboard does not support to
> wake system up
> 
yes, thanks for your kindly reminds.
I remove the USB Tablet and retest it with 'e1000 + ide + PS/2 mose + remote-viewer + press keyboard', it still hit this issue that fail to wakeup guest by pressing any keyboard, but "system_wakeup" command can work correctly for remote-viewer.
eg:...-drive file=/home/windows_7_ultimate_sp1_x64.qcow2,if=none,id=drive-ide1-0-1,format=qcow2,cache=none,werror=stop,rerror=stop -device ide-drive,drive=drive-ide1-0-1,id=ide1-0-1,bus=ide.1,unit=1,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x4
(qemu) info mice 
* Mouse #0: QEMU PS/2 Mouse
(qemu)

and 'virtio-net + virtio-blk + PS/2 mose + remote-viewer + press keyboard' still hit this issue, but "system_wakeup" command can work correctly for remote-viewer.
eg:...-drive file=/home/windows_7_ultimate_sp1_x64.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_drive,bus=pci.0,addr=0x4,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D:B1,bus=pci.0,addr=0x5
(qemu) info mice 
* Mouse #0: QEMU PS/2 Mouse
(qemu)

Best Regards.
sluo

Comment 9 Mike Cao 2012-11-14 06:04:49 UTC
(In reply to comment #5)
> This looks like a virtio driver issue (we have bugs there), need to find the
> exact duplicate

Dor ,seems it related to virt-viewer

Following is the summary from sluo

   pv drivers + virt-viewer  --> reproduced
no-pv drivers + virt-viewer  --> reproduced
   pv drivers + spice client --> can not reproduce
no-pv drivers + spice client --> can not reproduce


Mike

Comment 10 Qunfang Zhang 2012-11-27 03:42:59 UTC
*** Bug 880458 has been marked as a duplicate of this bug. ***

Comment 11 yunpingzheng 2012-12-18 07:31:27 UTC
Created attachment 665342 [details]
memory-dump

Comment 12 yunpingzheng 2012-12-18 07:37:15 UTC
when do block-stream with guest s3 and resume, after S3 the guest(win7-32) can not resume. after several minutes(about 10mins) the guest BSOD.

during test monitor report an error like:
  virtio_ioport_write: unexpected address 0x13 value 0x1

host info:
qemu-kvm-rhev-0.12.1.2-2.344.el6.x86_64
kernel-2.6.32-347.el6.x86_64
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 6783.85
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual

Comment 13 Mike Cao 2012-12-18 07:47:30 UTC
Yunzheng, What you report is a different from this one 
Pls re-generate kernel memory dump and report a new bug to track .

Mike

Comment 14 yunpingzheng 2012-12-24 08:34:19 UTC
mike
ok, i will report a new bug to track it.

Comment 15 Gal Hammer 2013-01-31 15:50:14 UTC
It looks like a remote-viewer bug. Although qemu is still alive and waiting for a keyboard event in order to wake up, the spice client doesn't send any key.

Comment 18 Marc-Andre Lureau 2013-03-21 20:44:51 UTC
patch sent to ML "Forward directly key events to display¨  (doesn't show up in archive yet, so no link)

Comment 24 tingting zheng 2013-07-08 07:45:43 UTC
I can reproduce this bug with:
# rpm -qa virt-viewer
virt-viewer-0.5.2-18.el6_4.2.x86_64

# rpm -qa |grep spice
spice-vdagent-0.12.0-4.el6.x86_64
spice-usb-share-4.9-9.el6.x86_64
kmod-kspiceusb-rhel60-4.9-14.el6.x86_64
spice-glib-0.14-7.el6.x86_64
spice-gtk-python-0.14-7.el6.x86_64
spice-gtk-0.14-7.el6.x86_64
spice-xpi-2.7-22.el6.x86_64
spice-server-0.12.0-12.el6.x86_64

Tested with:
# rpm -qa virt-viewer
virt-viewer-0.5.6-3.el6.x86_64

# rpm -qa |grep spice
spice-gtk-tools-0.20-1.el6.x86_64
spice-glib-0.20-1.el6.x86_64
spice-vdagent-0.14.0-1.el6.x86_64
spice-server-0.12.3-1.el6.x86_64
spice-gtk-0.20-1.el6.x86_64
spice-gtk-python-0.20-1.el6.x86_64
spice-client-0.8.2-15.el6.x86_64
spice-protocol-0.12.2-1.el6.noarch

Steps as description:
1.sync the host time with ntp server.
# ntpdate $ntp_server
2.boot guest with " -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0"
3.use 'remote-viewer spice://$host_ip:$port' to connect guest desktop.
# remote-viewer spice://localhost:5903
4.sync guest system clock same to host.
5.suspend guest to memory inside guest:
click Start ---> sleep
6.Press any keyboard,then guest will be wakeup.

Refer to the above comments,move the bug as VERIFIED.

Comment 25 errata-xmlrpc 2013-11-21 08:02:57 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.

http://rhn.redhat.com/errata/RHBA-2013-1578.html


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