gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution → calculate_scale → meta_monitor_calculate_mode_scale → calculate_monitor_scale → derive_calculated_global_scale

Bug #1723615 reported by Rachel Greenham
52
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Fix Released
Undecided
Unassigned
mutter (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)
Bionic
Fix Released
Undecided
Marco Trevisan (Treviño)

Bug Description

https://gitlab.gnome.org/GNOME/mutter/issues/130
https://errors.ubuntu.com/problem/84e05b052e88b79520a684d6113084e9be8bc339

---

[ Description ]

This happened while I was away from the computer. By the timing it should have been well after the time it should have gone *into* displaysleep, and was also about 45min before I returned, so certainly wasn't the wake-up process either.

What I observed when I did return: My 4K monitor didn't wake up (that's a known problem with this monitor, Dell P2715Q), the second monitor (Dell U2711) did wake up, showing the login screen.

So although I've considered my Dell 4K problem a problem with waking up, I wonder if it might be actually a problem with it apparently going away completely after a longer displaysleep (it's usually fine if I just do a short sleep of a minute or two).

Another possibility is the cat stepped on the keyboard and thus triggered an attempted display-wake. But that would actually be out of character (for the cat).

Either way is a bug because the session should survive monitor shenanigans... :-)

In some not known conditions, g-s might crash while computing global resolution for monitors.

[ Test case ]

There's really no test case for this bug, a part that g-s should not crash with this stacktrace. Unforuntaltey this is quite hard to reproduce, it might happen while resetting the crtc when setting up a (new) monitor or at wake up, but so far nobody has reported a way for reproducing this.

[ Regression potential ]

Global scale for attached monitors could not be properly computed, and thus if attaching an HiDPI device, the UI could not be scaled properly

---

ProblemType: CrashDistroRelease: 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
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME-Greeter:GNOME
Date: Sat Oct 14 15:39:50 2017
DisplayManager: gdm3
ExecutablePath: /usr/bin/gnome-shell
GsettingsChanges:

InstallationDate: Installed on 2017-07-30 (75 days ago)
InstallationMedia: Ubuntu-GNOME 17.04 "Zesty Zapus" - Release amd64 (20170412)
ProcCmdline: /usr/bin/gnome-shell
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/false
SegvAnalysis:
 Segfault happened at: 0x7fae20ab44a0 <meta_monitor_mode_get_resolution>: mov 0x8(%rdi),%eax
 PC (0x7fae20ab44a0) ok
 source "0x8(%rdi)" (0x00000008) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11SourcePackage: gnome-shell
StacktraceTop:
 meta_monitor_mode_get_resolution () at /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_monitor_calculate_mode_scale () at /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_monitor_manager_update_logical_state_derived () at /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_monitor_manager_rebuild_derived () at /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
 meta_monitor_manager_xrandr_handle_xevent () at /usr/lib/x86_64-linux-gnu/libmutter-1.so.0
Title: gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution()
UpgradeStatus: Upgraded to artful on 2017-08-22 (53 days ago)
UserGroups:

Related branches

Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 meta_monitor_mode_get_resolution (monitor_mode=monitor_mode@entry=0x0, width=width@entry=0x7ffceb5a36f8, height=height@entry=0x7ffceb5a36fc) at backends/meta-monitor.c:1582
 calculate_scale (monitor_mode=0x0, monitor=0x55d2cc3cb100) at backends/meta-monitor.c:1377
 meta_monitor_calculate_mode_scale (monitor=0x55d2cc3cb100, monitor_mode=0x0) at backends/meta-monitor.c:1439
 calculate_monitor_scale (monitor=0x55d2cc3cb100, manager=0x7fadfc014ae0) at backends/meta-monitor-manager.c:174
 derive_calculated_global_scale (manager=0x7fadfc014ae0) at backends/meta-monitor-manager.c:188

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
Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote : Re: gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution()

bug #1723620 is actually the original error that killed my session. I belatedly noticed that *this* one, that was popped up for me next time I logged in, was the error that occurred in gdm's gnome-shell about 18 minutes later. Both still occurred while I was away from the computer.

information type: Private → Public
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
Steven Harms (sharms) wrote :

Of interest - this happens to me, also on a 4k screen using DisplayPort 1.2

Revision history for this message
Steven Harms (sharms) wrote :

There was a Nvidia driver released today 384.94: https://devtalk.nvidia.com/default/topic/1025953/b/t/post/5217907/#5217907

In the notes they mention:
* Fixed a bug that could cause OpenGL applications to crash after a prolonged DPMS sleep state on a monitor driven with PRIME Sync.

