Unresponsive GUI and journal flooded with: JS ERROR: TypeError: null has no properties _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9

Bug #1880405 reported by besto
232
This bug affects 35 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
mutter (Debian)
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Focal
Fix Released
High
Marco Trevisan (Treviño)
Hirsute
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

[ Impact ]

Shell becomes slow and unresponsive flooding journal with JS errors

[ Test case ]

1. Resize the terminal to use half the screen (using CMD+LEFT)
2. switch it to fullscreen (F11) and back (F11)
3. Repeat this some number of times ensure we don't end up in a loop with
   100% CPU usage.
4. Ensure that it's still possible to get window focus and the UI is responsive.

[ Regression potential ]

Events are ignored for windows which are still visible.

---

O.k. it is an old Lenovo thinkpad T410. However, in 18.04, 19.04 and 19.10 I did face these problems. The sometimes I have to wait 10 seconds to see if a window reacts or not. It is hard to use.
  Installiert: 3.36.1-5ubuntu2
  Installationskandidat: 3.36.2-1ubuntu1~20.04.1
  Versionstabelle:
     3.36.2-1ubuntu1~20.04.1 500
        500 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
 *** 3.36.1-5ubuntu2 100
        100 /var/lib/dpkg/status
     3.36.1-5ubuntu1 500
        500 http://it.archive.ubuntu.com/ubuntu focal/main amd64 Packages

