gnome-shell crashed with SIGSEGV in meta_logical_monitor_get_scale()

Bug #1724557 reported by ryzko on 2017-10-18
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Fix Released
gnome-shell (Ubuntu)
Marco Trevisan (Treviño)
Nominated 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
 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
 meta_logical_monitor_get_scale () from /usr/lib/x86_64-linux-gnu/
 meta_window_wayland_get_geometry_scale () from /usr/lib/x86_64-linux-gnu/
 meta_surface_actor_wayland_get_scale () from /usr/lib/x86_64-linux-gnu/
 meta_surface_actor_wayland_sync_state () from /usr/lib/x86_64-linux-gnu/
 ?? () from /usr/lib/x86_64-linux-gnu/
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

ryzko (ryzko) wrote :

 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

Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private → Public
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.

Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
ryzko (ryzko) wrote :

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

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
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.

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.

Jimmy Utterström (jimutt) wrote :

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

pullasuti (pullasuti) wrote :

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

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[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.

Daniel van Vugt (vanvugt) wrote :

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

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
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.

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.

Once we will sync with the upcoming gnome 3.26.3.

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

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.

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 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
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.

Jimmy Utterström (jimutt) wrote :

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

ryzko (ryzko) wrote :

Status is Fix Committed, i don't know if fix is already available in Ubuntu. But crash still persist.
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.

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.

ryzko (ryzko) wrote :

Ok.Thank you for information.

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.

Daniel van Vugt (vanvugt) wrote :

Brian, firstly please check for updates because current versions of Ubuntu are on 3.26.2 already:

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:

wdoekes (walter+ubuntu) wrote :

In my case, applying just [3] wasn't enough.

I also had to apply [6] to fix [5]:
[5] (possibly?)
--- 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:

The only added patch is:

Walter Doekes


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

wdoekes (walter+ubuntu) wrote :

@3v1n0: I suspect that this changeset -- which should be in 3.26.3 -- does the same:

tags: added: fixed-in-3.26.3
Dave Chiluk (chiluk) on 2018-02-22
tags: added: indeed
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/, 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,
    - 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
wdoekes (walter+ubuntu) 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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