gnome-shell crashed with signal 6: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)

Bug #2016308 reported by Johon Doee
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Status tracked in Mantic
Lunar
Fix Released
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

Hello,

This bug is triggered by Sweethome 3D but the underlying problem seems to be a libmutter issue.

Setup:
Ubuntu 23.04
Ryzen 6000
AMD 680
Gnome 44
Sweethome 3D 7.0.2 (from the repositories)

Whenever I load a file in Sweethome 3D my desktop session is killed instantly. I am either thrown back to the desktop login or it stays black.

This seems like a severe problem to me. Under no circumstances should an app like Sweethome 3D be able to crash mutter.

I don't know how to give any logs. But I attach a sample file for Sweethome 3D. Actually it crashes with any file.

Steps to reproduce:
Start Sweethome 3D
Draw some walls to make
Draw a room
Save to file
Quit Sweethome 3D
Start Sweethome 3D
Load the file
Crash

Revision history for this message
Johon Doee (jodoee11) wrote :
Revision history for this message
Johon Doee (jodoee11) wrote : Re: libmutter: GNOME Shell crashed with signal 6
Download full text (13.8 KiB)

2023-04-14T16:44:07.804148+02:00 ubuntu-00 systemd[1478]: Started app-gnome-sweethome3d-2690.scope - Application launched by gnome-shell.
2023-04-14T16:44:08.003473+02:00 ubuntu-00 systemd[1478]: Started app-gnome-ubuntu\x2dadvantage\x2dnotification-2720.scope - Application launched by gnome-session-binary.
2023-04-14T16:44:08.004736+02:00 ubuntu-00 systemd[1478]: Started app-gnome-update\x2dnotifier-2723.scope - Application launched by gnome-session-binary.
2023-04-14T16:44:08.228668+02:00 ubuntu-00 sweethome3d.desktop[2690]: Java 3D: implicit antialiasing enabled
2023-04-14T16:44:08.998009+02:00 ubuntu-00 systemd[1]: systemd-timedated.service: Deactivated successfully.
2023-04-14T16:44:09.030348+02:00 ubuntu-00 java[2690]: Failed to load module "canberra-gtk-module"
2023-04-14T16:44:30.450559+02:00 ubuntu-00 systemd[1]: systemd-hostnamed.service: Deactivated successfully.
2023-04-14T16:44:33.945268+02:00 ubuntu-00 gnome-shell[1701]: **
2023-04-14T16:44:33.945283+02:00 ubuntu-00 gnome-shell[1701]: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-04-14T16:44:33.945291+02:00 ubuntu-00 gnome-shell[1701]: Bail out! libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-04-14T16:44:33.945299+02:00 ubuntu-00 gnome-shell[1701]: GNOME Shell crashed with signal 6
2023-04-14T16:44:33.945309+02:00 ubuntu-00 gnome-shell[1701]: == Stack trace for context 0x55afca89a820 ==
2023-04-14T16:44:33.960887+02:00 ubuntu-00 update-notifier[2723]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961034+02:00 ubuntu-00 xdg-desktop-por[2158]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961178+02:00 ubuntu-00 xdg-desktop-por[2231]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961376+02:00 ubuntu-00 evolution-alarm[2040]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961508+02:00 ubuntu-00 gsd-wacom[2001]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961647+02:00 ubuntu-00 gsd-power[1979]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961766+02:00 ubuntu-00 gsd-media-keys[1977]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.961925+02:00 ubuntu-00 gnome-shell[1943]: Error getting buffer
2023-04-14T16:44:33.962111+02:00 ubuntu-00 snapd-desktop-i[2334]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.962526+02:00 ubuntu-00 gsd-keyboard[1974]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.962810+02:00 ubuntu-00 nautilus[2619]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.962841+02:00 ubuntu-00 gnome-shell[1943]: (EE) failed to read Wayland events: Connection reset by peer
2023-04-14T16:44:33.963394+02:00 ubuntu-00 gsd-color[1966]: Error reading events from display: Broken pipe
2023-04-14T16:44:33.964791+02:00 ubuntu-00 systemd[1478]: org.gnome.SettingsDaemon.Power.service: Main process exited, code=exited, status=1/FAILURE
2023-04-14T16:44:34.001551+02:00 ubuntu-00 systemd[1478]: <email address hidden>: Mai...

affects: xorg-server (Ubuntu) → mutter (Ubuntu)
summary: - Sweethome3D kills desktop session on loading files
+ libmutter: GNOME Shell crashed with signal 6
description: updated
Revision history for this message
Johon Doee (jodoee11) wrote :

