GNOME Wayland session crashes with libmutter:ERROR:../src/core/window.c:...:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)

Bug #2050865 reported by Zingam
192
This bug affects 30 people
Affects Status Importance Assigned to Milestone
Gnome Shell Extension Tiling Assistant
New
Unknown
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Status tracked in Oracular
Noble
In Progress
High
Daniel van Vugt
Oracular
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

GNOME Wayland session crashes with libmutter:ERROR:../src/core/window.c:...:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)

[ Test Plan ]

This needs more detail and community help...

1. On a machine that was previously affected by the crash, disconnect the HDMI cable.

Expect: The shell has not crashed and continues to function.

[ Where problems could occur ]

Potentially anywhere in Gnome Shell. Judging by the fix it relates to automatic window placement when monitors are added and removed.

[ Original description ]

I am observing multiple issues with external monitor in a hybrid system (laptop) with Intel GPU and NVIDIA GPU in a Gnome session:

- Disconnecting HDMI cable crashes the desktop to login screen

The HDMI port is connected to NVIDIA. I use the latest updates and drivers of 22.04 LTS.

I am not sure how to auto-report this with ubuntu-bug. The system is similar to this report: https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1970291

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. It sounds like some part of the system has crashed. To help us find the cause of the crash please follow these steps:

1. Run these commands:
    journalctl -b0 > journal.txt
    journalctl -b-1 > prevjournal.txt
and attach the resulting text files here.

2. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

3. If step 2 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

tags: added: hybrid jammy multigpu nvidia
Changed in mutter (Ubuntu):
status: New → Incomplete
Revision history for this message
Zingam (registrirayme) wrote :

The GNOME desktop actually crashes on reconnecting also. Here is my apport bug report:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2051221
It also claimed that it was already reported previously:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1959507

Revision history for this message
Zingam (registrirayme) wrote :

I don't know if this is a duplicate so I am still posting the link:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/2051222

Revision history for this message
Zingam (registrirayme) wrote :

Taken after the crash

Revision history for this message
Zingam (registrirayme) wrote :

Taken after the crash

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

Thanks. Since bug 1959507 already exists, we can ignore that here.

Comments #3 and #4 however show a different crash:

  libmutter:ERROR:../src/core/window.c:6377:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)

so we will make this bug about that. It's also being tracked in:

  https://gitlab.gnome.org/GNOME/mutter/-/issues/2846

Changed in mutter (Ubuntu):
status: Incomplete → New
summary: - GNOME Wayland session crashes to Login window when HDMI disconnected
+ GNOME Wayland session crashes with
+ libmutter:ERROR:../src/core/window.c:6377:meta_window_get_work_area_for_logical_monitor:
+ assertion failed: (logical_monitor)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: GNOME Wayland session crashes with libmutter:ERROR:../src/core/window.c:6377:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)

Are you using the Tiling Assistant extension? It's also been reported there: https://github.com/Leleat/Tiling-Assistant/issues/267

Changed in mutter:
status: Unknown → New
Changed in gnome-shell-extension-tiling-assistant:
status: Unknown → New
Revision history for this message
Zingam (registrirayme) wrote :

Daniel van Vugt (vanvugt) wrote 5 hours ago: #7

Are you using the Tiling Assistant extension? It's also been reported there: https://github.com/Leleat/Tiling-Assistant/issues/267

----

That's a good question. The windows definitely tile but I don't remember installing that particular extension. All I can see is:

$ gnome-extensions list
<email address hidden>
<email address hidden>
<email address hidden>

