Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Laurent Carlier (lordheavy)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

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

Closed by  Andreas Radke (AndyRTR)
Sunday, 03 June 2018, 11:55 GMT
Reason for closing:  Fixed
Comment by Aleksei Nosachev (nos1609) - Thursday, 24 May 2018, 10:43 GMT
Same behaviour described in that thread
https://bugzilla.redhat.com/show_bug.cgi?id=1579067
Comment by kinodont (kinodont) - Thursday, 24 May 2018, 17:21 GMT
As you can see from the attached backtrace, WriteToClient has 'count' equal to -4.
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.
Comment by Aleksei Nosachev (nos1609) - Friday, 25 May 2018, 21:41 GMT
As mentioned in the similar thread, can confirm that this patchset perfectly does the job
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
Comment by Laurent Carlier (lordheavy) - Saturday, 02 June 2018, 07:11 GMT
Is it fixed with xorg-server-1.20.0-5 ?
Comment by Aleksei Nosachev (nos1609) - Saturday, 02 June 2018, 08:58 GMT
yep

Loading...