Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832986 - x11-libs/libX11-1.7.3 causes crashing of www-client/firefox
Summary: x11-libs/libX11-1.7.3 causes crashing of www-client/firefox
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL: https://gitlab.freedesktop.org/xorg/l...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-09 12:07 UTC by Lukas Turek
Modified: 2022-03-30 21:02 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
revert.patch (0001-Revert-Fix-hanging-issue-in-_XReply.patch,1.44 KB, patch)
2022-02-09 20:40 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Turek 2022-02-09 12:07:18 UTC
After upgrade to x11-libs/libX11-1.7.3 Firefox 91.5.0 crashes several times a day with these messages:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
firefox: /var/tmp/portage/x11-libs/libX11-1.7.3/work/libX11-1.7.3/src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Exiting due to channel error.
Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=3.51337) Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=12.1242) Exiting due to channel error.
Exiting due to channel error.
Aborted

After downgrade to libX11-1.7.2 Firefox was stable for a whole day and counting. There weren't many changes between 1.7.2 and 1.7.3, I believe the bug was caused by this one:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/93a050c3ad2d2264d3880db3791387b1a9bf2e9e
Comment 1 Matt Turner gentoo-dev 2022-02-09 20:40:24 UTC
Created attachment 764717 [details, diff]
revert.patch

Ouch. Can you try putting this revert patch in /etc/portage/patches/x11-libs/libX11/ and rebuilding libX11-1.7.3?

That should allow us to confirm whether the commit you mention is at fault.
Comment 2 Joonas Niilola gentoo-dev 2022-02-10 06:09:21 UTC
I'm also running Firefox-91.5.0 and libX11-1.7.3, my Firefox has been on for days without issues. Not saying that ^ commit wouldn't have effect, but there might be more to this.
Comment 3 Lukas Turek 2022-02-10 12:54:36 UTC
I can confirm the patch fixed the problem, Firefox was stable for many hours. I then restarted KDE, built libX11 without the patch, restarted Firefox (so it was the only app running with unpatched libX11) and it crashed within a few minutes.

Unfortunately I don't have a reliable way to trigger the crash, it often happened when I pasted something into a form field, but mostly during regular web browsing, although always when I opened a new tab - never when I was just reading or watching something.

Firefox is built with USE="clang dbus eme-free hwaccel lto pgo system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-png system-webp wayland" and uses KDE portal (kde-plasma/xdg-desktop-portal-kde).
Comment 4 Matt Turner gentoo-dev 2022-02-10 22:06:59 UTC
Issue filed upstream.
Comment 5 Lucio Sauer 2022-02-11 15:05:26 UTC
(In reply to Lukas Turek from comment #3)
> Unfortunately I don't have a reliable way to trigger the crash
I found that opening new tabs and dragging them outwards to create "new" Firefox instances, is a relatively quick and reliable way to test, if the crashes persists. In my case, creating 1-6 additional instances triggered the behaviour.
The revert.patch fixed the issue for me.

Firefox was build with USE="lto openh264 pgo pulseaudio system-{av1, harfbuzz, icu, jpeg, libevent, libvpx, webp} hardened clang"
Comment 6 Lukas Turek 2022-02-14 23:20:09 UTC
This patch also fixes the problem, I had no crash for two work days:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/113
Comment 7 Joakim Tjernlund 2022-02-16 16:53:38 UTC
(In reply to Lukas Turek from comment #6)
> This patch also fixes the problem, I had no crash for two work days:
> https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/113

Nice, lets hope it gets into Gentoo soon.
Comment 8 Larry the Git Cow gentoo-dev 2022-03-30 21:02:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3d90c8a98363ebd13d172520a8cf11a5d0c078

commit 0d3d90c8a98363ebd13d172520a8cf11a5d0c078
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-03-30 20:59:20 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-03-30 21:02:19 +0000

    x11-libs/libX11: Version bump to 1.7.4
    
    Closes: https://bugs.gentoo.org/832986
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-libs/libX11/Manifest            |  1 +
 x11-libs/libX11/libX11-1.7.4.ebuild | 40 +++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)