tags: added: noble
summary: GNOME Wayland session crashes with
- libmutter:ERROR:../src/core/window.c:6377:meta_window_get_work_area_for_logical_monitor:
+ libmutter:ERROR:../src/core/window.c:...:meta_window_get_work_area_for_logical_monitor:
assertion failed: (logical_monitor)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mutter (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This might actually be https://gitlab.gnome.org/GNOME/mutter/-/issues/3402 which is fixed in mutter 46.1

Changed in mutter:
status: New → Fix Released
Revision history for this message
Islam (islam) wrote :

How can I get this fix in 24.04?

Changed in mutter:
status: Fix Released → Unknown
Changed in mutter (Ubuntu):
status: Confirmed → Fix Committed
tags: added: fixed-in-mutter-46.1 fixed-upstream
Changed in mutter:
status: Unknown → Fix Released
description: updated
Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Sergio Conde Gómez (skgsergio) wrote :

Is there a plan to backport the fix to 24.04 or to update to 46.1? I'm seeing this daily when I disconnect or reconnect my external screen.

Revision history for this message
Islam (islam) wrote :

Yes, this is happening on daily bases which makes Ubuntu unstable at all.
Please apply the fix to 24.04 ASAP.

Revision history for this message
Islam (islam) wrote :
Download full text (11.2 KiB)

May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
May 08 15:01:20 hostname gnome-shell[3770]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
May 08 15:01:20 hostname gnome-shell[3770]: **
May 08 15:01:20 hostname gnome-shell[3770]: libmutter:ERROR:../src/core/window.c:5869:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
May 08 15:01:20 hostname gnome-shell[3770]: Bail out! libmutter:ERROR:../src/core/window.c:5869:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
May 08 15:01:20 hostname gnome-shell[3770]: GNOME Shell crashed with signal 6
May 08 15:01:20 hostname gnome-shell[3770]: == Stack trace for context 0x59372c50d260 ==
May 08 15:01:20 hostname gnome-shell[3770]: #0 7fffcbe8c330 b file:///<email address hidden>/src/extension/moveHandler.js:503 (297fac732920 @ 454)
May 08 15:01:20 hostname gnome-shell[3770]: #1 7fffcbe8cb50 b file:///<email address hidden>/src/extension/moveHandler.js:391 (297fac7326a0 @ 1833)
May 08 15:01:20 hostname gnome-shell[3770]: #2 59372c5d96c8 i resource:///org/gnome/shell/ui/init.js:21 (6e69c570bf0 @ 48)
May 08 15:01:31 hostname gnome-shell[69367]: Running GNOME Shell (using mutter 46.0) as a Wayland display server
May 08 15:01:31 hostname gnome-shell[69367]: Made thread 'KMS thread' realtime scheduled
May 08 15:01:31 hostname gnome-shell[69367]: Device '/dev/dri/card1' prefers shadow buffer
May 08 15:01:31 hostname gnome-shell[69367]: Added device '/dev/dri/card1' (i915) using atomic m...

Revision history for this message
Sergio Conde Gómez (skgsergio) wrote (last edit ):

I've built the .deb for mutter 46.0-1ubuntu9 with the patch from https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3691 and looks like it fixes the issue (at least I did not have more crashes for the rest of the day).

Revision history for this message
Dalyn Dalton (itsthenewdx2) wrote :

Hoping this gets backported to 24.04 LTS as well, affecting several of our members on a daily basis

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

24.04 will get the fix automatically as part of the mutter 46.1 update.

Revision history for this message
James Judd (jjudd) wrote :

Thanks for the info. Very excited to know that 24.04 will get this automatically as part of 46.1. I'm curious if 46.1 is something that's days, weeks, or months away from being released on 24.04?

I ask because we've got several folks internally running into this and I'm trying to decide if it's better to wait for the fix to hit 24.04 or for us to build a deb with the fix and have folks use that for now. If the fix is likely to reach 24.04 soon, then we'll wait. If not, then we'll likely do some work to get the fix to folks sooner.

Thanks again.

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

There is a significant delay on getting mutter 46.1 into 24.04 at the moment with no ETA, so I recommend doing whatever you need to. Such delays will not occur for 46.2 and later.

Changed in mutter (Ubuntu Noble):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
James McKenzie (jamesps) wrote :

I just had this same crash again on 24.04 with the patched mutter packages installed. Although, I will say I haven't experienced the issue as frequently as before installing the patched versions.

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

It's hopefully a different crash, unless you see this in the log:

  meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)

Please always report crashes as new bugs:
https://wiki.ubuntu.com/Bugs/Responses#Missing_a_crash_report_or_having_a_.crash_attachment

Revision history for this message
Islam (islam) wrote :

I didn't experience such crash so far after installing the above fixes.

Revision history for this message
James McKenzie (jamesps) wrote :