Can you upgrade to this version and see if that resolves the issue?

Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

In fact I'm already on 387.22 which, I see from a nearby post on the same forum, has the same fix: https://devtalk.nvidia.com/default/topic/1025794/unix-graphics-announcements-and-news/linux-solaris-and-freebsd-driver-387-22/

It hasn't helped.

TBH I don't think it applies as (fx: me reading up more on what PRIME sync is) I don't think I'm using PRIME sync... my mobo has integrated Intel HD4600 as well but I don't use it at all, and the nvidia card is selected as default in uefi bios. I've done no prime sync setup at all.

There appear to be a shedload of upstream gnome-shell bugs relating to these problems, and not everyone having them is using nVidia, though it may be that they are all using DisplayPort to connect to their monitors, although why something as user-level as gnome-shell is bothered with *which* ports are used is beyond me...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This is now fixed as per https://gitlab.gnome.org/GNOME/mutter/commit/1b439c42d1b0d9d53abe6b9052f26d3b355b57d4 that I've already cherry-picked on mutter 3.28 branch, so it will be added on next point-release.

Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Jeremy Bicha (jbicha)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixed in mutter 3.29.1 and 3.28.2

tags: added: fixed-in-3.28.2 fixed-in-3.29.1
tags: added: bionic
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

mutter (3.28.2-2) unstable; urgency=medium

  * Team upload
  * d/p/frames-Handle-touch-events.patch,
    d/p/frames-Make-1st-button-motion-handlers-take-generic-event.patch:
    Drop cherry-picked patches that caused a regression (Closes: #899181)

 -- Simon McVittie <email address hidden> Sun, 20 May 2018 15:21:35 +0100

Changed in gnome-shell (Ubuntu):
assignee: Jeremy Bicha (jbicha) → nobody
status: In Progress → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
Fix released in 18.10 only right now. Not 18.04.

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

The fix for this is in proposed and included in https://launchpad.net/ubuntu/+source/mutter/3.28.2-2~ubuntu18.04.1

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

It looks like we're still seeing some crash for this, I've doing some more debugging at https://gitlab.gnome.org/GNOME/mutter/issues/130#note_278690

Changed in mutter (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.28.3-2

---------------
mutter (3.28.3-2) unstable; urgency=medium

  * Team upload

  [ Iain Lane ]
  * debian/gbp.conf: Set the upstream branch to upstream/3.28.x, since we've
    branched for experimental now.

  [ Marco Trevisan (Treviño) ]
  * d/p/native-gpu-Handle-drmModeSetCrtc-failing-gracefully.patch:
    - Avoid crashing when warning about wrongly set crtc mode
      (LP: #1754949)
  * d/p/gpu-kms-Don-t-crash-if-drmModeGetResources-returns-N.patch:
    - Don't crash if drmModeGetResources returns NULL (LP: #1767956)
  * d/p/window-wayland-Always-update-monitor-for-non-user-ops.patch:
    - Always update monitor in wayland, avoiding crash (LP: #1784398)
  * d/p/monitor-manager-Filter-out-low-screen-resolutions.patch:
    - Don't return screen resolutions that can't be applied (LP: #1772831)
  * d/p/window-Don-t-refuse-to-move-focus-to-the-grab-window.patch,
    d/p/window-Explicitly-exclude-unmanaging-window-from-focus-ag.patch:
    - Don't crash if a modal dialog closes while being dragged
      (LP: #1422253)
  * d/p/monitor-Use-current-monitor-mode-to-check-whether-active.patch:
    - Don't try to use an invalid monitor mode to figure out scaling
      (LP: #1723615)

  [ Simon McVittie ]
  * Sort patch series in upstream order, with patches applied upstream
    first
  * d/copyright: Remove obsolete FSF postal addresses
  * Standards-Version: 4.1.5 (no changes required)
  * Set Rules-Requires-Root to no
  * Update symbols file

 -- Simon McVittie <email address hidden> Tue, 31 Jul 2018 15:35:03 +0100

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
description: updated
Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

FWIW I can't reproduce this any more either; since 18.04 in fact I've had no problems with gnome-shell crashing. The monitor very nearly always does wake up when it's supposed to now (some difference in the dpms signal being sent? Previously it would always wake for windows and just had a hard time with Linux), and on the few occasions it hasn't, I haven't lost my session and I just needed to powercycle the monitor properly. So I was under the impression this was all fixed. :-) Possibly by not-obviously-related changes elsewhere.

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

Thanks for the feedback Rachel,

Although we still got some automatic reports about this happening, so a proper fix for this is included in mutter 3.29.90-1

Changed in mutter (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: New → In Progress
Changed in gnome-shell (Ubuntu):
status: New → Fix Released
no longer affects: gnome-shell (Ubuntu Bionic)
Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

Sure, just thought I'd better say something as it was my report originally. :-)

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Rachel, or anyone else affected,

Accepted mutter into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.28.3-2~ubuntu18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in mutter (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Re: gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution()

I don't get any mentioned regression with mutter 3.28.3-2~ubuntu18.04.1, while no more reports for this crash are present for such version in e.u.c, thus I mark this as verified.

tags: added: done needed verification-done-bionic
removed: verification-needed verification-needed-bionic
summary: - gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution()
+ gnome-shell crashed with SIGSEGV in meta_monitor_mode_get_resolution →
+ calculate_scale → meta_monitor_calculate_mode_scale →
+ calculate_monitor_scale → derive_calculated_global_scale
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.28.3-2~ubuntu18.04.1

---------------
mutter (3.28.3-2~ubuntu18.04.1) bionic; urgency=medium

  * No-change backport from unstable to bionic

mutter (3.28.3-2) unstable; urgency=medium

  * Team upload

  [ Iain Lane ]
  * debian/gbp.conf: Set the upstream branch to upstream/3.28.x, since we've
    branched for experimental now.

  [ Marco Trevisan (Treviño) ]
  * d/p/native-gpu-Handle-drmModeSetCrtc-failing-gracefully.patch:
    - Avoid crashing when warning about wrongly set crtc mode
      (LP: #1754949)
  * d/p/gpu-kms-Don-t-crash-if-drmModeGetResources-returns-N.patch:
    - Don't crash if drmModeGetResources returns NULL (LP: #1767956)
  * d/p/window-wayland-Always-update-monitor-for-non-user-ops.patch:
    - Always update monitor in wayland, avoiding crash (LP: #1784398)
  * d/p/monitor-manager-Filter-out-low-screen-resolutions.patch:
    - Don't return screen resolutions that can't be applied (LP: #1772831)
  * d/p/window-Don-t-refuse-to-move-focus-to-the-grab-window.patch,
    d/p/window-Explicitly-exclude-unmanaging-window-from-focus-ag.patch:
    - Don't crash if a modal dialog closes while being dragged
      (LP: #1422253)
  * d/p/monitor-Use-current-monitor-mode-to-check-whether-active.patch:
    - Don't try to use an invalid monitor mode to figure out scaling
      (LP: #1723615)

  [ Simon McVittie ]
  * Sort patch series in upstream order, with patches applied upstream
    first
  * d/copyright: Remove obsolete FSF postal addresses
  * Standards-Version: 4.1.5 (no changes required)
  * Set Rules-Requires-Root to no
  * Update symbols file

mutter (3.28.3-1~ubuntu18.04.1) bionic; urgency=medium

  * No-change backport to bionic (LP: #1783311)

mutter (3.28.3-1) unstable; urgency=medium

  * New upstream release
  * d/p/backends-Add-logical-monitor-monitor-output-crtc-ref-chai.patch,
    d/p/backends-Move-MetaOutput-crtc-field-into-private-struct.patch,
    d/p/clutter-device-evdev-Get-devices-from-main-seat-if-no-rea.patch,
    d/p/clutter-evdev-Don-t-ignore-CAPS-lock-as-modifier.patch,
    d/p/clutter-evdev-ignore-injected-events-from-IM.patch,
    d/p/clutter-seat-evdev-Add-function-to-get-device-by-id.patch,
    d/p/device-manager-evdev-Add-main-seat-to-seats-by-default.patch,
    d/p/device-manager-evdev-Free-the-main-seat-on-finalize.patch,
    d/p/device-manager-evdev-Set-and-unset-the-stage-for-the-main.patch,
    d/p/frames-Allow-for-unknown-mouse-buttons.patch,
    d/p/frames-Handle-touch-events.patch,
    d/p/frames-Make-1st-button-motion-handlers-take-generic-event.patch,
    d/p/renderer-native-Don-t-crash-if-the-FB-surface-can-t-be-lo.patch,
    d/p/wayland-Compare-geometries-after-chaining-up.patch,
    d/p/wayland-Don-t-reset-input-focus-on-text-commit.patch,
    d/p/wayland-Use-cursor-position-in-logical-monitor.patch,
    d/p/wayland-update-enter-leave-output-after-effects.patch,
    d/p/window-actor-add-new-signal-effects-completed.patch:
    Remove patches already applied on 3.28 branch

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 03 Aug 2018 05:20:10 +0100

Changed in mutter (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for mutter has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.