@Ubuntu-devs: Please pull https://gitlab.gnome.org/GNOME/mutter/-/commit/6b57ab897582dfc8dce09ca343bdca6f3371f037 and include it into mutter. Thanks.

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

Sounds like bug 1870822 wasn't really fixed.

summary: - libmutter: GNOME Shell crashed with signal 6
+ gnome-shell crashed with signal 6:
+ libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage:
+ assertion failed: (window->display->focus_window != window)
no longer affects: gnome-shell (Ubuntu)
tags: added: lunar
Changed in mutter (Ubuntu):
status: New → Fix Committed
tags: added: fixed-in-mutter-44.1 fixed-upstream
Changed in mutter:
status: Unknown → Fix Released
Revision history for this message
Marcel (lolxdfly) wrote :

I have the same issue with the ATEN KN1000A JavaClient. Connecting to the Switch crashes my gnome-shell. However, this only happens if you are connected to the real hardware. It's unfortunately not possible to reproduce without having the hardware.
I use Ubuntu 23.04 x86_64 with kernel 6.2.0-20-generic and GNOME 44.0.

Here are the logs I get:

2023-04-27T15:19:28.009972+02:00 user gnome-shell[12543]: **
2023-04-27T15:19:28.010264+02:00 user gnome-shell[12543]: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-04-27T15:19:28.010283+02:00 user gnome-shell[12543]: Bail out! libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-04-27T15:19:28.010298+02:00 user gnome-shell[12543]: GNOME Shell crashed with signal 6
2023-04-27T15:19:28.010324+02:00 user gnome-shell[12543]: == Stack trace for context 0x5599cb4eb850 ==
2023-04-27T15:19:29.133601+02:00 user update-notifier[15427]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.134224+02:00 user gnome-shell[14293]: (EE) failed to read Wayland events: Connection reset by peer
2023-04-27T15:19:29.134623+02:00 user x-terminal-emulator[15380]: # Error reading events from display: Broken pipe
2023-04-27T15:19:29.134955+02:00 user gnome-terminal-[15386]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.135384+02:00 user xdg-desktop-por[13037]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.135779+02:00 user xdg-desktop-por[12986]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.136139+02:00 user snapd-desktop-i[13152]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.136482+02:00 user gsd-wacom[12747]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.136789+02:00 user gsd-media-keys[12721]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.137153+02:00 user gsd-power[12728]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.137615+02:00 user gsd-color[12710]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.138025+02:00 user evolution-alarm[12792]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.138486+02:00 user gsd-keyboard[12719]: Error reading events from display: Broken pipe
2023-04-27T15:19:29.181621+02:00 user systemd[12183]: org.gnome.SettingsDaemon.Color.service: Main process exited, code=exited, status=1/FAILURE
2023-04-27T15:19:29.182071+02:00 user x-terminal-emulator[15732]: # Error reading events from display: Broken pipe
2023-04-27T15:19:29.182875+02:00 user systemd[12183]: <email address hidden>: Main process exited, code=dumped, status=6/ABRT

Revision history for this message
Daniel Ayers (4n6expert) wrote :

I experienced this problem today on 23.04 with latest (production) updates.

The tags on this bug appear to say it was fixed in mutter "44.1" however fully updated 23.04 systems still have mutter 44.0:

# apt list --installed | grep -i mutter
gir1.2-mutter-12/lunar,now 44.0-2ubuntu4 amd64 [installed,automatic]
libmutter-12-0/lunar,now 44.0-2ubuntu4 amd64 [installed,automatic]
mutter-common-bin/lunar,now 44.0-2ubuntu4 amd64 [installed,automatic]
mutter-common/lunar,lunar,now 44.0-2ubuntu4 all [installed,automatic]

The problem is severe, as it causes Gnome to immediately exit and kill all my processes (losing work).

2023-05-09T20:32:12.869757+12:00 gnome-shell[292332]: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-05-09T20:32:12.869780+12:00 gnome-shell[292332]: Bail out! libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-05-09T20:32:12.869794+12:00 gnome-shell[292332]: GNOME Shell crashed with signal 6

In my case the problem was triggered by running the latest version of OWASP ZAP (2.12) running with openjdk-21-jre.

It is 100% reproducible.

Revision history for this message
Daniel Ayers (4n6expert) wrote :
Download full text (3.5 KiB)

The above comment (https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2016308/comments/6) pertained to running Wayland.

I switched to Xorg and the behaviour was slightly different.

Under Xorg the libmutter assert failed leading to gnome-shell "Bail out!' same as before, except that instead of killing my X session and returning to login prompt the display flickered (apparent Xorg restart) and my session continued - this time with no programs closed, and the OWASP ZAP application continuing.

