gnome-shell crashed with SIGSEGV in meta_logical_monitor_get_scale()

Bug #1724557 reported by ryzko
138
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Medium
gnome-shell (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)
Declined for Artful by Daniel van Vugt

Bug Description

Hi all,
Originally I was reporting bug 1717170, about session crash after monitor disconnect/switch-off/input change on desktop PC and the bug was fixed according to bug tracker. But now, after gnome-shell and mutter update, the crash goes worse. Now it is not just session kick-out but complete crash. Same events can be used to reproduce the crash. This time also crash files was created.

ProblemType: Crash
DistroRelease: Ubuntu 17.10
Package: gnome-shell 3.26.1-0ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Oct 18 13:52:07 2017
DisplayManager: gdm3
ExecutablePath: /usr/bin/gnome-shell
InstallationDate: Installed on 2017-09-11 (37 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170906)
ProcCmdline: /usr/bin/gnome-shell
SegvAnalysis:
 Segfault happened at: 0x7f475acbac30 <meta_logical_monitor_get_scale>: movss 0x38(%rdi),%xmm0
 PC (0x7f475acbac30) ok
 source "0x38(%rdi)" (0x00000038) not located in a known VMA region (needed readable region)!
 destination "%xmm0" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gnome-shell
StacktraceTop:
 meta_logical_monitor_get_scale () from /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_window_wayland_get_geometry_scale () from /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_surface_actor_wayland_get_scale () from /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_surface_actor_wayland_sync_state () from /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
Title: gnome-shell crashed with SIGSEGV in meta_logical_monitor_get_scale()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers

Revision history for this message
ryzko (ryzko) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 meta_logical_monitor_get_scale (logical_monitor=logical_monitor@entry=0x0) at backends/meta-logical-monitor.c:181
 get_window_geometry_scale_for_logical_monitor (logical_monitor=0x0) at wayland/meta-window-wayland.c:73
 meta_window_wayland_get_geometry_scale (window=window@entry=0x5585b3334990) at wayland/meta-window-wayland.c:637
 meta_surface_actor_wayland_get_scale (self=<optimized out>) at compositor/meta-surface-actor-wayland.c:104
 meta_surface_actor_wayland_sync_state (self=0x5585b4793920) at compositor/meta-surface-actor-wayland.c:193

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private → Public
Revision history for this message
pullasuti (pullasuti) wrote :

