Bug 1546059

Summary: Stack traces in journal
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: gjsAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.5CC: angystardust, briang, desktop-qa-list, fmuellner, jan.public, klember, lists, rstrode, tpelka, wchadwic
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://gitlab.gnome.org/GNOME/gjs/merge_requests/71
Whiteboard:
Fixed In Version: gjs-1.50.4-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1545659 Environment:
Last Closed: 2018-04-10 13:13:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1545659    
Bug Blocks:    
Attachments:
Description Flags
Avoid emitting critical warnings for finalized objects
none
object: only print stacktraces when debugging enabled none

Description Jiri Koten 2018-02-16 08:49:57 UTC
+++ This bug was initially created as a clone of Bug #1545659 +++

Description of problem:
Every time I open new window or close a window, there is a new stack trace of org.gnome.Shell.desktop in journal log and /var/log/messages. 
As this is a common task, these msgs spams system logs.

[snip]
org.gnome.Shell.desktop[1617]: == Stack trace for context 0xb25170 ==
org.gnome.Shell.desktop[1617]: #0       0xf5ec78 i   resource:///org/gnome/shell/ui/tweener.js:73 (0x7f611c1ddef0 @ 9)
org.gnome.Shell.desktop[1617]: #1       0xf5ebf8 i   resource:///org/gnome/shell/ui/tweener.js:105 (0x7f611c1df230 @ 36)
org.gnome.Shell.desktop[1617]: #2       0xf5eb70 i   resource:///org/gnome/shell/ui/tweener.js:92 (0x7f611c1df098 @ 52)
org.gnome.Shell.desktop[1617]: #3 0x7ffcac399610 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:203 (0x7f611c1e9cd0 @ 54)
org.gnome.Shell.desktop[1617]: #4 0x7ffcac399760 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:332 (0x7f611c1e9d58 @ 1626)
org.gnome.Shell.desktop[1617]: #5 0x7ffcac399810 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:345 (0x7f611c1e9de0 @ 100)
org.gnome.Shell.desktop[1617]: #6 0x7ffcac3998a0 b   resource:///org/gnome/gjs/modules/tweener/tweener.js:360 (0x7f611c1e9e68 @ 10)
org.gnome.Shell.desktop[1617]: #7 0x7ffcac399990 b   resource:///org/gnome/gjs/modules/signals.js:126 (0x7f611c1e2b38 @ 386)
org.gnome.Shell.desktop[1617]: #8 0x7ffcac399a40 b   resource:///org/gnome/shell/ui/tweener.js:208 (0x7f611c1df808 @ 159)
org.gnome.Shell.desktop[1617]: #9 0x7ffcac399aa0 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f611c1c2bc0 @ 71)
org.gnome.Shell.desktop[1617]: #10 0x7ffcac399aa0 I   resource:///org/gnome/shell/ui/tweener.js:183 (0x7f611c1df780 @ 20)
org.gnome.Shell.desktop[1617]: #11 0x7ffcac399b70 b   self-hosted:917 (0x7f611c1ee5e8 @ 394)

Version-Release number of selected component (if applicable):
gnome-shell-3.26.2-4.el7
gjs-1.50.4-3.el7
mutter-3.26.2-11.el7

How reproducible:
100%

Steps to Reproduce:
1. Open firefox
2. Open new window Ctrl-n
3. Close window
4. journalctl -b -a

Actual results:
Multiple Stack traces of gnome-shell

Expected results:
No stack traces

Additional info:

--- Additional comment from Jiri Koten on 2018-02-15 07:57:46 EST ---

And also when switching between windows.

gnome-shell[2518]: Object Shell.GenericContainer (0x536f450), has been already finalized. Impossible to set any property to it.
org.gnome.Shell.desktop[2518]: #9 0x7ffe80ee4110 I   resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7fddb05c2bc0 @ 71)
org.gnome.Shell.desktop[2518]: #10 0x7ffe80ee4110 I   resource:///org/gnome/shell/ui/tweener.js:183 (0x7fddb05df780 @ 20)
org.gnome.Shell.desktop[2518]: #11 0x7ffe80ee41e0 b   self-hosted:917 (0x7fddb05ee5e8 @ 394)


--- Additional comment from Jiri Koten on 2018-02-15 08:55:51 EST ---

It's caused by the gjs update to 1.50.4.

I'm not able to reproduce with gjs-1.50.2-3.el7.

Comment 3 Kalev Lember 2018-02-16 15:14:27 UTC
Let's fix this for 7.5 by patching out the traces from gjs and downgrading the g_criticals to g_debug, which still enables app writers to see the errors, but doesn't spam the system journal.

Comment 4 Kalev Lember 2018-02-16 15:38 UTC
Created attachment 1397088 [details]
Avoid emitting critical warnings for finalized objects

Here's a patch to the package file that does this -- attaching it here for reference. halfline was talking about keeping the gjs_dumpstack() calls as well, but doing it conditionally only when debugging is enabled, and if it works we'll probably go with that instead.

Comment 5 Ray Strode [halfline] 2018-02-16 19:28 UTC
Created attachment 1397147 [details]
object: only print stacktraces when debugging enabled

We have a bunch of corruption right now spamming the
log.

This commit gets rid of the spam unless G_MESSAGES_DEBUG
is set.

Comment 7 Whitney Chadwick 2018-02-16 20:56:05 UTC
Provided blocker "+" for tpelka

Comment 10 Jiri Koten 2018-02-19 14:26:42 UTC
I can confirm that stack traces for critical warnings are only printed when G_MESSAGES_DEBUG is set.

Comment 11 Christian Kujau 2018-02-20 08:00:13 UTC
This also happens in Fedora 27. Should I open a new bug or can the description be widened to be not RHEL specific?

$ rpm -q gjs gnome-shell
gjs-1.50.4-1.fc27.x86_64
gnome-shell-3.26.2-4.fc27.x86_64

Comment 12 Ray Strode [halfline] 2018-02-20 14:48:17 UTC
Christian, it's expected in Fedora at the moment.  The best thing you can do is file the traces you see upstream here:

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

so they can be fixed one by one !

Comment 15 errata-xmlrpc 2018-04-10 13:13:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0770