auto-move-windows extension crashes gnome-shell with SIGABRT in src/core/workspace.c:375:meta_workspace_add_window: assertion failed: (g_list_find (workspace->mru_list, window) == NULL)

Bug #1911921 reported by Julian Andres Klode
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
gnome-shell-extensions (Ubuntu)
Fix Released
Medium
Daniel van Vugt
mutter (Ubuntu)
Fix Released
Medium
Daniel van Vugt

Bug Description

[Impact]

gnome-shell crashes when auto-move-windows extension is used with windows that want to be on all workspaces (like Chrome PiP).

https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/97
https://gitlab.gnome.org/GNOME/mutter/-/issues/992

[Test Plan]

1. Install gnome-shell-extensions

2. Open the 'Extensions' app and enable auto-move-windows.

3. Configure auto-move-windows with a rule for Chrome/Chromium.

4. Open Chrome/Chromium and point it at a simple video like from https://download.blender.org/peach/bigbuckbunny_movies/ or https://download.blender.org/demo/movies/BBB/

5. Set the Chrome tab playing the video to PiP mode.

Expect: No crashes and the video moves to an external window.

[Where problems could occur]

Changing mutter's window management code always brings risk of regression to the GNOME desktop.

[Other Info]

As in bug 1864052, putting a Chrome video into PiP mode crashes gnome-shell, although this time, in a different location.

ProblemType: Crash
DistroRelease: Ubuntu 21.04
Package: gnome-shell 3.38.2-1ubuntu1
ProcVersionSignature: Ubuntu 5.10.0-12.13-generic 5.10.6
Uname: Linux 5.10.0-12-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu55
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Fri Jan 15 16:04:30 2021
DisplayManager: gdm3
ExecutablePath: /usr/bin/gnome-shell
InstallationDate: Installed on 2018-03-14 (1037 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180313)
ProcCmdline: /usr/bin/gnome-shell
RelatedPackageVersions: mutter-common 3.38.2-1ubuntu1
Signal: 6
SourcePackage: gnome-shell
StacktraceTop:
 () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_assertion_message_expr () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 () at /lib/x86_64-linux-gnu/libmutter-7.so.0
 () at /lib/x86_64-linux-gnu/libmutter-7.so.0
 meta_window_stick () at /lib/x86_64-linux-gnu/libmutter-7.so.0
Title: gnome-shell crashed with SIGABRT
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip fax input kvm lpadmin lxd plugdev sambashare sbuild sudo
separator:

Revision history for this message
Julian Andres Klode (juliank) wrote :
tags: removed: need-amd64-retrace
tags: added: rls-hh-incoming
Revision history for this message
Julian Andres Klode (juliank) wrote :

Full stack trace, seems retracing failed. Oh well.

information type: Private → Public
summary: - gnome-shell crashed with SIGABRT
+ gnome-shell crashed with SIGABRT in
+ src/core/workspace.c:375:meta_workspace_add_window: assertion failed:
+ (g_list_find (workspace->mru_list, window) == NULL)
Revision history for this message
Julian Andres Klode (juliank) wrote : Re: gnome-shell crashed with SIGABRT in src/core/workspace.c:375:meta_workspace_add_window: assertion failed: (g_list_find (workspace->mru_list, window) == NULL)

Only tested on hirsute, no idea if it happens on groovy or focal too.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can't seem to get the crash to occur. Tried Chrome and Chromium with PiP in both Xorg and Wayland and it works.

Also tried with the auto-move-windows extension which the upstream bug suggests is the trigger, but again no crash.

Also tried both hirsute and upstream GNOME.

Any more hints? Can you point to a free URL that triggers the problem?

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

Ah! You need to configure the auto-move-windows extension specifically for Chrome. Then it occurs.

summary: - gnome-shell crashed with SIGABRT in
- src/core/workspace.c:375:meta_workspace_add_window: assertion failed:
+ When using auto-move-windows extension, gnome-shell crashed with SIGABRT
+ in src/core/workspace.c:375:meta_workspace_add_window: assertion failed:
(g_list_find (workspace->mru_list, window) == NULL)
Changed in gnome-shell (Ubuntu):
status: Incomplete → In Progress
Changed in gnome-shell-extensions (Ubuntu):
status: Incomplete → Confirmed
no longer affects: gnome-shell-extensions
description: updated
summary: - When using auto-move-windows extension, gnome-shell crashed with SIGABRT
- in src/core/workspace.c:375:meta_workspace_add_window: assertion failed:
+ auto-move-windows extension crashes gnome-shell with SIGABRT in
+ src/core/workspace.c:375:meta_workspace_add_window: assertion failed:
(g_list_find (workspace->mru_list, window) == NULL)
Changed in gnome-shell-extensions (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Upstream has said they will fix gnome-shell itself to warn instead of crash.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Thanks! I appreciate this quick turnaround time :)

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

Instead of waiting for a fix to be released you can actually hack it into your /<email address hidden>/extension.js

@@ -72,7 +72,7 @@ class WindowMover {
     }

     _moveWindow(window, workspaceNum) {
- if (window.skip_taskbar)
+ if (window.skip_taskbar || window.is_on_all_workspaces())
             return;

         // ensure we have the required number of workspaces

[https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157]

Changed in gnome-shell-extensions (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-upstream
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There is also a general fix for gnome-shell proposed here:

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1692

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-3.38.4
affects: gnome-shell → mutter
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello! Please update the description to include the necessary SRU information [1]. Thank you!

[1] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

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

This bug was fixed in the package mutter - 3.38.3-2ubuntu1

---------------
mutter (3.38.3-2ubuntu1) hirsute; urgency=medium

  * Merge with debian, containing new upstream release (LP: #1915025)
    - Disable CRTCs when system becomes headless (LP: #1905825)
    - Fixed crash during windows unmanagement (LP: #1870822)
    - Do not handle ungrabbed events when unmanaging (LP: #1880405)
    - Downgrade assert to warning when adding window (LP: #1911921)
  * d/p/x11-Add-support-for-fractional-scaling-using-Randr.patch:
    - Refreshed
  * debian/rules: Enable remote desktop for all linux builds (LP: #1730612)

mutter (3.38.3-2) unstable; urgency=medium

  * Team upload
  * d/patches: Update to commit 3.38.3-12-g2d424a739 from gnome-3-38 branch
    - Cope with monitors with metacharacters in their EDID data
    - Don't crash if parsing monitor configuration fails
    - Don't crash if an extension tries to add the same window to a
      workspace more than once, such as auto-move-windows
    - Cope with monitor configuration changes during screencasting
    - Speed up workspace switching when many windows are open
    - Fix Xwayland windows not always appearing in the gnome-shell overview
    - Avoid warning spam and poor performance when unmanaging a window
      (probably Closes: #970295, LP: #1841774)

mutter (3.38.3-1) unstable; urgency=medium

  * Team upload
  * d/watch: Only watch for 3.38.x versions
  * New upstream release

 -- Marco Trevisan (Treviño) <email address hidden> Tue, 09 Feb 2021 04:59:11 +0100

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

This bug is still missing SRU information.

description: updated
description: updated
description: updated
Changed in gnome-shell-extensions (Ubuntu):
status: Fix Committed → Fix Released
Changed in mutter:
status: Unknown → Fix Released
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.