I believe I'm plagued by the same bug (also followed bug 1717170, and posted on bugzilla). However, now I don't get a full crash, but a session kick-out. This issue happens on two separate Intel NUC setups, both connected to a 4K TV with a displayport->hdmi2.0 -adapter (the other one from Club3D, the other a built in adapter in Intel Skull Canyon NUC.

But all in all, this is now forcing me to suspend my computers before switching off the displays, otherwise my entire desktop is lost. I can't understand how this is not more common, however.

An extremely annoying issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
ryzko (ryzko) wrote :

Hi, just adding part of syslog. Time stamps: 9:50 - monitor switch off, 10:22 - switch on.

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

pullasuti, do you have a *.crash file in /var/crash/ related to gnome-shell?

Please attach them mentioning here the versions of gnome-shell and libmutter you're using in your systems (mostly for recording them for later times).

Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
pullasuti (pullasuti) wrote :

On the Skull Canyon NUC I'm currently at the versions are: libmutter 3.26.1-2ubuntu1 and gnome-shell 3.26.1-0ubuntu4.

I have a _usr_bin_gnome-shell.1001.crash, but it's quite large even after compressing it. I'll see if launchpad will accept the file.

Revision history for this message
Jimmy Utterström (jimutt) wrote :

I'm experiencing the same issue every time I switch the screen off/on or when the screen has timed out and gone blank and I try to wake it up again. Gnome-shell crashes Attaching my crash file. The only solution to make my 17.10 experience manageable so far is to never turn off the screen or let it go blank.

Revision history for this message
Jimmy Utterström (jimutt) wrote :

I am by the way using the same versions of libmutter and gnome-shell as pullasuti.

Revision history for this message
pullasuti (pullasuti) wrote :

Versions updated to gnome-shell 3.26.1-0ubuntu5 and libmutter 3.26.1-2ubuntu2, no change

Revision history for this message
Brian Neltner (neltnerb) wrote :

I am not certain if my crash is the same as this bug, but this seems most likely the same issue that I see when I attempt to lock my session. Upon locking the session it immediately crashes gnome-shell. I am using an Intel NUC.

My dmesg reports:

gnome-shell[17362]: segfault at 38 ip 00007fe14c425c30 sp 00007ffc4f950868 error 4 in libmutter-1.so.0.0.0[7fe14c3d3000+141000]

I have attached the /var/crash file for more information, please let me know if I should look elsewhere for this bug as I am not 100% certain it is the same cause. It is currently using gnome-shell 3.26.1-0ubuntu4.

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

Brian, please use the 'ubuntu-bug' command to upload crash files. Each crash file should get its own bug.

Revision history for this message
ryzko (ryzko) wrote :

Hi Brian. well, good question if it is one or more bugs with similar symptoms. But Gnome shell session is crashing in my case on following events: Monitor switch off, after monitor input/source change, after KVM switch ("keyboard, video and mouse") input change and after session lock (automatic after timeout, manual by Super+L keys, manual from menu).
Some times it just kick me out from session. Sometimes it is full GUI crash.
I'm using PC with single monitor connected directly or through KVM switch.

Changed in mutter:
status: Confirmed → Fix Released
Revision history for this message
Brian Neltner (neltnerb) wrote :

This bug may still be impacting me, but since I'm not 100% sure if the cause is the same I am not sure. It seems to have gotten better in some but not all situations. I did reboot to apply the released fix so this is the most recent versions hopefully.

Perhaps useful to note that it doesn't crash until the monitor turns back on. I was able to test this because I play brown noise in a terminal with the monitor off but not locked overnight. In the morning sound is still playing, and I was able to Ctl-C without turning on the monitor to turn off the sound so it was still a responsive and logged in system until then. But then it crashed when I turned the monitor back on.

I've uploaded the crash logs for the different methods of failure a few times using ubuntu-bug. I'm not certain that the logs are showing up, nor sure how to check. When I run ubuntu-bug on the crash file it opens the dialog for reporting a bug, I click continue but then the dialog immediately exits with no further user interaction. Is this correct behavior? I seem to remember years ago that the dialog would open up a web browser to this site but it hasn't done that in ages for me. I'm assuming it's working transparently now but please let me know if they aren't showing up as reported bugs.

Revision history for this message
Echo Nolan (echonolan) wrote :

The GNOME people have merged a patch for this. When will a new Ubuntu package be released? Do they need to cut a release of Mutter? I'm not clear on the process.

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

Once we will sync with the upcoming gnome 3.26.3.

Or if there's much request we can backport it earlier (Jeremy?)

Revision history for this message
Echo Nolan (echonolan) wrote :

I built a version of libmutter with the patch in the linked GNOME bug applied, but then I get a different crash when turning off the monitor. That one is 1724439, in meta_window_get_monitor(). Switching my session from Wayland to Xorg fixes the problem. It might fix the original crash too, I didn't test that.

Revision history for this message
Brian Neltner (neltnerb) wrote :

I have still been experiencing crashes of the desktop whenever my monitor is turned back on. However, the /var/crash log is now reporting against Xwayland.

I submitted a new bug report https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1733893 against this crash log as I am not sure if it is the same cause. For me the last crash log for gnome-shell is from the 19th, but the crash behavior has remained (mostly) unchanged.

I say mostly because once in a while I am able to turn the monitor on without it crashing. I have no explanation for that, and haven't been able to pin down what set of conditions cause it to work.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Fix Released
Changed in gnome-shell (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Brian Neltner (neltnerb) wrote :

I still have the exact same symptoms after the fix was released, but no longer see crash logs. Any way to tell what is causing the crash? I assume it's related but don't know how to track it down.

Revision history for this message
Jimmy Utterström (jimutt) wrote :

For me it seems to have been resolved in gnome shell 3.26.2. :)

Revision history for this message
ryzko (ryzko) wrote :

Status is Fix Committed, i don't know if fix is already available in Ubuntu. But crash still persist.
gnome-shell:3.26.2-0ubuntu0.1
mutter:3.26.2-0ubuntu0.1
xwayland:2:1.19.5-0ubuntu2
Nowadays not only gnome-shell crash file is created on crash event but also xwayland. Something changed and I don't know if new report should be opened.

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

No, the fix isn't in Ubuntu yet.

It has been commited in the upstream repository, but it won't hit ubuntu until mutter 3.26.3 will be relased and released in Ubuntu.

Revision history for this message
ryzko (ryzko) wrote :

Ok.Thank you for information.

Revision history for this message
Brian Neltner (neltnerb) wrote :

It's been a month, is there a way to get the fixed release of mutter in Ubuntu 17.10? I'm fine with installing an experimental package for it or use a PPA. My mutter version is still 3.26.1.

Is this going to stay frozen until 18.04 is released? I'd really like to not spend the next three months having to leave my monitor on overnight to avoid crashes.

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

Brian, firstly please check for updates because current versions of Ubuntu are on 3.26.2 already: https://launchpad.net/ubuntu/+source/mutter

Secondly, yes we want to get 3.26.3 into Ubuntu ASAP. The problem is that 3.26.3 doesn't exist yet. You can see fixes accumulating in readiness for it though, here:
https://git.gnome.org/browse/mutter/log/?h=gnome-3-26

Revision history for this message
Walter (wdoekes) wrote :

In my case, applying just [3] wasn't enough.
[1] https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1724557
[2] https://bugzilla.gnome.org/show_bug.cgi?id=788764
[3] https://bug788764.bugzilla-attachments.gnome.org/attachment.cgi?id=361654

I also had to apply [6] to fix [5]:
[4] https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1726352
[5] https://bugzilla.gnome.org/show_bug.cgi?id=790207 (possibly?)
[6]
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -1973,6 +1973,9 @@ meta_window_move_resize_request (MetaWindow *window,
   gboolean in_grab_op;
   MetaMoveResizeFlags flags;

+ if (!window->monitor)
+ return;
+
   /* We ignore configure requests while the user is moving/resizing
    * the window, since these represent the app sucking and fighting
    * the user, most likely due to a bug in the app (e.g. pfaedit

I created builds for Artful here, which appear to work:
https://downloads.osso.nl/libmutter-3.26.2-ubuntu-artful/libmutter_3.26.2-0ubuntu0.1osso1/

The only added patch is:
https://downloads.osso.nl/libmutter-3.26.2-ubuntu-artful/libmutter_3.26.2-0ubuntu0.1osso1/handle_resizing_when_headless.patch

Cheers,
Walter Doekes
OSSO B.V.

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

@wdoekes

Can you also attach [6] to that bug, or better, propose a merge proposal on mutter gitlab for that?

Revision history for this message
Walter (wdoekes) wrote :

@3v1n0: I suspect that this changeset -- which should be in 3.26.3 -- does the same:
https://gitlab.gnome.org/GNOME/mutter/commit/71b4ef5940d16f7d3cb7dca5c224784315803492

tags: added: fixed-in-3.26.3
Dave Chiluk (chiluk)
tags: added: indeed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.27.91-0ubuntu1

---------------
gnome-shell (3.27.91-0ubuntu1) bionic; urgency=medium

  [ Didier Roche ]
  * New upstream version (LP: #1751070, LP: #1722725,
    LP: #1714989, LP: #1724557, LP: #1723857, LP: #1744970):
    - debian/patches/70_allow_sound_above_100.patch,
      debian/patches/ubuntu-lightdm-user-switching.patch patches
      refreshed for new release. Removed ': function()' syntax as
      upstreamed removed them in those context.
    - debian/patches/ubuntu_panel_center_date_workarea.patch removed as
      upstreamed now.
    - debian/control.in, debian/rules:
      bump deps, add sassc and libnm-dev which is now required.
      drop caribou dep, as the OSK is now built-in.
    - debian/rules:
      use now with renamed build options.
  * debian/ubuntu-session-mods/ubuntu.css, debian/rules:
    - adapt to new GNOME Shell theme including OSK.
    - color shift keys in orange in OSK and use differente svg.
  * debian/rules:
    - some duplication removal.
  * debian/patches/27-nm-libexec-path.patch,
    debian/patches/71_smarter_alt_tab.patch,
    debian/patches/fix-wayland-vbox-crash.patch,
    debian/patches/optional-hot-corner.patch,
    debian/patches/ubuntu_block_mode_extension_update.patch,
    debian/patches/ubuntu_gdm.patch,
    debian/patches/ubuntu_lock_on_suspend.patch:
    - unfuzzed
  * Cherry-pick git_ea0770ae22a6c34797db4343cf7d2f59bb8d68f6.patch:
    - upstream mutter API bump.
  * debian/gnome-shell-common.install, debian/rules:
    - the .css files aren't shipped anymore, so copy from the built version.

  [ Jeremy Bicha ]
  * Update NetworkManager dependencies

 -- Didier Roche <email address hidden> Fri, 02 Mar 2018 10:04:06 +0100

Changed in gnome-shell (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Walter (wdoekes) wrote :

For the record, now that I've moved from Artful 17.10 to Bionic 18.04, this bug is not affecting me anymore, but now bug #1724439 is.

Revision history for this message
WHK (yan-uniko-102) wrote :

Same problem on Ubuntu 20.04. SegvReason: reading NULL VMA. Only open nautilus and try mount a external luks disk.

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

WHK,

This bug is closed. Please open a new bug for 20.04 by running:

  ubuntu-bug gnome-shell

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.