gnome-shell crashed with SIGSEGV in dri_flush_front_buffer() from intel_flush_front() from intel_glFlush()

Bug #1870270 reported by hn23 on 2020-04-02
44
This bug affects 4 people
Affects Status Importance Assigned to Milestone
mutter (CentOS)
Unknown
Unknown
mutter (Ubuntu)
Medium
Unassigned
Bionic
Medium
Daniel van Vugt
Eoan
Medium
Unassigned
Focal
Medium
Unassigned

Bug Description

[Impact]

gnome-shell crashes a lot on bionic:
https://errors.ubuntu.com/problem/3841a5bc586bc3f532d2313a35f51e511772751f
https://errors.ubuntu.com/problem/e69ad55ed4a995e0179d6e9b6be1f6a119efc906

[Test Case]

** Someone who can reproduce the crash please fill this in **

[Regression Potential]

Low. The same fix has been released to newer versions already for most of a year.

[Other Info]

gnome shell crashed / froze while switching keyboard layouts.

ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: gnome-shell 3.28.4-0ubuntu18.04.3
ProcVersionSignature: Ubuntu 5.3.0-45.37~18.04.1-generic 5.3.18
Uname: Linux 5.3.0-45-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.13
Architecture: amd64
CurrentDesktop: GNOME-Greeter:GNOME
Date: Tue Mar 31 22:47:45 2020
DisplayManager: gdm3
ExecutablePath: /usr/bin/gnome-shell
ExecutableTimestamp: 1571973788
InstallationDate: Installed on 2020-03-13 (19 days ago)
InstallationMedia: Ubuntu 18.04.4 LTS "Bionic Beaver" - Release amd64 (20200203.1)
ProcCmdline: /usr/bin/gnome-shell
ProcCwd: /var/lib/gdm3
SegvAnalysis:
 Segfault happened at: 0x7fedbfa22393: jmpq *%rax
 PC (0x7fedbfa22393) ok
 source "*%rax" (0xfffaffed90151620) not located in a known VMA region (needed readable region)!
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: gnome-shell
StacktraceTop:
 ?? () from /usr/lib/x86_64-linux-gnu/libgbm.so.1
 ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
 ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
 ?? () from /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
Title: gnome-shell crashed with SIGSEGV
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

hn23 (hn23) wrote :

StacktraceTop:
 dri_flush_front_buffer (driDrawable=0x55c07fd3fe40, data=<optimized out>) at ../src/gbm/backends/dri/gbm_dri.c:93
 intel_flush_front (ctx=ctx@entry=0x55c07fc62320) at ../src/mesa/drivers/dri/i965/brw_context.c:252
 intel_glFlush (ctx=0x55c07fc62320) at ../src/mesa/drivers/dri/i965/brw_context.c:297
 dri2_make_current (drv=0x55c07fa08000, disp=0x55c07fc5b300, dsurf=0x55c0804002b0, rsurf=0x55c0804002b0, ctx=<optimized out>) at ../src/egl/drivers/dri2/egl_dri2.c:1520
 eglMakeCurrent (dpy=0x55c07fc5b300, draw=0x55c0804002b0, read=0x55c0804002b0, ctx=0x55c07fc829b0) at ../src/egl/main/eglapi.c:884

Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
summary: - gnome-shell crashed with SIGSEGV
+ gnome-shell crashed with SIGSEGV in dri_flush_front_buffer() from
+ intel_flush_front() from intel_glFlush()
information type: Private → Public
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :
description: updated
tags: added: fixed-in-3.33.3 fixed-upstream
Changed in gnome-shell (Ubuntu Eoan):
status: New → Fix Released
Changed in gnome-shell (Ubuntu Focal):
status: Confirmed → Fix Released
Changed in gnome-shell (Ubuntu Eoan):
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → Medium
Daniel van Vugt (vanvugt) wrote :

Upstream fix that went into mutter 3.33.3:

https://gitlab.gnome.org/GNOME/mutter/-/commit/56ddaaa3809

tags: added: rls-bb-incoming
Daniel van Vugt (vanvugt) wrote :

This bug is the top gnome-shell crash in 18.04

Changed in gnome-shell (Ubuntu Bionic):
assignee: nobody → Daniel van Vugt (vanvugt)
tags: removed: rls-bb-incoming
Changed in gnome-shell (Ubuntu Bionic):
status: Triaged → In Progress
description: updated
Daniel van Vugt (vanvugt) wrote :

On second thoughts, the patch doesn't apply in bionic and the issue is way too deep and nasty to start trying to design a unique fix for bionic this week.

Changed in gnome-shell (Ubuntu Bionic):
status: In Progress → Triaged
hn23 (hn23) wrote :

