Re: spice-vdagent[$PID]: clipboard: unexpected selection type STRING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 08/08/2013 10:51 AM, Thomas Koch wrote:
Hi,

I've blocks of this message twice a second in the syslog of my kvm guest:

spice-vdagent[3676]: clipboard: unexpected selection type STRING

The messages start to appear when I copy something in the host and they stop
when I copy something in the guest. I also get the following line once when I
select text in the host:

This sounds like something in the guest is polling the clipboard owner
(which at this point is the agent) for data repeatedly and doing so in a
manner which does not follow the icccm specification.

Not really surprising given that the fact that is polling alone already
suggests that it is very broken code (there are events to get notified
of clipboard changes).

Attached is a patch which adds some extra debugging to the agent, can
you please build the agent inside the guest with this patch, or simply
build from git-master, and then reproduce. I expect the second message
the patch adds to appear in the logs, which would confirm this is an
issue with some other application under X. Once this is confirmed I'll
probably just change the messages in question to debug messages, to avoid
spamming the logs in case of broken apps communicating with the client.

Regards,

Hans
>From bad87034bbed85e65e9b8fe479c967a3d0f9c861 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@xxxxxxxxxx>
Date: Thu, 8 Aug 2013 12:01:48 +0200
Subject: [linux-vdagent PATCH] vdagent_x11_target_to_type: Improve error
 logging

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 src/vdagent-x11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/vdagent-x11.c b/src/vdagent-x11.c
index 6a58532..aae8566 100644
--- a/src/vdagent-x11.c
+++ b/src/vdagent-x11.c
@@ -832,6 +832,8 @@ static void vdagent_x11_handle_selection_notify(struct vdagent_x11 *x11,
     selection = x11->conversion_req->selection;
     type = vdagent_x11_target_to_type(x11, selection,
                                       x11->conversion_req->target);
+    if (type == VD_AGENT_CLIPBOARD_NONE)
+        syslog(LOG_ERR, "internal error conversion_req has bad target");
     if (len == 0) { /* No errors so far */
         len = vdagent_x11_get_selection(x11, event, selection,
                                         x11->conversion_req->target,
@@ -1041,6 +1043,7 @@ static void vdagent_x11_handle_selection_request(struct vdagent_x11 *x11)
     type = vdagent_x11_target_to_type(x11, selection,
                                       event->xselectionrequest.target);
     if (type == VD_AGENT_CLIPBOARD_NONE) {
+        syslog(LOG_ERR, "guest app requested a non-advertised target");
         vdagent_x11_send_selection_notify(x11, None, NULL);
         return;
     }
-- 
1.8.3.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]