gnome-shell crashes with SIGABRT: mutter:ERROR:backends/meta-monitor-manager.c:2274:meta_monitor_manager_get_logical_monitor_from_number: assertion failed: ((unsigned int) number < g_list_length (manager->logical_monitors))

Bug #1717170 reported by ryzko
92
This bug affects 18 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Medium
Mutter
Fix Released
Medium
gnome-shell (Ubuntu)
Fix Released
High
Unassigned
mutter (Ubuntu)
Fix Released
High
Unassigned

Bug Description

https://errors.ubuntu.com/problem/a9ace2e3301009e3a5344f8dac4e56fc4c23b1b8

---

I'm testing Ubuntu 17.10 installed on Lenovo PC (with Intel Core i5-6500 CPU and Intel HD Graphics 530 (skylake GT2). Session is crashing (login screen is displayed again) every time I change the monitor Input (e.g. from DP to HDMI) or switching off the monitor. It is happening since some updated from beginning of September were installed. Same situation is for both session types, default Wayland and also for X.org. Tested also with Live USB, same behaviour.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gnome-shell 3.25.91-0ubuntu4
ProcVersionSignature: Ubuntu 4.13.0-11.12-generic 4.13.1
Uname: Linux 4.13.0-11-generic x86_64
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Sep 14 07:28:54 2017
DisplayManager: gdm3
InstallationDate: Installed on 2017-09-11 (2 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170906)
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

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

Sounds like you might have hit bug 1714330 but we should go though the proper procedure in case you're experiencing a different problem...

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, your crash report is either missing or challenging to deal with as a ".crash" file. Please follow these instructions to have apport report a new bug about your crash that can be dealt with by the automatic retracer.

If you are running the Ubuntu Stable Release you might need to enable apport in /etc/default/apport and restart.

Now open your file manager, navigate to your /var/crash directory and open the crash report you wish to submit.
If this fails you will have to open a terminal and file your report with 'ubuntu-bug /var/crash/_my_crash_report.crash' where _my_crash_report.crash is the crash you would like to report. If you get an error that you aren't allowed to access this report you will have to file it with 'sudo ubuntu-bug /var/crash/_my_crash_report.crash'.

I'm closing this bug report since the process outlined above will automatically open a new bug report which can then dealt with more efficiently. Thanks in advance for your cooperation and understanding.

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

Apport is enabled in /etc/default/apport but no file is located /var/crash even after crash. I have created the bug report using ubuntu-bug tool.

Revision history for this message
ryzko (ryzko) wrote :

Please how to force .crash file creation?

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

Have a look in your /var/crash/

If there are none there already then I'm not sure why, other than dumping of core somehow failed, or less likely it's not "crashing" via any of the normal fatal signals.

Revision history for this message
ryzko (ryzko) wrote :

Hello. /var/crash/ is empty. I have attached part of Syslog starting at the time I switched off the monitor and a lot of errors were logged since that time. Please look at it, may be it can help also determine why crash file is not generated.

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

Thanks. Your log shows gnome-shell is crashing in libmutter:

Sep 13 14:08:10 internet-ws kernel: [11508.541040] gnome-shell[3056]: segfault at 2c ip 00007fd7c9d0cb24 sp 00007ffc4ffe2a28 error 4 in libmutter-1.so.0.0.0[7fd7c9c6f000+13f000]
Sep 13 14:08:10 internet-ws gnome-session[2964]: gnome-session-binary[2964]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11
Sep 13 14:08:10 internet-ws gnome-session-binary[2964]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 11

So it does sound like this might be bug 1714330. Please fully update your system and tell us if the problem persists.

Revision history for this message
ryzko (ryzko) wrote :

The system is up to date. Unfortunately the problem persist.
I'm Sorry, I have added old syslog file in previous post. Please find attached syslog from today morning, logs starting on the time of crash.

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

Aha!

Yes you were probably experiencing bug 1714330 in the old log of comment #6 but not any more.

In your new log of comment #8 you are now experiencing a new assertion:

