Launchpad has imported 25 comments from the remote bug at
https://bugzilla.gnome.org/show_bug.cgi?id=788764.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2017-10-10T10:18:55+00:00 Gw-t wrote:

Created attachment 361234
systemd journal excerpt including backtrace

I have a physical KVM switch that "unplugs" the monitor when switching
devices (generally desired behavior for me). After upgrading mutter
(3.24.4-1 -> 3.26.1-1) as packaged with ArchLinux, the following
assertion is hit when switching screens on a machine that has only the
KVM connected:

mutter:ERROR:backends/meta-monitor-
manager.c:2267:meta_monitor_manager_get_logical_monitor_from_number:
assertion failed: ((unsigned int) number < g_list_length
(manager->logical_monitors))

A full excerpt from the systemd journal including a coredump is
attached.

As a result, my Gnome session dies everytime I switch screens. The
assertion is not hit on a laptop (with an internal screen) that is
connected to the same KVM. Based on the assertion's text, this seems
logical as it likely only hits when the only screen is "unplugged".

Thank you for your time on working on OpenSource software!

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/0

------------------------------------------------------------------------
On 2017-10-10T10:27:57+00:00 Jan Steffens wrote:

Probably a duplicate of bug 788607.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/1

------------------------------------------------------------------------
On 2017-10-11T06:00:02+00:00 Daniël de Kok wrote:

I hit the same assertion when I switch my screen off/on (Dell P2415Q
HiDPI, NVIDIA Quadro 2000 using Nouveau, on Wayland). I have applied the
diff of commit 6eb7d13 referenced in bug 788607. Unfortunately, this did
not resolve the problem.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/2

------------------------------------------------------------------------
On 2017-10-11T06:00:54+00:00 Daniël de Kok wrote:

Created attachment 361300
Backtrace

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/3

------------------------------------------------------------------------
On 2017-10-12T20:38:05+00:00 Gw-t wrote:

Tbe problem persists with the following ArchLinux packages:

gnome-shell 3.26.1+3+g43ec5280b-1
mutter 3.26.1+7+g41f7a5fdf-1

Based on the git commit in the package versions, I'd assume the fixes
from bug 788607 would be included.

However, one overlap I have identified with the comments from bug 788607
is that there is no problem when there are no open windows.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/4

------------------------------------------------------------------------
On 2017-10-12T20:55:22+00:00 Gw-t wrote:

Created attachment 361462
libmutter.so null pointer dereference backtrace and regs

Null pointer dereference that still occurs with the folliwng packages on
ArchLinux:

gnome-shell 3.26.1+3+g43ec5280b-1
mutter 3.26.1+7+g41f7a5fdf-1

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/5

------------------------------------------------------------------------
On 2017-10-13T03:58:00+00:00 Jonas Ådahl wrote:

The trace looks strikingly similar indeed, but where from in Javascript
it came from is harder to determine.

Any way you can attach a gdb to the process and reproduce? Then when you
hit the assert, run:

print gjs_dumpstack()

and paste what is printed to stdout/stderr. (note that it might end up
in the journal).

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/6

------------------------------------------------------------------------
On 2017-10-13T10:01:28+00:00 Gw-t wrote:

Created attachment 361499
gdb log with JS backtrace

I've added a SIGSEGV catchpoint to invoke gjs_dumpstack(), but the JS
stacktrace is empty (also note that there is no JS calls in the GDB
stacktrace for the null ptr dereference).


Oct 13 11:57:43 hostname org.gnome.Shell.desktop[5852]: == Stack trace for 
context 0x55c289d52000 ==
Oct 13 11:57:43 hostname org.gnome.Shell.desktop[5852]: (EE)
Oct 13 11:57:43 hostname org.gnome.Shell.desktop[5852]: Fatal server error:
Oct 13 11:57:43 hostname org.gnome.Shell.desktop[5852]: (EE) failed to read 
Wayland events: Broken pipe
Oct 13 11:57:43 hostname org.gnome.Shell.desktop[5852]: (EE)
Oct 13 11:58:25 hostname org.gnome.Shell.desktop[6236]: glamor: EGL version 1.4 
(DRI2):

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/7

------------------------------------------------------------------------
On 2017-10-13T10:11:23+00:00 Daniël de Kok wrote:

Georg: your second trace (attachment 361462) looks more similar to mine
in bug 788788. I will attach it here as well, it contains more symbols
than your trace.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/8

------------------------------------------------------------------------
On 2017-10-13T10:12:47+00:00 Daniël de Kok wrote:

Created attachment 361502
Trace of NULL pointer deref in meta_logical_monitor_get_scale

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/9

------------------------------------------------------------------------
On 2017-10-13T10:20:53+00:00 Gw-t wrote:

I posted a USD 100 bounty at bountysource.com to get this fixed.

