gnome-shell crashed with assertion failure "!xcb_xlib_threads_sequence_lost" [xcb_io.c:260]

Bug #1886059 reported by errors.ubuntu.com bug bridge
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Unknown
Unknown
gnome-shell (Ubuntu)
Invalid
Undecided
Daniel van Vugt
libx11 (Ubuntu)
Fix Released
High
Daniel van Vugt
Focal
Confirmed
High
Daniel van Vugt
mutter (Ubuntu)
Invalid
Undecided
Daniel van Vugt

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding gnome-shell. This problem was most recently seen with package version 3.36.3-1ubuntu2, the problem page at https://errors.ubuntu.com/problem/5d9a112e0c6aeddb3cf972203bede962f60d767d contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Similar errors:
https://errors.ubuntu.com/problem/14911e4a22eec995bc364278c0490d8bfea557dd
https://errors.ubuntu.com/problem/e3f9ab8232005403e935c6038edd99f13e609e01
https://errors.ubuntu.com/problem/9d421ecaba25357f5c3ef73f438313e40ac24e77
https://errors.ubuntu.com/problem/42cfd76250a81cca07f8c548ec27e245315b5e01

---

Anyone experiencing this crash reliably, please help us to find its root cause by editing your /etc/environment and adding a line:

  MUTTER_SYNC=1

and then reboot. Then next time a crash happens please tell us (here) the bug ID or error URL of the new crash.

Tags: focal
description: updated
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Seems similar to https://bugs.launchpad.net/mutter/+bug/1877075 that was supposed to be fixed, but not in all the cases, it seems.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
summary: - /usr/bin/gnome-shell:gnome-shell: ../../src/xcb_io.c:260:
- poll_for_event: F\303\266rs\303\244kran
- \342\200\235!xcb_xlib_threads_sequence_lost\342\200\235 falsk.
+ gnome-shell crashed with assertion failure
+ "!xcb_xlib_threads_sequence_lost" [xcb_io.c:260]
Changed in gnome-shell (Ubuntu):
status: Incomplete → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The stack trace is a little different. It will be interesting to see if we have anything like the same quantity of this crash as bug 1877075.

We should keep an eye on this to see if it is specific to some extension, or maybe to some specific graphics driver.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Not sure an extension can have a role here, as they can't do operations in other threads, being in JS.

But sure, so far we don't have enough data to identify the problem.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Download full text (13.9 KiB)

I've just got a similar crash when just clicking on a menu item, I've got some more complete stacktrace, but don't think is really helpful

#0 __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
        set =
            {__val = {0, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 15822592872050180864, 94249823962208, 94249845226528}}
        pid = <optimized out>
        tid = <optimized out>