Sep 18 07:25:39 internet-ws org.gnome.Shell.desktop[1891]: mutter:ERROR:backends/meta-monitor-manager.c:2274:meta_monitor_manager_get_logical_monitor_from_number: assertion failed: ((unsigned int) number < g_list_length (manager->logical_monitors))

... preceded by Javascript errors about the primary monitor.

Please try deleting this file in your home directory:

  ~/.config/monitors.xml

and then reboot.

Changed in gnome-shell (Ubuntu):
status: Incomplete → New
summary: - Gnome-shell session crash after monitor switch-off/input change.
+ gnome-shell crashes with SIGABRT: mutter:ERROR:backends/meta-monitor-
+ manager.c:2274:meta_monitor_manager_get_logical_monitor_from_number:
+ assertion failed: ((unsigned int) number < g_list_length
+ (manager->logical_monitors))
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
ryzko (ryzko) wrote :

hmm, no such file ~/.config/monitors.xml in my home directory

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

I mean "~" is your home directory, ".config" is a directory and "monitors.xml" is the file. :)

Regardless, your original description suggests the invalid config occurs dynamically. Not necessarily on disk.

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Found it. Gnome Developers are already aware of the crash:
https://bugzilla.gnome.org/show_bug.cgi?id=787637

If you would like to contribute to a speedy resolution then please comment on that page.

Changed in mutter (Ubuntu):
importance: Undecided → High
Revision history for this message
ryzko (ryzko) wrote :

Thank you, yes It seems that the bug report you found on Gnome Bugzilla is reporting the same type of crash.

Changed in mutter:
importance: Unknown → Critical
status: Unknown → Confirmed
Changed in mutter:
status: Confirmed → Fix Released
Revision history for this message
ryzko (ryzko) wrote :

Today the update of mutter to version 3.26.1-1 was installed on my PC by "apt upgrade" and the issue still persist. Please see attached syslog, cut from the time of crash (caused by monitor switch off).

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

may be the status of the bag should be changed from "Fix Released" to "Confirmed". Related GNOME bug #787637 is reopened.

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

We can't change upstream bug link statuses explicitly but removing the upstream task and recreating it will hopefully do the trick.

affects: mutter → chrome-gnome-shell
affects: chrome-gnome-shell → mutter
no longer affects: mutter
Changed in mutter:
importance: Unknown → Critical
status: Unknown → Confirmed
Revision history for this message
ryzko (ryzko) wrote :

It did.Thank you Daniel.

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

The crash itself is fixed by https://github.com/GNOME/mutter/commit/f044511037a51ae9c438addf3a8374f559916aae (part of fixing bug #1722811), so probably we can join the two bugs together for the ubuntu side.