May I ask, if this is indeed the 'top gnome-shell crash in 18.04' wouldn't it be good to backport the patch because its still a supported release? The machine is on the latest patch level for 18.04.

I don't mind too much because I probably upgrade to 20.04 soon. However, this bug (which only seems to affect one of my machines?) is quite an impediment when needing to switch keyboard layouts. During a normal work day there is a high chance of needing to do a hard reset to get back to normal.

Daniel van Vugt (vanvugt) wrote :

To avoid confusion I have also removed the syslog (Xorg log) from the top of the bug. This is a crash in the Wayland backend (the login screen for most people) and any messages from Xorg (Xwayland) are not related to the original problem.

description: updated
tags: added: wayland
Daniel van Vugt (vanvugt) wrote :

I'm also not sure switching keyboard layouts is related to the crash that this bug reports. Maybe we have two different bugs confused... The crash here looks more like it's related to Wayland display mode or monitor layout changes.

Daniel van Vugt (vanvugt) wrote :

hn23,

Can you please reproduce the crash and provide a fresh link to the crash report you get? I want to see if we land here or on some other bug. If you're not sure how to do that then some tips are here:

https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

Changed in gnome-shell (Ubuntu Bionic):
status: Triaged → Incomplete
tags: added: wayland-session
ENOTTY (enotty) wrote :

This may be related to this bug I filed on CentOS. https://bugs.centos.org/view.php?id=17275

I can reproduce my crash consistently.

Changed in mutter (Ubuntu Bionic):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mutter (Ubuntu Eoan):
status: New → Fix Released
Changed in mutter (Ubuntu Focal):
status: New → Fix Released
Changed in mutter (Ubuntu Bionic):
importance: Undecided → Medium
Changed in mutter (Ubuntu Eoan):
importance: Undecided → Medium
Changed in mutter (Ubuntu Focal):
importance: Undecided → Medium
no longer affects: gnome-shell (Ubuntu)
no longer affects: gnome-shell (Ubuntu Bionic)
no longer affects: gnome-shell (Ubuntu Eoan)
no longer affects: gnome-shell (Ubuntu Focal)
Changed in mutter (Ubuntu Bionic):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

I have been stress-testing bionic to try and reproduce this crash;

  * Changing keyboard layouts
  * Changing USB keyboards
  * Hotplugging monitors

and nothing I try is able to reproduce this crash or any crash. And I can't just backport the existing patch for this bug to bionic blindly because it doesn't merge (comment #10). It would need to be rewritten from scratch by someone who can also reproduce and verify the bug.

hn23: Please follow the instructions in comment #14. Hopefully that will help somewhat.

And if anyone else has any tips on how to reproduce what they think is this bug on Ubuntu 18.04 then please add a comment below.

Changed in mutter (Ubuntu Bionic):
status: Confirmed → Incomplete
Daniel van Vugt (vanvugt) wrote :

Maybe I can find it via valgrind like upstream did...

Changed in mutter (Ubuntu Bionic):
status: Incomplete → In Progress
Daniel van Vugt (vanvugt) wrote :

I still can't reproduce it even under valgrind. So what I've done is backported the upstream fix to 3.28, made sure it builds and runs and put it in a PPA for people to test:

https://launchpad.net/~vanvugt/+archive/ubuntu/lp1870270

Please wait a few hours for the build to be ready, and then install and test what's there.

Daniel van Vugt (vanvugt) wrote :

A test fix is now available for you to try. Please check it out:

https://launchpad.net/~vanvugt/+archive/ubuntu/lp1870270

hn23 (hn23) wrote :

@Daniel,
thank you for the work on this!

I will add the PPA you made and test it.
Recently I came to think that this issue might actually be due to a bad kernel module which I am running on my system (DiplayLink USD Docking station).
I installed the module on a second PC after which similar problems as in this book started.
I will get back to you once I get a change to verify the fixes from your PPA.

I don't know the flow so well on launchpad: is there some time window until this ticket should be closed?

Daniel van Vugt (vanvugt) wrote :

For Ubuntu 19.10 and 20.04 this bug is already fixed and closed.

For Ubuntu 18.04 this bug is open and will stay open until either:

  * Someone confirms the fix in comment #19 and then I release it properly; or

  * No one confirms the fix in comment #19 and (after a period of time) I would close the the bug without a fix.

Daniel van Vugt (vanvugt) wrote :

If you do experience any crashes please be sure to report them by following these instructions:

  https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

Because we need to be sure which crash, if any, you are experiencing.

Daniel van Vugt (vanvugt) wrote :

Please remember to test the above PPA (comment #19). Otherwise this bug will close without any fix to 18.04.

description: updated
Daniel van Vugt (vanvugt) wrote :

Closing the bionic task due to no response from anyone affected.

Changed in mutter (Ubuntu Bionic):
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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