Bug 1043782

Summary: Additional display pop out when restarting service spice-vdagentd in guest
Product: Red Hat Enterprise Linux 7 Reporter: CongDong <codong>
Component: spice-gtkAssignee: Jonathon Jongsma <jjongsma>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: cfergeau, codong, dblechte, desktop-qa-list, dyuan, jjongsma, mkrcmari, mzhan, rbalakri, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-gtk-0.22-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1032923 Environment:
Last Closed: 2015-03-05 13:40:44 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:
Bug Depends On: 1032923    
Bug Blocks: 1009648    

Description CongDong 2013-12-17 07:05:36 UTC
+++ This bug was initially created as a clone of Bug #1032923 +++
Repeat step 3 quickly about 10-20 times,
This will be reproduced on RHEL7 with:

# rpm -qa spice* virt-viewer
spice-glib-0.20-6.el7.x86_64
spice-gtk3-0.20-6.el7.x86_64
virt-viewer-0.5.7-2.el7.x86_64
spice-gtk-0.20-6.el7.x86_64
spice-server-0.12.4-3.el7.x86_64
spice-xpi-2.8-4.el7.x86_64
spice-vdagent-0.14.0-5.el7.x86_64

And the display will come out with a mirror of another display.


Description
Additional display pop out when restarting service spice-vdagentd in guest

Version:
libvirt-0.10.2-29.el6.1.x86_64
virt-viewer-0.5.6-8.el6.x86_64
spice-gtk-python-0.20-11.el6.x86_64
spice-xpi-2.7-24.el6.x86_64
spice-vdagent-0.14.0-2.el6.x86_64
spice-glib-0.20-11.el6.x86_64
spice-gtk-0.20-11.el6.x86_64
spice-server-0.12.4-6.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a spice guest with qxl and spicevmc,install spice-vdagent in guest.
2.Boot the guest,use virt-viewer to launch the guest,disable display 1 and enable other displays,eg display 2.
# virt-viewer $guest
3.Restart service spice-vdagentd in guest.
4.Display 1 will pop out.

Actual results:
As description.

Expected results:
No additional display pop out when restarting service spice-vdagentd in guest.

Additional info:
1.If enable display 1,then restart service spice-vdagentd in guest,no additional display pop out.
2.Disable display 1,enable display 3 or 4,restart service spice-vdagentd in guest,display 1 will pop put.
3.The issue can not be reproduced on rhel7.

Comment 2 RHEL Program Management 2014-03-24 05:49:57 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Jonathon Jongsma 2014-08-27 21:35:16 UTC
This appears to be caused by a race condition when an agent becomes connected. When the agent becomes connected, virt-viewer triggers a display update (spice_main_send_monitor_config()). This display update happens in a timeout handler, but the timeout interval is set to 0 (so it behaves basically like an idle handler). 

The race happens because spice_main_send_monitor_config() behaves slightly differently depending on the agent's capabilities.  And sometimes the idle handler runs after the client and server have negotiated agent capabilities, and sometimes it runs before the client and server have negotiated capabilities. When it runs *before* the agent capabilities are negotiated, we have to assume that the server does not support sparse monitor configurations.  So instead of sending down an update where display #0 is off and display #1 is WxH, we send down an update that only a single display: display #0 is WxH. This results in the first display becoming enabled.

Comment 6 Jonathon Jongsma 2014-09-12 16:09:59 UTC
Needs QA ack

Comment 10 errata-xmlrpc 2015-03-05 13:40:44 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://rhn.redhat.com/errata/RHBA-2015-0297.html