Red Hat Bugzilla – Bug 978404
Copy&Paste of images fails over WAN.
Last modified: 2016-05-23 08:46:39 EDT
Description of problem:
Copy and paste of images fails over WAN condition - latency around 70-90ms and bandwidth limited to 2Mbps. It works as expected over LAN or copy and paste of text with same or higher size over WAN (the same condition as with failing image copy and paste).
Sometimes it seems that vdagent crashes (wihtout any msg in log) or even qemu-monitor is most likely busy so libvirt assumes that connection with qemu process was lost and tries to kill the qemu process.
Version-Release number of selected component (if applicable):
vdagent-win 0.1-18 (RHEl 6 client adn WInXP/7 guest)
Steps to Reproduce:
1. Establish spice session to a Windows guest with vdagent-win installed over WAN condition (70-100ms latency, <2Mbps).
2. Press printscreen in windows guest.
3. Open graphics editor in client (mspiant, gimp) and make paste.
Nothing is copied, sometimes vdagent crashes.
Image is successfully copied as It happens over LAN.
Nothing interesting in logs, I can see only sth like:
1752::INFO::2013-06-25 23:37:35,875::VDAgent::handle_clipboard_request::Image encoded to 175898 bytes
1. pasting text of the same size works? that's strange as it's exactly the same path as image.
2. what about client->guest c&p over WAN?
3. can you please provide me a VM in Brno for debugging?
Created attachment 770829 [details]
Log with additional debug messages.
To reproduce this one we connected wireless via TLV VPN. Pasting a snapshot from Win7 guest desktop (with a "nice" Wallpaper, not single color) to Linux client failed as mentioned. We couldn't reproduce it in LAN.
Debugging with Gal Hammer (vio-serial driver), we have proved that vdagent is not the issue here, and whenever the bug is reproduced, data was correctly written by the agent.
In qemu log, we see clearly see message corruption:
agent_msg_filter_process_data: invalid agent message: data exceeds size from header
((null):15982): Spice-Warning **: reds.c:863:vdi_port_read_buf_process: invalid port
main_channel_handle_parsed: agent start
In vdagent, right after the failure vio-serial write completion fails with error 317 (ERROR_MR_MID_NOT_FOUND).
logging buf_size in the qemu vio-serial device (do_flush_queued_data(), hw/char/virtio-sehw/char/virtio-serial-bus.c), we see that when sending a large enough piece of data (pasting guest desktop snapshot to the client), once in a while a previously read buffer is read again by the function. This seems like a driver bug which caused this duplication/corruption.
Gal says he patched a suspected issue in the driver, but that there is also a bug in qemu reading which is reproduced (e.g. in WAN/VPN) when consuming the data (destinated to teh client) much slower than its written by the guest agent.
Gal, please add insights & status.
(In reply to Arnon Gilboa from comment #3)
> Gal, please add insights & status.
Nothing much to tell. A bug(?) in qemu, which raise an interrupt even when the consumed buffer wasn't return back to the virt queue, discovered a bug in the virtio-serial Windows' driver. The virtio-serial driver duplicated the last write request and that caused the spice error ("data exceeds size from header").
The driver was fixed and it seems to work okay now but the copy&paste still fails from some to time. It seem that there is still a bug some where in the loop. I don't know where without further investigation.
moving to the 3.4
it requires more investigation.
Thanks to Gal for helping.
Most likely not the vdagent, and will move to the correct component as the picture of the source of the problem will clear up.
Can someone still reproduce this bug?
I've tried reproducing this bug, and it did not reproduced for me.
Tried copy/paste, over WAN, screenshot images from a Windows XP and Windows 7 guests onto RHEL-6 client (and other direction too).
Also ran some tests with WinXP as client.
let's move to 3.5, as no conclusions yet