#1 0x000055b83f47052a in ()
#2 0x00007f45908a3210 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#3 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set =
            {__val = {0, 139936754804816, 94252984795136, 94250118475456, 94250118475557, 94250118475456, 94250118475456, 94250118475568, 94250118475756, 94250118475456, 94250118475756, 0, 0, 0, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
#4 0x00007f4590882859 in __GI_abort () at abort.c:79
        save_stage = 1
        act =
          {__sigaction_handler = {sa_handler = 0x5, sa_sigaction = 0x5}, sa_mask = {__val = {112, 4, 48320015904, 0, 0, 139936755958789, 0, 21474836480, 140735042337344, 139936638613175, 139936638613175, 0, 15822592872050180864, 139936755958789, 139935137267712, 139936638613175}}, sa_flags = -1874503997, sa_restorer = 0x104}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#5 0x00007f4590882729 in __assert_fail_base
    (fmt=0x7f4589a2b6b7 <error: Cannot access memory at address 0x7f4589a2b6b7>, assertion=0x7f4590455858 "!xcb_xlib_threads_sequence_lost", file=0x7f45904556c3 "../../src/xcb_io.c", line=260, function=<optimized out>) at assert.c:92
        str = 0x55b850d16780 "\220ŻE\270U"
        total = 4096
#6 0x00007f4590893f36 in __GI___assert_fail
    (assertion=assertion@entry=0x7f4590455858 "!xcb_xlib_threads_sequence_lost", file=file@entry=0x7f45904556c3 "../../src/xcb_io.c", line=line@entry=260, function=function@entry=0x7f4590455b10 <__PRETTY_FUNCTION__.14999> "poll_for_event") at assert.c:101
#7 0x00007f45903e1493 in poll_for_event (dpy=dpy@entry=0x55b83fee4000, queued_only=queued_only@entry=0)
    at ../../src/xcb_io.c:260
        request = <optimized out>
        req = <optimized out>
        event = <optimized out>
        event_sequence = <optimized out>
        __PRETTY_FUNCTION__ = "poll_for_event"
#8 0x00007f45903e153d in poll_for_response (dpy=dpy@entry=0x55b83fee4000) at ../../src/xcb_io.c:278
        response = <optimized out>
        error = 0x55b83fee4000
        req = <optimized out>
        __PRETTY_FUNCTION__ = "poll_for_response"
#9 0x00007f45903e183a in _XEventsQueued (mode=<optimized out>, dpy=0x55b83fee4000)
    at ../../src/xcb_io.c:362
        response = <optimized out>
#10 _XEventsQueued (dpy=0x55b83fee4000, mode=<optimized out>) at ../../src/xcb_io.c:344
#11 0x00007f45903e482d in _XGetRequest
    (dpy=dpy@entry=0x55b83fee4000, type=type@entry=43 '+', len=len@entry=4) at ../../src/XlibInt.c:1764
        req = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x00007f45903dd62f in XSync (dpy=0x55b83fee4000, discard=discard@entry=0) at ../../src/Sync.c:43
        rep =
          {type = 48 '0', ...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes that stack looks the same as before.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Given that we've implemented the only known solution for this in bug 1877075, the remaining explanation for it might not be thread-related. Some kind of memory corruption (even single threaded) could have the same effect.

Revision history for this message
Dani (scrlk) wrote :

I don't know if this can help, but for me, the fail only happens after login and then I never see it again.

Revision history for this message
mattrosencrantz (matt-rosencrantz) wrote :

I just experienced this crash as well, but it was after being logged in for hours.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have an idea:

Anyone experiencing this crash reliably, please help us to find its root cause by editing your /etc/environment and adding a line:

  MUTTER_SYNC=1

and then reboot. Then next time a crash happens please tell us (here) the bug ID or error URL of the new crash.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Incomplete
Changed in mutter (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-shell (Ubuntu):
status: Incomplete → Expired
Changed in gnome-shell (Ubuntu):
status: Expired → Incomplete
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Started seeing this recently with 5.8.0-33 after a few minutes logged into either Wayland or X11 session, regardless of other activity on system, but does not repro once I downgrade kernel to 5.8.0-31.

Gnome shell version 3.36.4-1ubuntu1~20.04.2 has been the same throughout. Mutter likewise on 3.36.6-1ubuntu0.20.04.2 throughout. I did recompile mutter with pipewire support, no other changes, (https://launchpad.net/~lizthegrey/+archive/ubuntu/freedesktop/+sourcepub/11932034/+listing-archive-extra), it was working fine, but is now triggering this.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Never mind, I think mutter 3.36.6-1ubuntu0.20.04.2+lizf1 is busted, please disregard :)

on the plus side I have a reliable trigger.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

Reverted mutter to focal-updates stock, rebooted into 5.8.0-33, repro'd again :( so we're back to the hypothesis that there's something wrong in 5.8.0-33. Sorry for the noise, I'm trying to debug this as best as I can.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I doubt kernel 5.8.0-33 is the problem, because that was released in December but this bug has been reported since at least July.

If anyone can reproduce this bug at all then please follow the steps in comment #11.

Revision history for this message
Liz Fong-Jones (lizthegrey) wrote :

bug was hardware - bad usb port! hardware is hilarious.

description: updated
description: updated
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Bug 1924625 shows this crash happening on a machine with lots of extensions installed, which might explain why we've had trouble finding the cause.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^ also bug 1924606.

If anyone experiencing this crash can identify which extension(s) are causing it then that would help us a lot.

Revision history for this message
Eric Van Horn (evanhorn) wrote :

Before removing any extensions, I followed the instructions in #11. The bug report can be found here: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1924753.

Revision history for this message
Eric Van Horn (evanhorn) wrote :

In my original bug report (https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1924625) I was asked to remove many extensions; however, many of those extensions are ones that I installed at one time but have since removed and they do not appear under ~/.local/share/gnome-shell/extensions/.

From https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1924625/+attachment/5488541/+files/GsettingsChanges.txt it is clear that something is still reporting them as being installed. Does this indicate that there are remnants of these extensions somewhere else on my machine?

Revision history for this message
Eric Van Horn (evanhorn) wrote :

This issue appears to be resolved for me.

I used `apt purge gnome-shell-extensions` to remove gnome-shell-extensions and noticed that '<email address hidden>', '<email address hidden>', and 'desktop-icons@csoriano' remained in /usr/share/gnome-shell/extensions/. I manually removed these extensions, reinstalled gnome-shell-extensions, and rebooted my machine, and I have not had a crash since. Note that I did not remove any extensions from .local/share/gnome-shell/extensions, although there is still a discrepancy between the installed extensions and what is listed in `gsettings get org.gnome.shell enabled-extensions` and `gsettings get org.gnome.shell disabled-extensions`. Should this be corrected by just using `gsettings set`, or should this be updated automatically?

If there is any more information that I can provide to help troubleshoot this problem for others with this same problem, please let me know.

Thanks!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You don't need to remove '<email address hidden>', '<email address hidden>', and 'desktop-icons@csoriano' because those are the core Ubuntu extensions.

Also the set of 'enabled-extensions' does not have to correlate at all with the set of installed extensions. You can install an extension and have it disabled, although disabled extensions can still break things in some cases. That's probably not an issue here.

If you can identify a single extension (or extensions) that causes this crash then we would appreciate it.

Revision history for this message
Eric Van Horn (evanhorn) wrote :

I should probably clarify - I know that these three packages were part of the core extensions. However, I noticed that the timestamps for all of the core extensions were the same _except_ for those three. I reinstalled the gnome-shell-extensions package make sure they were correct, but those three extensions were not updated, or at least their timestamps did not change. I then purged the package and observed that those three extensions were still present, so I deleted them and reinstalled the gnome-shell-extensions package. I expected to see those three extensions restored, but they were not reinstalled.

As for the non-core extensions, I was planning to test them one at a time, but after taking the steps above I could not replicate the issue. Since that time I have not had any problems with gnome-shell crashing. If I could not repeat the issue with them installed, it seemed moot to removing the extensions one by one.

Revision history for this message
Kostas Vlachos (19-koster) wrote :

Hi, I'm experiencing the same issue #1924613 (https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1924613) and I have filed a report, although private. Should I make it public or you still have access to it?

Thank you

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The three core Ubuntu extensions do not come from the 'gnome-shell-extensions' package. They come from different packages. The extensions in 'gnome-shell-extensions' are supported by upstream GNOME, but not by Ubuntu.

And yes please do make bug 1924613 public because I can't see it.

Revision history for this message
Kostas Vlachos (19-koster) wrote :

Hi Daniel,

I made my bug report public (https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1924613). You can also read through the two update comments I've posted there.

Thanks,
Kostas

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Kostas. Next please follow the instructions in comment #11.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

One possible explanation for this bug: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/613

tags: removed: groovy
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The crash history supports the theory that this was:

  https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/34

because that fix appeared in libx11 1.7.0 during the hirsute development cycle. So usually at this point I would recommend trying that fix. However, despite being the top gnome-shell crasher on errors.ubuntu.com this bug page is so quiet that I'm not sure we have enough people engaged to be able to test any potential fix.

Changed in libx11 (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → Fix Released
Changed in gnome-shell (Ubuntu):
status: Incomplete → Invalid
Changed in mutter (Ubuntu):
status: Incomplete → Invalid
Changed in libx11 (Ubuntu Focal):
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → Confirmed
Changed in libx11 (Ubuntu):
importance: Undecided → High
Changed in libx11 (Ubuntu Focal):
importance: Undecided → High
no longer affects: gnome-shell (Ubuntu Focal)
no longer affects: mutter (Ubuntu Focal)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.