Xwayland fatal error when Wayland output disappears

Michael Thayer michael.thayer at oracle.com
Fri Oct 27 07:54:39 UTC 2017


Hello Pekka,

On 27.10.2017 08:01, Pekka Paalanen wrote:
> On Thu, 26 Oct 2017 15:40:13 +0200 Michael Thayer
> <michael.thayer at oracle.com> wrote:
[ Discussion of a global Wayland object disappearing triggering a fatal
error in xwl_log_handler in Xwayland.]
> 
> there is a known race around Wayland globals. If the Wayland server 
> adds and removes a global in a very short time, it may succeed to 
> remove the global (wl_output) before all clients have processed the 
> add. If a client process an add after the server removed, you hit 
> exactly this fatal error.
> 
> It's a design flaw in Wayland, gone unnoticed for years until it was 
> too late to fix properly.
> 
> This issue is recorded: https://phabricator.freedesktop.org/T7722
> 
> There is a suggested mitigation, but I am not aware of anyone
> working on it.

Trigger warning: a person who does not know the code base is about to 
make suggestions.

I am wondering why Xwayland has to call FatalError in that log handler. 
 From my naive point of view, the race you mentioned is not a design 
flaw in Wayland but part of the real world that Wayland and its clients 
ought to deal with.  Other than that call in the log handler, I see no 
reason why Xwayland should not just notice that the object has gone away 
again and get on with life.

As I said, I do not know the code base well.  But for the sake of the 
argument, and since it is not likely to make things worse, I will try 
removing that locally and see what happens.

Regards and thanks.
Michael
-- 
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher


More information about the xorg-devel mailing list