https://www.bountysource.com/issues/50257944-mutter-error-backends-meta-
monitor-manager-c-2267
-meta_monitor_manager_get_logical_monitor_from_number-assertion-failed-
unsigned-int-number-g_list_length-manager-logical_monitors

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/10

------------------------------------------------------------------------
On 2017-10-15T07:11:42+00:00 Daniël de Kok wrote:

The latest changes in the gnome-3-26 branch solve these problems for me.
I still have to apply the workaround in bug 788788 though. With mutter
from gnome-3-26 and that workaround I can reliably switch my screen off
and on without gnome-shell/mutter crashing.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/11

------------------------------------------------------------------------
On 2017-10-16T09:07:36+00:00 Jonas Ådahl wrote:

*** Bug 789040 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/12

------------------------------------------------------------------------
On 2017-10-16T09:08:50+00:00 Jonas Ådahl wrote:

Created attachment 361654
window/wayland: Handle resizing when headless

We tried to get the geometry scale, which may depend on the main
logical monitor assigned to the window. To avoid dereferencing a NULL
logical monitor when headless, instead assume the geometry scale is 1.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/13

------------------------------------------------------------------------
On 2017-10-16T10:11:05+00:00 Gw-t wrote:

Created attachment 361657
ArchLinux PKGBUILD patch to include Jonas' working patch

Thank you, your proposed patch works and solves the issue for me.

I've included the PKGBUILD patch that I used to test this locally for
Jan's convenience.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/14

------------------------------------------------------------------------
On 2017-10-16T12:03:45+00:00 Daniël de Kok wrote:

Thanks! I will try the patch as well tonight and report back.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/15

------------------------------------------------------------------------
On 2017-10-16T15:21:31+00:00 Gw-t wrote:

Created attachment 361681
systemd journal of crashing after applying the latest patch

Zu frueh gefreut!

Seems there is another bug, this one triggered when switching the screen
back on. And not a helpful backtrace. Doesn't always reproduce.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/16

------------------------------------------------------------------------
On 2017-10-16T15:24:33+00:00 Gw-t wrote:

Created attachment 361682
backtrace of the last bug from gdb

Some more information to pinpoint the issue.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/17

------------------------------------------------------------------------
On 2017-10-16T15:43:17+00:00 Jonas Ådahl wrote:

Could you install debug symbols, and get a full backtrace and attach
that? Using gdb, that'd be the output of "backtrace full" on the core
dump. FWIW, the new trace could be also be bug 788627 or bug 788908.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/18

------------------------------------------------------------------------
On 2017-10-16T17:58:09+00:00 Daniël de Kok wrote:

For me it works now: I can reliably turn off and on the screen without
gnome-shell crashing. This increases usability significantly :).

There are some glitches though. After switching on the screen again,
gnome-terminal windows are 1/4th of the size. Nautilus windows retain
the same size but are lo-DPI and zoomed. After switching back and forth
to another desktop all the windows are normal again.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/19

------------------------------------------------------------------------
On 2017-10-17T04:17:29+00:00 Anatol Pomozov wrote:

Jonas, I applied your patch from
https://bugzilla.gnome.org/show_bug.cgi?id=788764#c13 and it fixed the
crash. Thanks a lot!

But I see other issue exactly the described by Daniel. I have a HiDPI
monitor with scaling coefficient "2". After monitor resume terminal
becomes scaled down to "1" and Nautilus fonts become blurred. I need to
press "Super" button (show all windows at current desktop) to return to
the correct state.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/20

------------------------------------------------------------------------
On 2017-10-18T12:59:17+00:00 Gw-t wrote:

Created attachment 361801
another backtrace of the latest bug

Same bug with different backtrace this time.

I tried building mutter with:
CFLAGS="-flto=no -O0 -ggdb" ./configure --enable-debug …
But still didn't get any useful debug symbols.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/21

------------------------------------------------------------------------
On 2017-10-27T13:59:37+00:00 Rui Matos wrote:

Review of attachment 361654:

lgtm

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/22

------------------------------------------------------------------------
On 2017-11-10T02:23:25+00:00 Jonas Ådahl wrote:

Comment on attachment 361654
window/wayland: Handle resizing when headless

Attachment 361654 pushed as 3572502 - window/wayland: Handle resizing
when headless

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/23

------------------------------------------------------------------------
On 2017-11-10T02:27:06+00:00 Jonas Ådahl wrote:

Pushed to master. Marking the ARCH patch as "rejected" as I can't find
any better patch status for it.

Reply at: https://bugs.launchpad.net/ubuntu/+source/gnome-
shell/+bug/1734044/comments/24


** Changed in: gnome-shell
       Status: Unknown => Fix Released

** Changed in: gnome-shell
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1734044

Title:
  gnome-shell crashes when monitor turned off or switch kvm
  [meta_monitor_manager_get_logical_monitor_from_number: assertion
  '(unsigned int) number < g_list_length (manager->logical_monitors)'
  failed]

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-shell/+bug/1734044/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to