From this I conclude that the error behaviour in libmutter/gnome-shell is the same, but problem recovery under Xorg is better than under Wayland.

Log follows:

May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
May 09 21:09:59 gnome-shell[339768]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
May 09 21:10:09 gnome-shell[339768]: **
May 09 21:10:09 gnome-shell[339768]: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
May 09 21:10:09 gnome-shell[339768]: Bail out! libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
May 09 21:10:09 gnome-shell[339768]: GNOME Shell crashed with signal 6
May 09 21:10:09 gnome-shell[339768]: == Stack trace for context 0x55cc24c2cf70 ==
May 09 21:10:10 snapd-desktop-i[340464]: atk-bridge: get_device_events_reply: unknown signature
May 09 21:10:10 systemd[339459]: <email address hidden>: Main process exited, code=dumped, status=6/ABRT
May 09 21:10:10 polkitd(authority=local)[8258]: Unregistered Authentication Agent for unix-session:15 (system bus name :1.318, object path /org/freedesktop/PolicyKit1/AuthenticationAgen>
May 09 21:10:10 systemd[339459]: <email address hidden>: Failed with result 'core-dump'.
May 09 21:10:10 systemd[339459]: <email address hidden>: Consumed 2.610s CPU time.
May 09 21:10:10 systemd[339459]: <email address hidden>: Scheduled restart job, restart counter is at 1.
May 09 21:10:10 systemd[339459]: Stopped <email address hidden> - GNOME Shell on X11.
May 09 21:10:10 systemd[339459]: <email address hidden>...

Read more...

Revision history for this message
Diego A. Elizondo (diegoaez) wrote :

I am using NetBeans 12.5 another way to replicate this bug: add two JFrame and configure a button in one of the JFrame with the following code:

     new NewJFrame().setVisible(true);
     this.dispose();

Wayland session: the OS freezes and closes the session.
Xorg session : the OS freezes but it does not close the session and keeps the program open

Revision history for this message
Zsolt Sandor (zsolt-sandor) wrote (last edit ):

I can confirm the existence of this bug, also with a java application (Cameo System Modeler) when using Wayland. When I start the application it starts with a loading screen, and when it finishes with loading and wants to dispose the loading screen (probably a JFrame, ad Diego mentioned) I get a crash and Ubuntu logs out. I can reproduce this issue consistently.

Switching to X solves the problem, no more crash, I can use Cameo.

Linux zsolt-ThinkPad-T480 6.2.0-20-generic #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 6 07:48:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar

2023-05-10T19:05:44.827550+02:00 zsolt-ThinkPad-T480 gnome-shell[23330]: **
2023-05-10T19:05:44.827869+02:00 zsolt-ThinkPad-T480 gnome-shell[23330]: libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-05-10T19:05:44.827930+02:00 zsolt-ThinkPad-T480 gnome-shell[23330]: Bail out! libmutter:ERROR:../src/core/window.c:1533:meta_window_unmanage: assertion failed: (window->display->focus_window != window)
2023-05-10T19:05:44.827981+02:00 zsolt-ThinkPad-T480 gnome-shell[23330]: GNOME Shell crashed with signal 6
2023-05-10T19:05:44.828047+02:00 zsolt-ThinkPad-T480 gnome-shell[23330]: == Stack trace for context 0x55df27bb9660 ==
2023-05-10T19:05:46.021067+02:00 zsolt-ThinkPad-T480 systemd[22932]: <email address hidden>: Main process exited, code=dumped, status=6/ABRT

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.1-1ubuntu1

---------------
mutter (44.1-1ubuntu1) mantic; urgency=medium

  * Merge with Debian (LP: #2020225, LP: #2012100, LP: #2012717,
    LP: #2013216, LP: #2019225, LP: #2006044, LP: #2015861, LP: #1999578,
    LP: #2011251, LP: #2016308)
  * Remaining changes:
    - Add x11-Add-support-for-fractional-scaling-using-Randr.patch
    - Add window-Add-ability-to-override-the-edge-constraints.patch
      + Make possible for extensions (such as Tiling Assistant) to override
        window constraints. (LP: #2007710, #2011611)

mutter (44.1-1) experimental; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release
  * Drop bash patch applied in new release
  * debian/libmutter-12-0.symbols: Add new symbols

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1

  [ Marco Trevisan (Treviño) ]
  * Fix issue with Firefox opening black window in wayland sessions
    - Add d/p/display-Set-compositor-selection-earlier-on-XWayland.patch
      (LP: #1987976)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:24:49 -0400

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Changed in mutter (Ubuntu Lunar):
status: New → Fix Committed
Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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