Bug 108005 - calling compScreenUpdate() from a block handler breaks other extensions (VNC)
Summary: calling compScreenUpdate() from a block handler breaks other extensions (VNC)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/Composite (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-09-20 14:31 UTC by Pierre Ossman
Modified: 2018-10-05 19:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch to use WorkQueue instead of BlockHandler (2.54 KB, patch)
2018-09-20 14:31 UTC, Pierre Ossman
no flags Details | Splinter Review
patch to use WorkQueue instead of BlockHandler (2.55 KB, patch)
2018-09-20 14:33 UTC, Pierre Ossman
no flags Details | Splinter Review

Description Pierre Ossman 2018-09-20 14:31:23 UTC
Created attachment 141659 [details] [review]
patch to use WorkQueue instead of BlockHandler

So Composite currently (ab)uses the BlockHandler mechanism to do automatic updates whenever the backing copy of a window has been damaged.

This is a bad idea because it prevents other extensions from reacting to those draw operations properly, because their BlockHandler might have executed before Composite.

This can be seen in real world scenarios. xfce4-terminal creates windows that get automatically composited. When such a window updates VNC fails to send those update to the VNC client because it runs before Composite.

Attached is a patch that changes Composite to use the WorkQueue instead.
Comment 1 Pierre Ossman 2018-09-20 14:33:22 UTC
Created attachment 141660 [details] [review]
patch to use WorkQueue instead of BlockHandler
Comment 2 Alan Coopersmith 2018-09-28 20:16:11 UTC
Thanks for the patch, but we're handling patch submissions in gitlab now,
via merge requests to https://gitlab.freedesktop.org/xorg/xserver/ .
(We've moved bug tracking to gitlab as well for most X.Org projects, but are
 still working on it for the Xserver itself.)
Comment 3 Pierre Ossman 2018-10-03 08:32:13 UTC
Added here:

https://gitlab.freedesktop.org/xorg/xserver/merge_requests/34
Comment 4 Adam Jackson 2018-10-05 19:03:44 UTC
commit 1bd5d0a53c5ff4169c5a6704c1c4b276f998b938
Author: Pierre Ossman <ossman@cendio.se>
Date:   Wed Oct 3 10:28:52 2018 +0200

    Switch automatic composite update to WorkQueue
    
    It is currently (ab)using the screen BlockHandler callback to do
    this. But this can cause problems with other extension as their
    block handlers might have executed before Composite's. And the
    operations Composite does might result in them wanting to change
    timeouts.
    
    Practically this caused problems for TigerVNC's VNC extension which
    failed to send out updates for Composite's screen updates.


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.