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.

Bug 1594876

Summary: spice-vdagent print error messages to systemd journal when selecting text on host
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Hudziec <thudziec>
Component: spice-vdagentAssignee: Victor Toso <victortoso>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: cfergeau, dblechte, fziglio, jkoten, rduda, spice-qe-bugs, tpelka, victortoso
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: spice-vdagent-0.14.0-18.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:07:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Hudziec 2018-06-25 15:22:32 UTC
Description of problem:
spice-vdagent prints error messages to systemd journal on virtual machine, when selecting text in gedit and selecting cells in Libre Office Calc on host.

Version-Release number of selected component (if applicable):
spice-vdagent-0.14.0-15.el7.x86_64
gedit-3.28.1-1.el7.x86_64
libreoffice-calc-5.3.6.1-16.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. start virtual machine
2. run $ sudo journalctl -f in virtual machine
3. open gedit on host machine
4. write some text
5. select some text in gedit by moving mouse

Actual results:
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: selection requests pending on clipboard ownership change, clearing
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: selection requests pending on clipboard ownership change, clearing
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: selection requests pending on clipboard ownership change, clearing
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received clipboard data without an outstanding selection request, ignoring
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: selection requests pending on clipboard ownership change, clearing
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received clipboard data without an outstanding selection request, ignoring
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received selection request event for target TARGETS, while not owning client clipboard
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received selection request event for target TARGETS, while not owning client clipboard
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received selection request event for target TARGETS, while not owning client clipboard
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received selection request event for target TARGETS, while not owning client clipboard
Jun 25 17:04:59 localhost.localdomain spice-vdagent[14413]: primary: received selection request event for target TARGETS, while not owning client clipboard
...

Expected results:
No errors should be printed to systemd journal.

Additional info:
Selecting text in terminal, firefox, LO Writer does not produce errors.

Comment 2 Christophe Fergeau 2018-06-27 15:27:52 UTC
These messages have been silenced upstream by https://gitlab.freedesktop.org/spice/linux/vd_agent/commit/d39230cee236bc6b8b150c7687d49a46f519bd2b
However, I'm not sure we are supposed to get such messages unless there is something buggy somewhere in the stack.

Comment 3 Victor Toso 2018-12-14 13:01:02 UTC
Could you please clarify on what client are you using? Fedora/RHEL, GNOME/KDE, versions.

Comment 4 Tomas Hudziec 2018-12-18 15:49:30 UTC
It was RHEL 7.6 with GNOME 3.26 I think.

Comment 5 Victor Toso 2018-12-19 17:03:31 UTC
(In reply to Tomas Hudziec from comment #4)
> It was RHEL 7.6 with GNOME 3.26 I think.

Can you still reproduce easily? I think this was fixed by

https://lists.freedesktop.org/archives/spice-devel/2018-December/046532.html

And I backported and tested with temporary scratch build

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19582603

Would be great if you can test it out in case you can easily reproduce it.

Comment 6 Tomas Hudziec 2019-01-03 15:33:07 UTC
Jirko, please try to reproduce it on your 7.6. Thank you

Comment 7 Jiri Koten 2019-01-04 16:18:47 UTC
(In reply to Victor Toso from comment #5)
> (In reply to Tomas Hudziec from comment #4)
> 
> And I backported and tested with temporary scratch build
> 
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19582603
> 
> Would be great if you can test it out in case you can easily reproduce it.

Can you please make a new scratch build? This one is no longer available.

Comment 8 Victor Toso 2019-04-01 08:53:55 UTC
Fixed by

> commit 3aff78399ff4c6e69d45781e1383ff175629eb03
> Author: Jakub Janků <jjanku>
> Date:   Thu Feb 21 21:25:57 2019 +0100
>
>    x11: invalidate requests for targets on grab from client
>    
>    If XSetSelectionOwner() is invoked during the time
>    we are waiting for the requested clipboard targets,
>    the targets we eventually receive are no longer valid.
>    
>    To solve this, ignore the same count of target notifications
>    as we expected at the time we received grab from the client.
>    
>    Otherwise we end up in a situation when vdagent holds
>    the clipboard grab in the guest but cannot provide data to the
>    apps that request it - this can be observed in the log:
>    
>        clipboard: received selection request event for target *, while not owning client clipboard
>    
>    Signed-off-by: Jakub Janků <jjanku>
>    Acked-by: Victor Toso <victortoso>

Comment 13 errata-xmlrpc 2019-08-06 13:07:26 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.

https://access.redhat.com/errata/RHSA-2019:2229