FS#58705 - [mesa] 18.1.0 causes XWayland to hang when Firefox starts WebGL
Attached to Project:
Arch Linux
Opened by Jan Alexander Steffens (heftig) - Wednesday, 23 May 2018, 13:08 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 03 June 2018, 11:55 GMT
Opened by Jan Alexander Steffens (heftig) - Wednesday, 23 May 2018, 13:08 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 03 June 2018, 11:55 GMT
|
Details
1. Start weston --xwayland
Backend doesn't seem to matter; wayland, drm and x11 are all affected, so you can just nest weston in your existing desktop for easy testing. 2. Open the terminal and use it to start firefox http://webglsamples.org/ After a moment, XWayland hangs, consuming lots of CPU. Also affects XWayland started by GNOME Shell. Intel GPU. Reverting to mesa 18.0.4-1 fixes the issue. |
This task depends upon
https://bugzilla.redhat.com/show_bug.cgi?id=1579067
The argument 'count' is assigned from the expression 'num_fds * sizeof(CARD32)', and 'num_fds' comes form dri3_fds_from_pixmap, which returns -1.
WriteToClient with a count of -4 will loop indefinitely.
A simple change in Xorg fixed the freeze for me:
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index e34bebedb..79e3c8e2c 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -520,7 +520,7 @@ proc_dri3_buffers_from_pixmap(ClientPtr client)
}
num_fds = dri3_fds_from_pixmap(pixmap, fds, strides, offsets, &modifier);
- if (num_fds == 0)
+ if (num_fds <= 0)
return BadPixmap;
rep.nfd = num_fds;
Of course, I don't know whether this is the right thing to do, I only know that Firefox doesn't freeze anymore.
https://patchwork.freedesktop.org/series/43618/
Attached both patches and the modified PKGBUILD for https://aur.archlinux.org/packages/xorg-server-git/
Sorry, not so experienced yet to create some kind of pull request or smth here
xserver-2-2-glamor-Propagate-... (0.8 KiB)
PKGBUILD (9.5 KiB)