Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689146 - x11-wm/mutter-3.30.2-r2 freezes with multiple windows open
Summary: x11-wm/mutter-3.30.2-r2 freezes with multiple windows open
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-02 11:30 UTC by Jan Henke
Modified: 2019-08-19 16:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Stacktrace when gnome-shell is frozen (stacktrace.txt,81.41 KB, text/plain)
2019-07-04 17:49 UTC, Jan Henke
Details
Stacktrace of frozen gnome-session without patch 22 applied (stacktrace-patch22-disabled.txt,84.82 KB, text/plain)
2019-07-04 19:32 UTC, Jan Henke
Details
gdb-stacktrace unmodified mutter with debugsyms and sources (gdb-1788-gnome-shell-backtrace.txt,25.21 KB, text/plain)
2019-07-05 07:21 UTC, Kamil Kamiński
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Henke 2019-07-02 11:30:04 UTC
I have upgraded to testing (~amd64) mutter, but since then experiencing random freezes of the whole desktop whenever I use one of the JetBrains IDE with a several dialogue windows open (i.e. if I have a project opened, I go to the project settings and if I open the settings of a dependency, which opens another dialogue window, the wm simply freezes after a few seconds.

Unfortunately nothing works to get the WM to unfreeze, so I cannot access any terminal or TTY. Therefore I cannot pinpoint the cause right now, only the symptoms.

emerge --info
Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.1/desktop/gnome, gcc-8.3.0, glibc-2.29-r2, 4.19.52-gentoo x86_64)
=================================================================
System uname: Linux-4.19.52-gentoo-x86_64-Intel-R-_Core-TM-_i7-7820HQ_CPU_@_2.90GHz-with-gentoo-2.6
KiB Mem:    32708364 total,  27679888 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Tue, 02 Jul 2019 07:30:01 +0000
Head commit of repository gentoo: 7af322ba03dedd3967c52c790c99db1a2c89028b
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p7) 2.31.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r6::gentoo, 2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=native -ftree-vectorize -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXX="clang++"
CXXFLAGS="-march=native -ftree-vectorize -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de de_DE en en_GB"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aes alsa amd64 avx avx2 berkdb bluetooth bzip2 cairo cdda cdr clang cli client colord crypt cups cxx dbus dri dts dvd dvdr eds elogind emboss encode evo exif fam flac fma3 fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg kerberos lcms ldap libedit libnotify libsecret libtirpc mad mmx mmxext mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pic pie png policykit popcnt ppds pulseaudio qt5 readline sdl seccomp spell sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svg symlink system-llvm tcpd threads tiff tracker truetype udev udisks unicode upower usb vaapi vim-syntax vorbis vulkan wayland wxwidgets x264 xattr xcb xml xv xvid zeroconf zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de-DE en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="i965 intel iris nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Kamil Kamiński 2019-07-04 08:30:06 UTC
Same for me, JetBrains PhpStorm trying to unlock GPG card used for signing commits freezes UI completely under both Wayland and X11.

