Bug 692833

Summary: Xorg's consuming 100% of cpu when changing resolution of a client
Product: Red Hat Enterprise Linux 6 Reporter: Marian Krcmarik <mkrcmari>
Component: spice-clientAssignee: Marc-Andre Lureau <marcandre.lureau>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: cfergeau, cmeadors, dblechte, djasa, lkocman, marcandre.lureau, mkenneth, pvine, skrishna, uril
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spice-client-0.8.2-6 Doc Type: Bug Fix
Doc Text:
Cause Upon resolution change of Linux client machine, XRR is sending spicec spurious ScreenChangeNotify calls in a loop. For each such call, spicec creates a new window object and configures it. Consequence Xorg proccess cpu consumption grew up to 100% Fix spicec reuses a single Window object. Result When a client machine changes resolution, Xorg process does not consume 100% cpu.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 15:22:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reuse platform_win none

Description Marian Krcmarik 2011-04-01 10:35:25 UTC
Description of problem:
Xorg process consumes 100% of cpu when changing resolution of client's screen while spicec windows is open. Xorg process usage drops down immediately after killing spicec process. Guest is open using RHEVM2.2 sm100.

Version-Release number of selected component (if applicable):
spice-xpi-2.4-4.el6.i686
spice-client-0.8.0-2.el6.i68
(Tried spice-client-0.6.3-2.el6_0.5.i686 with same result)
Guest:
RHEL5.6 64 bit with xorg-x11-drv-qxl-0.0.12-1.2.el5
(Tried RHEL6.1 with xorg-x11-drv-qxl-0.0.12-9)


How reproducible:
often

Steps to Reproduce:
1. Open a spicec window with a guest using User portal.
2. Switch off from fullscreen mode If guest is in.
3. Change screen resolution of client monitor using xrandr or Display clicking tool to lower and then to higher.
  
Actual results:
Xorg process usage jumps t0 100%, client is freezing, rendering is slow.

Expected results:
Changing client resolution should be smooth just like in a case when no spicec window is open.

Additional info:
There was similar bug of high usage of Xorg -  628573. This one happens in diff scenario.

Comment 2 RHEL Program Management 2011-04-04 02:07:52 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Hans de Goede 2011-04-12 07:19:49 UTC
*** Bug 695438 has been marked as a duplicate of this bug. ***

Comment 7 Marc-Andre Lureau 2011-05-16 21:21:04 UTC
taking bug

Comment 8 Marian Krcmarik 2011-05-17 17:16:38 UTC
I failed to mention important information.
I use 2 monitors on client machine and 1 screen on guest. Problem seems to be related to multimonitor. This message is repeatedly display in spicec log while Xorg consumes 100% of CPU till I kill spicec:

1305652116 INFO [21119:21119] MultyMonScreen::MultyMonScreen: platform_win: 83886258

Comment 9 Lubos Kocman 2011-05-19 12:05:35 UTC
Happens also in case that guest is win7x32

Comment 10 RHEL Program Management 2011-05-19 14:59:26 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 11 David Jaša 2011-07-11 12:30:57 UTC
*** Bug 717209 has been marked as a duplicate of this bug. ***

Comment 17 Marc-Andre Lureau 2011-07-28 15:44:07 UTC
Created attachment 515754 [details]
reuse platform_win

This is the patch I use that fixed the problem for me (100% cpu Xorg when toggling fullscreen with 2 clients). Bug reproducible on RHEL6 and F15+, spicec git, with any guest single head.

Comment 18 Christophe Fergeau 2011-08-10 14:00:24 UTC
I can reproduce the bug without the patch, and not with the patch. Moreover teh patch makes sense to me, so ACK from me.

Comment 19 Swapna Krishnan 2011-08-17 18:42:38 UTC
On a RHEL 6 client with 0.8.2-2, I was able to reproduce the Xorg going close to 100% and slowing machine. I upgraded to 0.8.2-3 spice-client rpm with the patch (emailed to me by marc-andre) and tried to reproduce with same steps. 

I was not able to reproduce. 

Thanks,
- Swapna

Comment 23 David Jaša 2011-09-23 13:08:53 UTC
The spice-client-0.8.2-6.el6.x86_64 in RHEL doesn't seem to really fix this issue: after a resolution change, not just the "old" client, but all windows hang for some 10 seconds.

Comment 24 David Jaša 2011-09-23 13:57:09 UTC
Setting back to NEW after consulting with Paul.

Comment 25 Paul Vine 2011-09-23 15:28:42 UTC
After conversation with dnb we agree that original problem has been fixed. A new bug will be opened to cover current behaviour.

Comment 26 Uri Lublin 2011-11-30 13:42:41 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    Upon resolution change of Linux client machine, XRR is sending spicec spurious ScreenChangeNotify calls in a loop. For each such call, spicec creates a new window object and configures it.

Consequence
    Xorg proccess cpu consumption grew up to 100%

Fix
    spicec reuses a single Window object.

Result
   When a client machine changes resolution, Xorg process does not consume 100% cpu.

Comment 27 errata-xmlrpc 2011-12-06 15:22:13 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.

http://rhn.redhat.com/errata/RHBA-2011-1518.html