Bug 92176 - Copy & Paste (Strg +C/Strg+V) causes hangs in Windows 7 client
Summary: Copy & Paste (Strg +C/Strg+V) causes hangs in Windows 7 client
Status: RESOLVED MOVED
Alias: None
Product: Spice
Classification: Unclassified
Component: spice-gtk (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-29 06:28 UTC by ch_schmidpeter
Modified: 2018-06-03 10:22 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description ch_schmidpeter 2015-09-29 06:28:21 UTC
I use qemu/kvm with a Windows 7 x64 client. Having spice 0.100 installed copy & paste does not work on around 50% of the times. It will hang the client OS for several seconds instead when trying to copy/paste text in the client.
When using virt-viewer following message appears on the host console:
(virt-viewer:13283): GSpice-CRITICAL **: clipboard_request: assertion 's->clipboard_by_guest[selection] == FALSE' failed

The bug also happens when using virt-manager instead of virt-viewer.
Comment 1 Victor Toso 2015-09-29 06:36:55 UTC
Thanks for taking time to report this.

(In reply to ch_schmidpeter from comment #0)
> I use qemu/kvm with a Windows 7 x64 client. Having spice 0.100 installed
> copy & paste does not work on around 50% of the times. It will hang the
> client OS for several seconds instead when trying to copy/paste text in the
> client.
> When using virt-viewer following message appears on the host console:
> (virt-viewer:13283): GSpice-CRITICAL **: clipboard_request: assertion
> 's->clipboard_by_guest[selection] == FALSE' failed
> 
> The bug also happens when using virt-manager instead of virt-viewer.

You are using a windows client to connect to a windows guest, is that correct?
Could you attach the client log to the bugzilla?
Comment 2 Mikhail Kotelnikov 2015-12-08 14:46:53 UTC
Host: Debian GNU/Linux 8.2
Guest: Win7 x64, spice-guest-tools v0.100

First configuration:
  qemu-system-x86: 2.1
  libspice-server1 0.12.5

Second configuration:
  qemu-system-x86: 2.4
  libspice-server1 0.12.6

In first configuration copy-paste to atlassian hipchat, notepad++ and some other applications in guest caused guest freeze with 100% (and more according to top) CPU usage by qemu process on host. Once I've seen that vdagent used 100% of CPU on guest in the same situation.
Also frequently be observed situation described in bugreport.

In second configuration influence of copy-paste has reduced but main bug remains.

Main bug (in both configurations):
In arbitary time picture in virt-viewer freezes. If try to close
virt-viewer, it shows black screen with notice in center: 'Waiting for closing view 1' (or something similar). It may be closed only by [x]kill. After
restarting virt-viewer things proceed normally.
Some time qemu-kvm instance consumes 100% CPU and vm freezes.
First issue happens about every hour or half a hour. Second one-two
times a day during continuous vm usage.
Btw, second issue may be concerned with memory usage. I have only 2Gb of
memory dedicated to vm and chrome eats it very fast.
Comment 3 Mikhail Kotelnikov 2015-12-08 16:01:39 UTC
When picture freezes virt-viewer reports:
(virt-viewer:8529): GSpice-CRITICAL **: spice_playback_channel_set_delay: assertion 'SPICE_IS_PLAYBACK_CHANNEL(channel)' failed
(virt-viewer:8529): GSpice-CRITICAL **: spice_inputs_key_press: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed
(virt-viewer:8529): GSpice-CRITICAL **: spice_inputs_key_release: assertion 'SPICE_CHANNEL(channel)->priv->state != SPICE_CHANNEL_STATE_UNCONNECTED' failed

Each message many times in random order.

(virt-viewer:8529): Gdk-WARNING **: virt-viewer: Fatal IO error 11 (Ресурс временно недоступен) on X server :0.
'Resource temporary unavailable' in brackets. Last message maybe after virt-viewer killing.
Comment 4 Victor Toso 2015-12-17 11:25:58 UTC
(In reply to Mikhail Kotelnikov from comment #2)
> Host: Debian GNU/Linux 8.2
> Guest: Win7 x64, spice-guest-tools v0.100
> 
> First configuration:
>   qemu-system-x86: 2.1
>   libspice-server1 0.12.5
> 
> Second configuration:
>   qemu-system-x86: 2.4
>   libspice-server1 0.12.6

You are mentioning the Host and Guest, which is the client? Windows or Linux?
This bug was opened with windows client so your problem could be different.

In case your client is windows as well, could you please attach the logs from client and qemu to this bug?
Comment 5 Mikhail Kotelnikov 2015-12-17 13:36:07 UTC
No. I use linux client. It's virt-viewer 1.0.
Comment 6 Victor Toso 2015-12-17 15:40:18 UTC
(In reply to Mikhail Kotelnikov from comment #5)
> No. I use linux client. It's virt-viewer 1.0.

Could you please try with newer version? virt-viewer in fedora 23 is 3.0.
If you still have a problem, you can file another bug as this one by Comment #0 is on windows client
Comment 7 ch_schmidpeter 2016-01-08 14:09:29 UTC
I can produce the bug with virt-viewer 2.0.4. Now I try virt-viewer 3.0.1 and will report when it happens again. The proplem either occurs pretty often (~50 of the copy/paste tries) or never in one session. If I reboot the system (I tried only both host and client) and than it seems determined by change wheter it occurs often or never in the new session.

@Victor Toso: 
Where do I get the trace from?
What do you mean with the word client?
I use linux42 as host and Windows 7 x64 as client.
Comment 8 ch_schmidpeter 2016-01-08 14:15:40 UTC
* I meant guest not client in the previous post.
But what do you mean with client?

The problem also happens with virt-viewer 3.0.1.
Comment 9 Christophe Fergeau 2016-01-08 14:22:00 UTC
The client is remote-viewer/the machine running remote-viewer. It may or may not be the same as the host machine (as SPICE access can be done remotely).
Comment 10 Pavel Grunt 2016-01-08 14:25:21 UTC
(In reply to ch_schmidpeter from comment #7)
> I can produce the bug with virt-viewer 2.0.4. Now I try virt-viewer 3.0.1
> and will report when it happens again. The proplem either occurs pretty
> often (~50 of the copy/paste tries) or never in one session. If I reboot the
> system (I tried only both host and client) and than it seems determined by
> change wheter it occurs often or never in the new session.
>
Are other features (eg resizing the window changes guest's display resolution) working when copy&paste doesn't work?
Comment 11 Victor Toso 2016-01-18 15:32:23 UTC
to comment #10
Comment 12 Gael Lalleman 2018-03-12 12:42:32 UTC
Hello,
i think i have hitted the same bug.

Host: Fedora 27 (Linux 4.15.6-300.fc27.x86_64 #1 SMP), spice-server-0.14.0-1.fc27.x86_64, spice-gtk3-0.34-1.fc27.x86_64
Guest: Windows 7 SP1 fully updated as of 2018-03, vdagent (tested with 0.9.0 & 0.8.0 versions from https://www.spice-space.org/download/windows/vdagent/)

How to reproduce : 
 1. Copy some text in the guest with CTRL+C (i have same results when i copy from host or other guest)
 2. First paste in text editor (notepad, office excel or whatever) in the guest with CTRL+V ; first paste command is always successful
 3. Repeat step 2 until guest hang for few second (sometime it take two tries, sometime 10 tries are needed) and paste does not work

When the problem occur, i see the folowing message in the virt-viewer console : "(remote-viewer:10151): GSpice-CRITICAL **: clipboard_request: assertion 's->clipboard_by_guest[selection] == FALSE' failed"

Every other features (guest auto resize, .. works correctly. 

I put the complete virt-viewer logs for completeness :

$ remote-viewer --debug spice://localhost:5900
(remote-viewer:10151): virt-viewer-DEBUG: Opening display to spice://localhost:5900
(remote-viewer:10151): virt-viewer-DEBUG: Guest (null) has a spice display
(remote-viewer:10151): virt-viewer-DEBUG: After open connection callback fd=-1
(remote-viewer:10151): virt-viewer-DEBUG: Opening connection to display at spice://localhost:5900
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67c7439c0 SpiceMainChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: notebook show status 0x55b67c6cc2f0
(remote-viewer:10151): virt-viewer-DEBUG: main channel: opened
(remote-viewer:10151): virt-viewer-DEBUG: notebook show status 0x55b67c6cc2f0
(remote-viewer:10151): virt-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to 6d8e303c-f8e5-48fb-91cf-ca7556feeb1f
(remote-viewer:10151): virt-viewer-DEBUG: app is not in full screen
(remote-viewer:10151): virt-viewer-DEBUG: app is not in full screen
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67c998fa0 SpiceUsbredirChannel 1
(remote-viewer:10151): virt-viewer-DEBUG: new usbredir channel
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67ca0ab90 SpiceUsbredirChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: new usbredir channel
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67c9baa30 SpiceRecordChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67c9eda30 SpicePlaybackChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: new audio channel
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67ca06170 SpiceDisplayChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67cb76d80 SpiceCursorChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: New spice channel 0x55b67cb78bc0 SpiceInputsChannel 0
(remote-viewer:10151): virt-viewer-DEBUG: new inputs channel
(remote-viewer:10151): virt-viewer-DEBUG: creating spice display (#:0)
(remote-viewer:10151): virt-viewer-DEBUG: Insert display 0 0x55b67c942f50
(remote-viewer:10151): virt-viewer-DEBUG: Found a window without a display, reusing for display #0
(remote-viewer:10151): virt-viewer-DEBUG: notebook show display 0x55b67c6cc2f0

(remote-viewer:10151): GSpice-WARNING **: Warning no automount-inhibiting implementation available
(remote-viewer:10151): virt-viewer-DEBUG: Allocated 1808x752
(remote-viewer:10151): virt-viewer-DEBUG: Child allocate 1808x752

(remote-viewer:10151): Gtk-WARNING **: Allocating size to SpiceDisplay 0x55b67cb8e3e0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
(remote-viewer:10151): virt-viewer-DEBUG: Allocated 1920x988
(remote-viewer:10151): virt-viewer-DEBUG: Child allocate 1920x799
(remote-viewer:10151): virt-viewer-DEBUG: Allocated 1920x988
(remote-viewer:10151): virt-viewer-DEBUG: Child allocate 1920x988
(remote-viewer:10151): virt-viewer-DEBUG: notebook show status 0x55b67c6cc2f0
(remote-viewer:10151): virt-viewer-DEBUG: notebook show display 0x55b67c6cc2f0

(remote-viewer:10151): GSpice-CRITICAL **: clipboard_request: assertion 's->clipboard_by_guest[selection] == FALSE' failed
Comment 13 GitLab Migration User 2018-06-03 10:22:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice-gtk/issues/36.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.