[eoan][regression] GNOME Shell hangs when closing a Java dialog; hung in (varying functions under) meta_stack_get_default_focus_window() from meta_window_x11_focus()

Bug #1834583 reported by Chris Halse Rogers
110
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
gnome-shell (Ubuntu)
Invalid
High
Marco Trevisan (Treviño)
mutter (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Disco
Fix Released
Undecided
Unassigned

Bug Description

[ Description ]

On my eaon system, closing any dialog in CLion (a Java program, which might be relevant) results in GNOME Shell hanging. I believe this to be a recent (in the last week or so, maybe?) regression.

https://errors.ubuntu.com/problem/4a57302829116966b06eef27966d687ea662af4f

[ Test case ]

 $ sudo snap install clion
 - Start clion, open a file
 - Hit Ctrl+Shift+F
 - Select Directory -> Click "..." to select the path
 - Hit OK / Cancel
 - The dialog should show and the shell should be responsive

[ Regression potential ]

The wrong window or no window is focused when a window is destroyed.

ProblemType: HangDistroRelease: Ubuntu 19.10
Package: gnome-shell 3.32.2-2ubuntu1
ProcVersionSignature: Ubuntu 5.0.0-17.18-generic 5.0.8
Uname: Linux 5.0.0-17-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu3
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Jun 28 17:27:00 2019
DisplayManager: gdm3
ExecutablePath: /usr/bin/gnome-shell
ProcCmdline: /usr/bin/gnome-shell
ProcEnviron:
 LANGUAGE=en_AU:en
 PATH=(custom, user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_AU.UTF-8
 SHELL=/usr/bin/fish
RelatedPackageVersions: mutter-common 3.32.2+git20190626-1ubuntu1
Signal: 6SourcePackage: gnome-shell
StacktraceTop:
 __GI_raise (sig=<optimised out>) at ../sysdeps/unix/sysv/linux/raise.c:50
 ()
 <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
 g_private_get () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_slice_free_chain_with_offset () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
Title: gnome-shell crashed with SIGABRT in __GI_raise()
UpgradeStatus: Upgraded to eoan on 2019-05-31 (27 days ago)
UserGroups: adm cdrom dialout dip libvirt lpadmin lxd plugdev sambashare sbuild sudo
separator:

Revision history for this message
Chris Halse Rogers (raof) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_private_get (key=key@entry=0x7fc92a3df440 <private_thread_memory>) at ../../../glib/gthread-posix.c:1062
 thread_memory_from_self () at ../../../glib/gslice.c:1185
 g_slice_free_chain_with_offset (mem_size=24, mem_chain=0x0, next_offset=8) at ../../../glib/gslice.c:1185
 g_list_free (list=<optimized out>) at ../../../glib/glist.c:182
 stack_do_window_deletions (stack=stack@entry=0x55c3f44b73b0, stack=stack@entry=0x55c3f44b73b0) at ../src/core/stack.c:820

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: GNOME Shell hangs when closing a dialog in CLion

Looks maybe related to bug 1831578. I wonder if Marco put an early fix for that into the gnome-shell 3.32.2-2ubuntu1 update...

information type: Private → Public
summary: - GNOME Shell hangs when closing a dialog in CLion
+ GNOME Shell hangs when closing a dialog in CLion; hung in
+ g_private_get() from thread_memory_from_self() from
+ g_slice_free_chain_with_offset() from g_list_free() from
+ stack_do_window_deletions() from stack_ensure_sorted() from
+ get_default_focus_window()
Changed in gnome-shell (Ubuntu):
importance: Medium → High
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Re: GNOME Shell hangs when closing a dialog in CLion; hung in g_private_get() from thread_memory_from_self() from g_slice_free_chain_with_offset() from g_list_free() from stack_do_window_deletions() from stack_ensure_sorted() from get_default_focus_window()

I've installed CLion from snap, but I can't reproduce this.

Any hint? What kind of dialog is affected?

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

Possibly related:

b'org.gnome.shell' b'enabled-extensions' b"['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>']"

summary: - GNOME Shell hangs when closing a dialog in CLion; hung in
- g_private_get() from thread_memory_from_self() from
- g_slice_free_chain_with_offset() from g_list_free() from
- stack_do_window_deletions() from stack_ensure_sorted() from
- get_default_focus_window()
+ GNOME Shell hangs when closing a dialog; hung in g_private_get() from
+ thread_memory_from_self() from g_slice_free_chain_with_offset() from
+ g_list_free() from stack_do_window_deletions() from
+ stack_ensure_sorted() from get_default_focus_window()
summary: - GNOME Shell hangs when closing a dialog; hung in g_private_get() from
- thread_memory_from_self() from g_slice_free_chain_with_offset() from
- g_list_free() from stack_do_window_deletions() from
+ GNOME Shell hangs when closing a Java dialog; hung in g_private_get()
+ from thread_memory_from_self() from g_slice_free_chain_with_offset()
+ from g_list_free() from stack_do_window_deletions() from
stack_ensure_sorted() from get_default_focus_window()
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: GNOME Shell hangs when closing a Java dialog; hung in g_private_get() from thread_memory_from_self() from g_slice_free_chain_with_offset() from g_list_free() from stack_do_window_deletions() from stack_ensure_sorted() from get_default_focus_window()

Chris, does your hung process also spin using lots of CPU?

If so then I am thinking bug 1835033 will turn out to be the same issue.

Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Bug 1834583] Re: GNOME Shell hangs when closing a Java dialog; hung in g_private_get() from thread_memory_from_self() from g_slice_free_chain_with_offset() from g_list_free() from stack_do_window_deletions() from stack_ensure_sorted() from get_default_focus_window()

Oh! Trevhino said both that he could reproduce this *and* that he had a fix (although he didn't seem very happy with the fix).

Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: Incomplete → In Progress
status: In Progress → Won't Fix
Changed in mutter (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
no longer affects: mutter (Ubuntu Disco)
Changed in gnome-shell (Ubuntu Disco):
status: New → Invalid
Changed in mutter:
status: Unknown → New
Revision history for this message
Rocko (rockorequin) wrote : Re: GNOME Shell hangs when closing a Java dialog; hung in g_private_get() from thread_memory_from_self() from g_slice_free_chain_with_offset() from g_list_free() from stack_do_window_deletions() from stack_ensure_sorted() from get_default_focus_window()

FWIW, if this is the same as bug #1835033, I find it only hangs when you close a dialog of a dialog - closing a first-level dialog of the main program seems to be ok.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
no longer affects: gnome-shell (Ubuntu Disco)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: GNOME Shell hangs when closing a Java dialog; hung in (varying functions under) meta_stack_get_default_focus_window() from meta_window_x11_focus()

Generalized to show the same infinite loop can occur with varying stack traces, depending on when you snapshot/coredump it. This is apparently a result of the new loop in:

https://gitlab.gnome.org/GNOME/mutter/commit/f71151a5dd990d935f3fbb39451f9b41f640b625

summary: GNOME Shell hangs when closing a Java dialog; hung in g_private_get()
from thread_memory_from_self() from g_slice_free_chain_with_offset()
from g_list_free() from stack_do_window_deletions() from
- stack_ensure_sorted() from get_default_focus_window()
+ stack_ensure_sorted() from get_default_focus_window() from
+ meta_stack_get_default_focus_window() from meta_window_x11_focus()
summary: - GNOME Shell hangs when closing a Java dialog; hung in g_private_get()
- from thread_memory_from_self() from g_slice_free_chain_with_offset()
- from g_list_free() from stack_do_window_deletions() from
- stack_ensure_sorted() from get_default_focus_window() from
- meta_stack_get_default_focus_window() from meta_window_x11_focus()
+ GNOME Shell hangs when closing a Java dialog; hung in (varying functions
+ under) meta_stack_get_default_focus_window() from
+ meta_window_x11_focus()
Revision history for this message
OlegKrikun (krikun) wrote :

Hi, i have issue with 3.32.2+git20190626 and JetBrain's IDEs.

In my case after updating to the 3.32.2+git20190626 have system freezes after clicking on dialog button (dialog shoud be placed over another dialog).

I described it in JB tracker https://youtrack.jetbrains.com/issue/JBR-1642

tags: added: regression
summary: - GNOME Shell hangs when closing a Java dialog; hung in (varying functions
- under) meta_stack_get_default_focus_window() from
+ [eoan][regression] GNOME Shell hangs when closing a Java dialog; hung in
+ (varying functions under) meta_stack_get_default_focus_window() from
meta_window_x11_focus()
tags: added: disco
Changed in mutter:
status: New → Fix Released
description: updated
tags: added: regression-proposed
Revision history for this message
bart (bart-wp) wrote :

Hi I can confirm this for Jetbrain's phpstorm and for jedit.
It is a major issue if these happen to be important tools in the office.

Revision history for this message
Shaun Crampton (fasaxc) wrote :

I was hitting this on disco-proposed. I found that it was resolved by setting an APT priority of -1 for disco-proposed and doing a dist-upgrade (i.e. downgrading all packages to disco-updates). I found that downgrading mutter and gnome-shell was insufficient (I guess there are lots of related libraries).

Revision history for this message
bart (bart-wp) wrote :

@fasaxc Thank you that is a handy workaround.

Revision history for this message
Darkalex (darkalex) wrote :

current workaround is to downgrade packages

gir1.2-mutter-4
libmutter-4-0-dbgsym
mutter

to version from disco-updates (easier to do it with aptitude)

don't forget to add disco-updates to sources.list (if u have eoan)
deb http://ru.archive.ubuntu.com/ubuntu/ disco-updates universe

Revision history for this message
Ilyas Gazimagomedov (ilyasg) wrote :

On Ubuntu 19.04 run the following command to fix it (downgrading):

sudo apt install \
    gir1.2-mutter-4=3.32.0+git20190410-1ubuntu1 \
    libmutter-4-0=3.32.0+git20190410-1ubuntu1 \
    mutter=3.32.0+git20190410-1ubuntu1 \
    mutter-common=3.32.0+git20190410-1ubuntu1

Revision history for this message
Steve Langasek (vorlon) wrote :

Ilyas, this bug was never released into a stable release of Ubuntu, it was identified while the change was present only in the devel series and in disco-proposed. If you are unhappy dealing with bugs of this sort, I strongly recommend that you not opt in to the proposed pocket, which contains packages they have not yet completed QA and been released to all users for general consumption.

Revision history for this message
Ilyas Gazimagomedov (ilyasg) wrote :

@vorlon, yes, you are right, already unchecked it. Did not know that I have checked proposed. It is my bad.

Revision history for this message
Mikel (kelzodi) wrote :

In any case,

When I close any dialog popup from java apps (Jdeveloper, NetBeans, SQLDeveloper) then I get gnome-shell running at 100% of processor and graphical interface hangs.

I've checked for my mutter installed version:

3.32.2+git20190626-1ubuntu1~19.04.1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_disco-proposed_main_binary-amd64_Packages) (/var/lib/dpkg/status)

Downgrading mutter and libmutter as Iliyas indicated, I can avoid the problem.

Thanks to Ilyas and thanks to everyone.

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

This bug was fixed in the package mutter - 3.32.2+git20190711-2ubuntu1

---------------
mutter (3.32.2+git20190711-2ubuntu1) eoan; urgency=medium

  * Merge with debian. Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr

mutter (3.32.2+git20190711-2) experimental; urgency=medium

  * d/p/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch:
    - Fix possible crash on closing Java dialogs (Related to LP: #1834583)
    d/p/metatest-Dispatch-the-destruction-instead-of-sleeping-aft.patch:
    - Tests: don't wait too much after window destruction, causing failures

 -- Iain Lane <email address hidden> Fri, 19 Jul 2019 16:59:08 +0100

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Rocko (rockorequin) wrote :

Thanks, mutter 3.32.2+git20190711-2ubuntu1 fixes it for me in eoan.

Changed in gnome-shell (Ubuntu):
status: Won't Fix → Invalid
Revision history for this message
Massimeddu (massimeddu) wrote :

Is it possible to backport the eoan fix to disco proposed repository?

Thank you.

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

Massimeddu: The fix is already in progress and waiting for the SRU team to ack the change before it can go to proposed repository

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Chris, or anyone else affected,

Accepted mutter into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.32.2+git20190711-2ubuntu1~19.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mutter (Ubuntu Disco):
status: New → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

No hang anymore with ubuntu-proposed mutter

marco@ubuntu-vmware:~:✗ $ apt-cache policy mutter
mutter:
  Installed: 3.32.2+git20190711-2ubuntu1~19.04.1
  Candidate: 3.32.2+git20190711-2ubuntu1~19.04.1
  Version table:
 *** 3.32.2+git20190711-2ubuntu1~19.04.1 500
        500 http://archive.ubuntu.com/ubuntu disco-proposed/main amd64 Packages
        100 /var/lib/dpkg/status

tags: added: verification-done verification-done-disco
removed: verification-needed verification-needed-disco
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for mutter has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.9 KiB)

This bug was fixed in the package mutter - 3.32.2+git20190711-2ubuntu1~19.04.1

---------------
mutter (3.32.2+git20190711-2ubuntu1~19.04.1) disco; urgency=medium

  * No-change backport from disco to eoan.

mutter (3.32.2+git20190711-2ubuntu1) eoan; urgency=medium

  * Merge with debian. Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr

mutter (3.32.2+git20190711-2) experimental; urgency=medium

  * d/p/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch:
    - Fix possible crash on closing Java dialogs (Related to LP: #1834583)
    d/p/metatest-Dispatch-the-destruction-instead-of-sleeping-aft.patch:
    - Tests: don't wait too much after window destruction, causing failures

mutter (3.32.2+git20190711-1ubuntu1) eoan; urgency=medium

  * Merge with debian. Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr

mutter (3.32.2+git20190711-1) experimental; urgency=medium

  * New upstream snapshot up to commit ccab0f470
    - Fix No-input WM_TAKE_FOCUS dialogs causing GNOME Shell to hang
      and ensure we always have a window focused if we have a valid
      focus canididate (LP: #1834583)
    - Don't crash on shell close / reload under X11 when releasing
      surface actor display resources (LP: #1826918)
  * d/p/debian/Revert-meson-Bump-meson-requirement-to-0.50.0.patch:
    - Revert dependency on meson 0.50.0

mutter (3.32.2+git20190626-1ubuntu1~19.04.1) disco; urgency=medium

  * No-change backport from eoan to disco for SRU.

mutter (3.32.2+git20190626-1ubuntu1) eoan; urgency=medium

  * Merge with debian (LP: #1834493). Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintainer to ubuntu
    + debian/gbp.conf: update branch to point to ubuntu/master
    + debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      - X11: Add support for fractional scaling using Randr

mutter (3.32.2+git20190626-1) experimental; urgency=medium

  * New upstream snapshot release:
    - Don't crash when try to focus unfocusable windows (LP: #1791574)
    - Valgrind use-after-free warning fixes in the native backend
    - renderer/native: add missing eglTerminate in EGLDevice error path
    - Fix Alt+F2 -> restart to work again in X11
    - window: Emit an error and return when trying to activate an unmanaged
      (LP: #1827401)
    - Setting cursor to "none" doesn't hide it under Wayland
    - Fix broken selected text in entries
    - Tests memory fixes

mutter (3.32.2-1ubuntu1) eoan; urgency=medium

  * Merge with debian. Remaining changes:
    + debian/control:
      - Update VCS flags to point to launchpad
      - Update maintai...

Read more...

Changed in mutter (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Shaform (shaform) wrote :

Is this fixed in the current Ubuntu 19.10? I just installed Ubuntu 19.10 last week and I have encountered gnome freezing several times already. Not sure if it's the same issue as this one or should I file a new bug.

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

This specific issue has been fixed, in order to check what is yours you should help us to identify it by using gdb to connect to the process.

Can you provide us such feedback?

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.