maintainer-approval requested: [Bug 265409] www/firefox 103.0: tabs crash when using WebGL : [Attachment 235462] v1 ("git am)"

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 25 Jul 2022 00:40:55 UTC
Evgeniy Khramtsov <evgeniy@khramtsov.org> has asked freebsd-gecko (Nobody)
<gecko@FreeBSD.org> for maintainer-approval:
Bug 265409: www/firefox 103.0: tabs crash when using WebGL
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265409

Attachment 235462: v1 ("git am)"
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=235462&action=edit



--- Comment #4 from Evgeniy Khramtsov <evgeniy@khramtsov.org> ---
Created attachment 235462
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=235462&action=edit
v1 ("git am)"

Upstream change [1][2] landed in Firefox 103:
"Bug 1776563 - Remove nsDMABufDevice::IsDMABufEnabled(), r=stransky"
caused WebGL pages (e.g. maps.google.com) to crash, as parent proccess
fails to initialize [3] dmabuf and 1776563 removed bool that prevented crash.

Backport upstream change [4][5] landed for Firefox 104:
"Bug 1779425 - Check for GbmDevice before using it, r=stransky,jgilbert"
to fix the crash by adding a check to fail cleanly instead:

[3] $ MOZ_LOG="Dmabuf:5" firefox
[Parent 39647: Main Thread]: D/Dmabuf wl_drm is available.
[Parent 39647: Main Thread]: D/Dmabuf zwp_linux_dmabuf_v1 is available.
[Parent 39647: Main Thread]: D/Dmabuf Using DRM device /dev/dri/renderD128
[Parent 39647: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Parent 39647: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1
...
[Parent 39647: Main Thread]: D/Dmabuf DMABuf is enabled
[...]
[Child 39675: Main Thread]: D/Dmabuf Using DRM device /dev/dri/renderD128
[Child 39675: Main Thread]: D/Dmabuf DMABufSurfaceRGBA::Create() UID 1 size 1 x
1
[Child 39675: Main Thread]: D/Dmabuf	 Missing GbmDevice!
[Child 39675: Main Thread]: D/Dmabuf DMABufSurfaceRGBA::ReleaseTextures() UID 1
[Child 39675: Main Thread]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 1
[Child 39675: Main Thread]: D/Dmabuf SurfaceFactory_DMABUF::CanCreateSurface()
failed to create surface.
[Child 39675: Main Thread]: D/Dmabuf SurfaceFactory_DMABUF::Create() failed,
fallback to SW buffers.
[...]

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1776563
[2]:
https://hg.mozilla.org/mozilla-central/rev/b66edd978d47d4f3c513c23edac2f65a83e7
8300

[3]:
https://hg.mozilla.org/releases/mozilla-release/file/0c479fee3a5092bea2bfdb32cf
dcc66039544c3e/gfx/thebes/gfxPlatformGtk.cpp#l112

[4]: https://bugzilla.mozilla.org/show_bug.cgi?id=1779425
[5]: https://hg.mozilla.org/mozilla-central/rev/c29ee933bf30

---

May I ask someone to test? I tested in 13.1/amd64 jail on top of
ports 9bf7bc98d with lang/rust reverted to 1.62 and with LTO=off
to fetch binary packages with poudriere and to test faster.