Bug 978404 - Copy&Paste of images fails over WAN.
Copy&Paste of images fails over WAN.
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: spice-vdagent-win (Show other bugs)
3.2.0
Unspecified Unspecified
low Severity low
: ---
: 3.5.0
Assigned To: Gal Hammer
Desktop QE
:
Depends On:
Blocks: 1029162
  Show dependency treegraph
 
Reported: 2013-06-26 10:27 EDT by Marian Krcmarik
Modified: 2016-05-23 08:46 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-20 13:04:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Spice
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log with additional debug messages. (86.92 KB, text/plain)
2013-07-09 03:29 EDT, Tomas Jamrisko
no flags Details

  None (edit)
Description Marian Krcmarik 2013-06-26 10:27:59 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)

How reproducible:
90%

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.

Actual results:
Nothing is copied, sometimes vdagent crashes.

Expected results:
Image is successfully copied as It happens over LAN.

Additional info:
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
Comment 1 Arnon Gilboa 2013-06-30 09:23:06 EDT
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?
Comment 2 Tomas Jamrisko 2013-07-09 03:29:39 EDT
Created attachment 770829 [details]
Log with additional debug messages.
Comment 3 Arnon Gilboa 2013-07-24 08:11:05 EDT
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.
Comment 4 Gal Hammer 2013-07-24 09:24:59 EDT
(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.
Comment 6 David Blechter 2013-08-22 15:39:28 EDT
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.
Comment 8 Marc-Andre Lureau 2014-03-11 19:31:51 EDT
Can someone still reproduce this bug?
Comment 9 Uri Lublin 2014-03-26 09:01:43 EDT
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.
Comment 10 David Blechter 2014-06-02 13:53:17 EDT
let's move to 3.5, as no conclusions yet

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