The root cause of this is probably in a different spot though.
Maybe related to https://bugzilla.gnome.org/show_bug.cgi?id=788607

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Changed in mutter:
importance: Critical → Unknown
status: Confirmed → Unknown
Changed in mutter (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-shell (Ubuntu):
status: New → In Progress
Changed in mutter (Ubuntu):
status: Triaged → Fix Committed
Changed in gnome-shell (Ubuntu):
importance: Undecided → High
Changed in mutter (Ubuntu):
status: Fix Committed → In Progress
Jeremy Bícha (jbicha)
Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Jeremy Bícha (jbicha)
Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.26.1-0ubuntu3

---------------
gnome-shell (3.26.1-0ubuntu3) artful; urgency=medium

  * Cherry-pick git_layout-unset-when-headless.patch from gnome-3-26
    branch to fix crash bug (LP: #1717170)

 -- Jeremy Bicha <email address hidden> Fri, 13 Oct 2017 16:10:59 -0400

Changed in gnome-shell (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-shell:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in mutter:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

I had one crash after applying this yesterday (and rebooting): it crashed right out to the console, not even to the login screen, and when I tried logging in again the session failed to start. But since a second reboot it's apparently been fine. This bug went away, and so too has my bug #1720149 (so far anyway, I don't seem able to reproduce it now, although saying so will doubtless trigger it next time I let the displays sleep). I can't explain that first crash, but as I also can't repeat it, I guess we ignore it for now.

This in Gnome in Xorg under nVidia 387, modeset=0. xorg sessions seem unable to start with modeset=1 btw.

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

bug #1723615 came up with this fix in place. Whack-a-mole! :-)

Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :
Download full text (4.6 KiB)

Adding this to *this* bug, despite the "Fix Released", because it exactly matches the original post for this bug, whereas the others I've encountered and reported on are different:

Oct 14 20:02:45 fleetfoot gnome-shell[12750]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Oct 14 20:02:45 fleetfoot gnome-shell[12750]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Oct 14 20:02:45 fleetfoot kernel: [29646.218484] gnome-shell[12750]: segfault at 40 ip 00007f9354b11e60 sp 00007ffd0b949810 error 4 in libmutter-1.so.0.0.0[7f9354a6c000+141000]
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: JS WARNING: [resource:///org/gnome/shell/ui/main.js 315]: reference to undefined property "MetaStage"
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 221]: reference to undefined property "MetaWindowGroup"
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: JS WARNING: [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to undefined property "MetaDBusDisplayConfigSkeleton"
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: JS WARNING: [resource:///org/gnome/gjs/modules/tweener/tweener.js 540]: reference to undefined property "isSpecialProperty"
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: JS WARNING: [resource:///org/gnome/shell/ui/slider.js 38]: reference to undefined property "CallyActor"
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: Extension "<email address hidden>" had error: TypeError: this._monitor is undefined
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: loading user theme: /usr/share//themes/Arc-Dark/gnome-shell/gnome-shell.css
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: Some code accessed the property 'DBusMenu' on the module 'interfaces'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Oct 14 20:02:46 fleetfoot gnome-shell[25511]: Some code accessed the property 'WORKAROUND_RELOAD_TYPE_REGISTER' on the module 'util'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, ...

Read more...

Revision history for this message
ryzko (ryzko) wrote :

What I was originally reported is not fixed. It means, gnome-shell session crash when the monitor is disconnected/switch off or its input is changed.
Mutter and Gnome-Shell updated to:
mutter: 3.26.1-2ubuntu1
gnome-shell: 3.26.1-0ubuntu3

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

Ryzko,

Do you have a stacktrace for the crash you're getting now?
The one related to this title is definitely fixed, and errors.ubuntu.com confirms it.

What you're getting might be more related to https://pad.lv/1723048 ?

Revision history for this message
ryzko (ryzko) wrote :

Well, only what I have is again part of syslog (attached). If you can advice me how to provide better logs, it would be appreciated. However, it seems that the crash now is not caused by monitor switch off but by switching it on again, according to syslog. Nothing is logged between switch off and switch on.

Revision history for this message
ryzko (ryzko) wrote :

I was just retested the crash and it goes worse, now it is complete GUI crash not a "just session kick-out". I have created new bug report 1724557 due the fact that this bug 1717170 has fix released status and also because the behaviour and logs changed.

Revision history for this message
pullasuti (pullasuti) wrote :

Now when I switch my display back on again, I see my desktop and open windows for a short while, and then am immediately kicked out of the session. Before the entire desktop would die, now I'm just back at user select screen.

On two separate systems.

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

This bug is closed, rightly or wrongly. It would help us if all further discussion was in different bugs that are open. Even if it feels like the same issue as was discussed here...

Revision history for this message
Mario Emmenlauer (emmenlau) wrote :

I have the same crash as Rachel whenever I unplug the DVI from my NVidia graphics card or switch the KVM to another monitor. I use Ubuntu 17.10 latest, with mutter 3.26.2-0ubuntu0.1 installed. This does not fix the crash.

I also get the assertion: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed

I could fix the issue by building my own mutter based on 3.26.2-0ubuntu0.1 but with the patch 3572502 from https://git.gnome.org/browse/mutter/commit/?id=3572502 applied. The patch applies cleanly and the crash is gone.

Please instruct where I can report this, since this bug here is closed?

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

Mario, ideally please open a new bug by running 'ubuntu-bug mutter'. Or if that doesn't work then go here:
https://bugs.launchpad.net/ubuntu/+source/mutter/+filebug

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.