Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Version-Release number of selected component (if applicable):
# uname -r
2.6.32-188.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.183.el6.x86_64
guest drivers:
RHEV-toolsSetup_3.0_17
How reproducible:
100%
Steps to Reproduce:
1.start guest with spicevmc
CLI:/usr/libexec/qemu-kvm -M rhel6.0.0 -cpu Westmere -enable-kvm -m 2048 -smp 1,sockets=1,cores=1,threads=1 -name win7_64 -uuid 9c1e21b1-1740-4117-8328-c8ae7c94068b -monitor stdio -rtc base=localtime -boot c -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/rhev/data-center/e390e371-703e-4e36-a95b-cd85aaf0e34b/677134f8-9e35-4bad-a4cb-0f8a088d7756/images/4d31e2b1-aa38-4883-befe-af9a2dbb0177/eac7f89d-335f-4d16-a106-2b1d483b33f7,if=none,id=drive-virtio-disk0,format=raw,serial=83-befe-af9a2dbb0177,cache=none,werror=stop,rerror=stop,aio=threads -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -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 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:0b:01,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channels/win7_64.com.redhat.rhevm.vdsm,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -usb -spice port=5900,addr=0,disable-ticketing -k en-us -vga qxl -global qxl-vga.vram_size=67108864
2.copy datas from guest to host (in the host choose the text ,right-click copy, on the host open gedit ,right-click paste)
3.stop VM
4,repeat step2 2 times
Actual results:
right-click does not work on the *host*
Expected results:
right-click should still work on the host.
Additional info:
Comment 1Christophe Fergeau
2011-09-21 16:46:52 UTC
I've managed to reproduce this both with a winxp and a win7 box. What I've done is
* setup a windows VM with RHEV-toolsSetup_3.0_17
* open notepad or wordpad
* type some text
* right click/copy
* switch to gedit or gnotes
* right click/paste
* shutdown computer from the start menu in the VM
* click on "discard changes" when the text editor asks
* while it's shutting down, try to use the right click button from any gtk+ app
=> the button doesn't seem to work
It seemed to work in firefox though, but I need to run more tests to be 100% sure.
The right mouse button starts working again after the VM is completely shut down.
Comment 2Christophe Fergeau
2011-09-22 12:29:31 UTC
After a discussion with hansg and more investigation, this happens because the windows agent never tells the client that the agent is shutting down and that the client should release the X selection and no longer try to query it.
11:15 < hansg> What I think is happening is that gedit / sticky notes sends a
clipboard message to the current clipboard owner on right
click, before drawing the menu. And the popup menu does not
get drawn because the client is the clipboard owner, forwards
the message to the agent in the vm, and the agent never answer
because the vm is shutting down
11:16 < hansg> The fix would be for the agent in the vm to send a clipboard
release message as soon as the shutdown starts
11:17 < hansg> Then the client will release the clipboard of the
client-machine
11:17 < hansg> So I would move the bug over to the windows agent with the
above explanation of what we believe is going on (I'm pretty
sure this is the case)
I checked that when right clicking in gedit, RedClient::send_agent_clipboard_message is called and a message is sent to spice-server, but the answer never comes back.
(In reply to comment #2)
> After a discussion with hansg and more investigation, this happens because the
> windows agent never tells the client that the agent is shutting down and that
> the client should release the X selection and no longer try to query it.
>
> 11:15 < hansg> What I think is happening is that gedit / sticky notes sends a
> clipboard message to the current clipboard owner on right
> click, before drawing the menu. And the popup menu does not
> get drawn because the client is the clipboard owner, forwards
> the message to the agent in the vm, and the agent never answer
> because the vm is shutting down
> 11:16 < hansg> The fix would be for the agent in the vm to send a clipboard
> release message as soon as the shutdown starts
> 11:17 < hansg> Then the client will release the clipboard of the
> client-machine
> 11:17 < hansg> So I would move the bug over to the windows agent with the
> above explanation of what we believe is going on (I'm pretty
> sure this is the case)
>
> I checked that when right clicking in gedit,
> RedClient::send_agent_clipboard_message is called and a message is sent to
> spice-server, but the answer never comes back.
Why not just call Platform::on_clipboard_release() from RedClient::handle_agent_disconnected(), which is called anyway when agent is stopped?
Comment 4Christophe Fergeau
2011-09-26 09:28:34 UTC
I just tried that, RedClient::handle_agent_disconnected is called while the VM is shutting down, so I could add the call there. The result is that it helps somewhat, ie mouse clicks become functional again more quickly. However, there's still a window when mouse clicks are blocked between the click on "shutdown" in windows and the time RedClient::handle_agent_disconnected, and this takes a few seconds here so it's still noticeable.