VOOZH about

URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1743551

⇱ 1743551 - [xcb] Unknown sequence number while processing queue


Closed Bug 1743551 Opened 4 years ago Closed 3 years ago

[xcb] Unknown sequence number while processing queue

[xcb] Unknown sequence number while processing queue
Core
Graphics
unspecified
Unspecified
Linux
defect
Points:
---
RESOLVED WORKSFORME
RESOLVED
WORKSFORME
Iteration:
---
a11y-review
Accessibility Severity
Performance Impact
Size Estimate
Webcompat Priority
Webcompat Score
Tracking Status
relnote-firefox
thunderbird_esr115
thunderbird_esr140
firefox-esr115
firefox-esr140
firefox-esr153
firefox152
firefox153
firefox154
---
QA Whiteboard:
---
Has STR:
---
Change Request:
---
Bug Flags:
This bug is publicly visible.

 

We are seeing frequent triggering of an assert inside libX11 in xcb_io.c, such as:

[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: ../../src/xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

This appears to be a race condition when libX11 gets used from multiple threads, regardless if XLockDisplay is called. More details about how the actual race here: https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/34

According to the release announcement for 1.7.0, it appears that fix was merged for release in that 1.7.0: https://lists.x.org/archives/xorg-announce/2020-November/003065.html

Seems like Ubuntu 20 and below are still using an older version of libX11 (1.6.9) which does not have this fix. So we will still see this crash on CI, because we are only using Ubuntu 18.04 there.

The main user of libX11 is GDK/GTK, which is where we tend to see the crashing thread from the assert. If you look in the other threads at time of crash you will usually see something calling into libxcb. Other threads that use libxcb/libX11 that get us into trouble include: WebRender sometimes making GLX requests from inside Mesa, RenderCompositorSWGL using XCB, GtkVsyncSource using GLX calls, etc.

I am not as of yet sure there is a great fix for this issue other than encouraging users to upgrade to libX11 1.7.0 or later, or try Wayland. Incidence of crashes still seems low enough that maybe this is not that bad.

Perhaps just dupe this to bug 1607713, and wait for the fix to be distributed.
A workaround seems difficult.

Blocks: 1607713

Seems as if Debian stable is already at >= 1.7, as well as Fedora.
Ubuntu looks like they're in the process of backporting a race fix for affected distros:

Ubuntu 18: https://launchpad.net/ubuntu/+source/libx11/2:1.6.4-3ubuntu0.5
Ubuntu 20: https://launchpad.net/ubuntu/+source/libx11/2:1.6.9-2ubuntu1.3

Updated

4 years ago
See Also: → 1744060

Updated

4 years ago
See Also: → 1745805
Comment hidden (Intermittent Failures Robot)

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

Updated

3 years ago
See Also: → 1777849

Updated

3 years ago
See Also: → 1803592

Updated

3 years ago
See Also: 1803592

Updated

3 years ago
See Also: → 1801820

Updated

3 years ago
See Also: → 1836515

Updated

3 years ago
See Also: → 1836668
You need to log in before you can comment on or make changes to this bug.