SIGKILLing gnome-shell helps to regain control, but still unable to unlock my gpg keys as every trial ends with freeze.
Comment 2 Mart Raudsepp gentoo-dev 2019-07-04 08:52:58 UTC
A backtrace into the freeze would be helpful, to narrow down which patch causes it, to find a follow-up fix easier.
Could be done from another computer with SSH, or maybe a VT switch would work in a X11 session (but not sure it won't muddle the current thread backtrace with a signal handler thread).
Or alternatively dropping some of the extra patches selectively to narrow it down. The extra patches in the r2 patchset, compared to -r1, are 0011, 0014, 0017 and onwards.
Comment 3 Kamil Kamiński 2019-07-04 09:13:06 UTC
My journalctl stays empty, there is also nothing in dmesg - mutter does not crash. The only reported error is:

lip 04 10:55:40 stacjonarka org.gnome.Shell.desktop[1791]: [2507:2507:0704/105540.472366:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command

But this happens before Jetbrains even started, not sure if during session startup, or gdm.

I'll go with disabling patches and report back.
Comment 4 Mart Raudsepp gentoo-dev 2019-07-04 11:12:08 UTC
If you disable all patches, it'll of course work. It's one of the extra patches added in -r2 that causes issues. So yeah, try to disable like half of the new ones, see if it's a problem then too, and so on. For backtrace, I meant that when it's frozen, one could attach a gdb to mutter/gnome-shell over SSH and get a "thread apply all by full" stacktrace; then I can figure out from there in which function it got stuck (probably a deadlock of some kind) and based on that hopefully narrow it down easier.

Knowing how to exactly reproduce would be good too - outside some IDE I don't have (can I get it easily without installing a java stack?).
Comment 5 Jan Henke 2019-07-04 17:49:37 UTC
Created attachment 581896 [details]
Stacktrace when gnome-shell is frozen
Comment 6 Jan Henke 2019-07-04 19:32:49 UTC
Created attachment 581898 [details]
Stacktrace of frozen gnome-session without patch 22 applied

New stacktrace without patch 22 being applied while building. Unfortunately this did not fix the issue.
Comment 7 Jan Henke 2019-07-04 19:52:11 UTC
Can this be an incarnation of upstream issue https://gitlab.gnome.org/GNOME/mutter/issues/660 ?
Comment 8 Jan Henke 2019-07-04 19:54:00 UTC
Possible upstream patch to address the issue: https://gitlab.gnome.org/GNOME/mutter/merge_requests/669
Comment 9 Kamil Kamiński 2019-07-05 07:21:27 UTC
Created attachment 581938 [details]
gdb-stacktrace unmodified mutter with debugsyms and sources

Attaching my stacktrace gathered on "debugsyms sources" gnome-shell/mutter.
Sources not modified, with all patches applied.

Thread 1 (Thread 0x7f30dd38a100 (LWP 1788)):
#0  0x00007f30e70481dc in get_default_focus_window (stack=stack@entry=0x55d9e1d42f50, not_this_one=not_this_one@entry=0x55d9e4055910, must_be_at_point=must_be_at_point@entry=0, root_x=root_x@entry=0, root_y=root_y@entry=0, workspace=0x55d9e1d5b120) at core/stack.c:1228
        l = 0x55d9e1a044c0
#1  0x00007f30e704842f in meta_stack_get_default_focus_window (stack=stack@entry=0x55d9e1d42f50, workspace=workspace@entry=0x55d9e1d5b120, not_this_one=not_this_one@entry=0x55d9e4055910) at core/stack.c:1253

Unfortunately, it isn't possible to simply apply upstream patch from MR 669 to our mutter.

I'll try building without patch #30 as it seems to modify code around focusing windows.

Is there fastest way than repacking patches and recalculating digest for ebuild?

Jetbrains IDEs are bundled with Java, no need to install anything, just download trial of IntelliJ IDEA, PhpStorm, PyCharm, Rubymine or anything from jetbrains website and click around project settings.
Comment 10 Kamil Kamiński 2019-07-05 07:40:11 UTC
Removed 0030-window-x11-Focus-the-default-window-with-delay-while.patch, recalculated Manifest, rebuilt, SIGKILLed gnome-shell and made commit, unlock gpg card, sign that commit, perfectly fine. My problem is fixed.

@Jan can you confirm it fixes your IDE too?
Comment 11 Jan Henke 2019-07-05 20:19:12 UTC
I can confirm, patch 0030 seems to cause this issues. Removing it makes the Java apps work again (patch 0022 seems unrelated).
Comment 12 Mart Raudsepp gentoo-dev 2019-07-06 07:26:25 UTC
I'll drop the whole patch series from 0022 until the end of origin/gnome-3-30 upstream patches until https://gitlab.gnome.org/GNOME/mutter/issues/660 solution is merged to gnome-3-30. Sorry for the trouble, but this problematic patchset got backported to stable releases by upstream and I didn't hit it on wayland and my programs.
Comment 13 Larry the Git Cow gentoo-dev 2019-07-06 07:36:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5c775b8c7d7113e7bcf927b23db1834ee8f50c

commit 8e5c775b8c7d7113e7bcf927b23db1834ee8f50c
Author:     Mart Raudsepp <leio@gentoo.org>
AuthorDate: 2019-07-06 07:31:57 +0000
Commit:     Mart Raudsepp <leio@gentoo.org>
CommitDate: 2019-07-06 07:36:15 +0000

    x11-wm/mutter: remove problematic patch series from new patchset
    
    A 9-10 commits patchset introduces issues to JetBrains IDE as per
    https://gitlab.gnome.org/GNOME/mutter/issues/660
    A specific commit is identified, but drop the whole merge to be
    safe (this reintroduces problems that the MR originally fixed).
    A follow-up patchset was also merged to the stable branch, so drop
    that as well, as its behaviour without the preceding patchset is
    not tested.
    
    Lots of the good stuff is still kept in the patchset over -r1.
    
    Closes: https://bugs.gentoo.org/689146
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Mart Raudsepp <leio@gentoo.org>

 x11-wm/mutter/Manifest                                             | 2 +-
 x11-wm/mutter/{mutter-3.30.2-r2.ebuild => mutter-3.30.2-r3.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 14 Mart Raudsepp gentoo-dev 2019-08-18 11:36:40 UTC
I've added x11-wm/mutter-3.30.2-r4 that adds back the problematic patches, but with the extra patchset on top that should fix it up for JetBrains and similar. Please give that a whirl if possible and report back, to be sure all is good now for the 3.30 series and we can stabilize that revision soon.
Comment 15 Jan Henke 2019-08-18 17:43:18 UTC
I just did a quick test of -r4 and it seemed to work. No freeze in JetBrains dialogues.
Comment 16 Kamil Kamiński 2019-08-18 21:14:50 UTC
+1, no freeze with my previous workflow
Comment 17 Mart Raudsepp gentoo-dev 2019-08-19 16:18:39 UTC
Thanks. Hopefully I remember to stabilize that -r4 at some point before 3.32 introduction and stabilization :)