```
Jun 04 08:55:59 ubu-n-c3c04f314633 gnome-shell[4176]: libmutter:ERROR:../src/core/window.c:5941:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
Jun 04 08:55:59 ubu-n-c3c04f314633 gnome-shell[4176]: Bail out! libmutter:ERROR:../src/core/window.c:5941:meta_window_get_work_area_for_logical_monitor: assertion failed: (logical_monitor)
Jun 04 08:55:59 ubu-n-c3c04f314633 gnome-shell[4176]: GNOME Shell crashed with signal 6
```

As far as I can tell, it's the same error. I'll report it as a new bug.

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

That is this bug so we can keep the discussion here.

Next please double check that you have libmutter-14-0 version 46.1 or later installed.

Revision history for this message
James McKenzie (jamesps) wrote :

I have these mutter package versions:

```
ii gir1.2-mutter-14:amd64 46.1-2ubuntu1 amd64 GObject introspection data for Mutter
ii libmutter-14-0:amd64 46.1-2ubuntu1 amd64 window manager library from the Mutter window manager
ii mutter-common 46.1-2ubuntu1 all shared files for the Mutter window manager
ii mutter-common-bin 46.1-2ubuntu1 amd64 shared programs for the Mutter window manager
```

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

Also have you rebooted since installing that?

Assuming you had rebooted, please look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent crashes on that page? If not then do you have any recent crash reports in /var/crash? If so then please use 'ubuntu-bug' to report them.

Revision history for this message
James McKenzie (jamesps) wrote :

I have a crash report from the latest crash today and have run ubuntu-bug to upload it. It's not showing on errors.ubuntu.com yet, but maybe it takes some time?

```
ubuntu-bug /var/crash/_usr_bin_gnome-shell.8046.crash
```

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

Did it create a .upload file? That will tell us the unique ID of the crash report.

Revision history for this message
James McKenzie (jamesps) wrote :

Yes I can see a corresponding .upload and .uploaded file.

Unique ID is: f8601c66-2247-11ef-8ba3-fa163ec8ca8c

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

Thanks! Unfortunately the automated system isn't showing enough of the stack trace to be helpful;

__pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
__pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
__GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
__GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
__GI_abort () at ./stdlib/abort.c:79

It's also not grouping related crashes as much as it should for 24.04 yet. I'm hoping that just means there's a low volume of crash reports from 24.04 compared to previous releases. EDIT: That's bug 2067120, I'm told.

To figure out what's still causing this crash we would either need more automated crash reports from people or for someone to debug it locally and tell us the stack trace :(

Revision history for this message
James McKenzie (jamesps) wrote :

If you have a step-by-step, I'm happy to try and get the information you need.

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

It sounds like we're only days away from 24.04 automated crash reports starting to work correctly so I am inclined to wait for that.

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

James, please try:

  gnome-extensions disable <email address hidden>

and then log in again (inspired by bug 2068850). Does that avoid the crash?

Revision history for this message
James McKenzie (jamesps) wrote :

Disabled now. I will give an update after some time whether the crashing stopped.

Revision history for this message
Sergio Conde Gómez (skgsergio) wrote (last edit ):

Hey Daniel, I stopped having the crashes when I self-built debs for 46.0-1ubuntu9 + https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3691 patch, and I've later used the debs you linked.

However, I have Ubuntu's tiling extension disabled (had crashes with 46.0-1ubuntu9 even with it disabled) because I use gTile and Ubuntu's extension does weird things, like the preview rectangles not disappearing after moving a window.

Revision history for this message
James McKenzie (jamesps) wrote :

Haven't had a crash yet since disabling the tiling-assistant extension.

Revision history for this message
Michał Sawicz (saviq) wrote :

> Haven't had a crash yet since disabling the tiling-assistant extension.

Same, disabling the tiling ext seems to have made my GNOME stable again.

Revision history for this message
Islam (islam) wrote :

For me it still crashing even after disabling the tiling extension.

But after installing the fix in 46.1 that is attached in the other bug report, it's solved.

Changed in mutter (Ubuntu Oracular):
milestone: none → ubuntu-24.10
Changed in mutter (Ubuntu Noble):
milestone: none → ubuntu-24.04.1
Changed in mutter (Ubuntu Noble):
status: Triaged → In Progress
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.