ProblemType: BugDistroRelease: Ubuntu 20.04
Package: gnome-shell 3.36.1-5ubuntu2
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME-Classic:GNOME
Date: Sun May 24 15:43:34 2020
DisplayManager: gdm3
InstallationDate: Installed on 2020-02-05 (109 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
RelatedPackageVersions: mutter-common 3.36.2-1ubuntu1~20.04.1SourcePackage: gnome-shell
UpgradeStatus: Upgraded to focal on 2020-05-08 (15 days ago)

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

It appears the problem is:

[123981.625765] bs1-ThinkPad-T410 gnome-shell[2226]: JS ERROR: TypeError: null has no properties
                                                    _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
[123981.625875] bs1-ThinkPad-T410 gnome-shell[2226]: JS ERROR: TypeError: null has no properties
                                                    _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
[123981.625998] bs1-ThinkPad-T410 gnome-shell[2226]: JS ERROR: TypeError: null has no properties
                                                    _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
importance: Undecided → High
summary: - Computer since upgrade from ubuntu 19.10 to 20.04 rediculisly slow.
- Process gnome-shell uses most capacity of CPU often followed by systemd-
- journal. Together often in the range of 90% capacity.
+ High CPU and journal flooded with: JS ERROR: TypeError: null has no
+ properties
+ _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: High CPU and journal flooded with: JS ERROR: TypeError: null has no properties _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
tags: added: performance
Revision history for this message
B[] (b-array) wrote :

Please push out a fix for this ASAP, once this tight loop is hit the machine becomes an unusable 100% CPU using mess. I know of several others suffering exactly the same bug.

For me this can be reproduced by having a terminal using half the screen (using CMD+LEFT), then switching to fullscreen (F11) and back (F11). Repeating this some number of times triggers this tight loop of 100% CPU usage. After that, it's difficult to get window focus and windows are slow to respond to anything.

To recover I use `killall -3 gnome-shell`, which allows Gnome to restart but then has the delightful affect of throwing windows around the screen randomly and forgetting there are multiple monitors.

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

There is no fix for this bug yet. If you would like to discuss it then please do so with the developers at:

  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2467

Changed in gnome-shell (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jerre Cope (jerre) wrote :

The

killall -3 gnome-shell

Does help recover more gracefully than a hard boot after 100% cpu. Thanks danbarry16!

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

^^^
Note the above command is only safe in Xorg sessions, NOT in Wayland sessions.

Revision history for this message
dan the person (dantheperson) wrote :

thanks Dan `killall -3 gnome-shell` keeps me sane. No longer need to reboot everyday.

tags: added: rls-ff-incoming
Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
tags: removed: rls-ff-incoming
tags: added: groovy
Revision history for this message
Steve Murphy (murf-parsetree) wrote :

I hope this helps: I see these errors in my syslog:

Nov 4 10:43:32 parse2 gnome-shell[4026701]: JS ERROR: TypeError: windowActor is null#012_addWindowEffect@resource:///org/gnome/shell/ui/closeDialog.js:90:28#012vfunc_show@resource:///org/gnome/shell/ui/closeDialog.js:162:14

Nov 4 11:17:38 parse2 gnome-shell[4026701]: message repeated 34072 times: [ JS ERROR: TypeError: null has no properties#012_onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9]

Nov 4 10:51:50 parse2 gnome-shell[11582]: [11584:11584:1104/105150.374036:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfme
jpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)

Yet More Info:
While it was running slow, I did a gcore, and it showed a single active thread (90% CPU) in the garbage collector. That may have nothing to do with this, but who knows...

gnome-shell: 3.36.4
Ubuntu 20.04
Hardware: 64g memory, 1Tb NVME drive, Asus ROG Strix GeForce RTX 2060, 4 Monitors
          Cores: 16 Threads: 32 AMD Ryzen 3950X
browser1 = brave tabs = 67
browser2 = firefox tabs= 64
various other windows Quake, rocketchat, Thunderbird, MATE terminal

Revision history for this message
rooijan (rrossouw) wrote :

Similar ERROR in /var/log/syslog for me on Ubuntu 20.10 with gnome-shell 3.38.1-1ubuntu1.1. Similar to comment #9 I have firefox with many tabs and dissenter (brave fork) with many tabs open.

Jan 4 06:43:29 desktop01 gnome-shell[2096000]: JS ERROR: TypeError: null has no properties#012_onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9

Jan 4 06:43:30 desktop01 gnome-shell[2096000]: message repeated 35862 times: [ JS ERROR: TypeError: null has no properties#012_onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9]

Jan 4 06:43:30 desktop01 gnome-shell[2096000]: JS ERROR: TypeError: windowActor is null#012_addWindowEffect@resource:///org/gnome/shell/ui/closeDialog.js:90:28#012vfunc_show@resource:///org/gnome/shell/ui/closeDialog.js:162:14

➜ ~ inxi -SMCG
System: Host: desktop01 Kernel: 5.8.0-33-generic x86_64 bits: 64 Desktop: N/A Distro: Ubuntu 20.10 (Groovy Gorilla)
Machine: Type: Desktop System: ASUS product: All Series v: N/A serial: <superuser/root required>
           Mobo: ASUSTeK model: X99-A v: Rev 1.xx serial: <superuser/root required> UEFI: American Megatrends v: 4101
           date: 07/10/2019
CPU: Info: 6-Core model: Intel Core i7-5820K bits: 64 type: MT MCP L2 cache: 15.0 MiB
           Speed: 1765 MHz min/max: 1200/3600 MHz Core speeds (MHz): 1: 1626 2: 1243 3: 1387 4: 1291 5: 1379 6: 1316 7: 1329
           8: 1300 9: 1288 10: 1247 11: 1356 12: 1282
Graphics: Device-1: NVIDIA GK208B [GeForce GT 710] driver: nvidia v: 455.38
           Display: x11 server: X.Org 1.20.9 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa resolution:
           1: 2560x1080~60Hz 2: 1680x1050~60Hz
           OpenGL: renderer: GeForce GT 710/PCIe/SSE2 v: 4.6.0 NVIDIA 455.38

summary: - High CPU and journal flooded with: JS ERROR: TypeError: null has no
- properties
+ Unresponsive GUI, sometimes high CPU, and journal flooded with: JS
+ ERROR: TypeError: null has no properties
_onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Unresponsive GUI, sometimes high CPU, and journal flooded with: JS ERROR: TypeError: null has no properties _onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9

A potential fix has been proposed upstream:

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

Changed in mutter (Ubuntu):
status: New → In Progress
importance: Undecided → High
Changed in mutter (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-3.38.4 fixed-upstream
Changed in gnome-shell (Ubuntu):
status: Triaged → Invalid
summary: - Unresponsive GUI, sometimes high CPU, and journal flooded with: JS
- ERROR: TypeError: null has no properties
+ Unresponsive GUI and journal flooded with: JS ERROR: TypeError: null has
+ no properties
_onFocusChanged@resource:///org/gnome/shell/ui/closeDialog.js:135:9
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

description: updated
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
tags: added: rls-ff-incoming
tags: added: fixed-in-3.36.9
no longer affects: gnome-shell (Ubuntu)
Changed in mutter (Ubuntu Hirsute):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Is the fix available in 20.04 LTS, or just 20.10 only?

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

Only in 21.04 at the moment.

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

The fix is coming in the future mutter 3.36.9 update.

Changed in mutter (Ubuntu Focal):
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter (Debian):
status: Unknown → Fix Released
Revision history for this message
Vadym K (hmvs) wrote :

Would be very nice if it will be available in 20.04 ubuntu. Very annoying issue :(

john reid (reidjr)
Changed in mutter (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

3.36.9-0ubuntu0.20.04.1 is still in proposed, so not yet released.

Monitor https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1919143 to also mark this as released.

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