After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788046 - Crash on centos 7 when trying to run on Xvfb
Crash on centos 7 when trying to run on Xvfb
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-22 13:17 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2017-09-22 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginManager: check that XDG_SESSION_ID exists (2.09 KB, patch)
2017-09-22 13:28 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review
loginManager: Handle unset XDG_SESSION_ID more gracefully (1.25 KB, patch)
2017-09-22 16:19 UTC, Florian Müllner
committed Details | Review

Description Ignacio Casal Quinteiro (nacho) 2017-09-22 13:17:56 UTC
When running on centos 7 on a Xvfb display gnome shell crashes. Here is the output:

Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: JS WARNING: [resource:///org/gnome/shell/ui/extensionSystem.js 301]: octal literals and octal escape sequences are deprecated
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: JS WARNING: [resource:///org/gnome/shell/ui/extensionSystem.js 301]: octal literals and octal escape sequences are deprecated
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: JS WARNING: [resource:///org/gnome/shell/ui/extensionSystem.js 301]: octal literals and octal escape sequences are deprecated
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: JS WARNING: [resource:///org/gnome/shell/gdm/loginDialog.js 1027]: anonymous function does not always return a value
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: JS ERROR: Error: Argument 'string' (type utf8) may not be null
                                                                               _pack_variant@resource:///org/gnome/gjs/modules/overrides/GLib.js:104
                                                                               _pack_variant@resource:///org/gnome/gjs/modules/overrides/GLib.js:151
                                                                               @resource:///org/gnome/gjs/modules/overrides/GLib.js:261
                                                                               _proxyInvoker@resource:///org/gnome/gjs/modules/overrides/Gio.js:78
                                                                               _makeProxyMethod/<@resource:///org/gnome/gjs/modules/overrides/Gio.js:124
                                                                               LoginManagerSystemd<.getCurrentSessionProxy@resource:///org/gnome/shell/misc/loginManager.js:123
                                                                               wrapper@resource:///org/gnome/gjs/modules/lang.js:178
                                                                               ScreenShield<._init@resource:///org/gnome/shell/ui/screenShield.js:538
                                                                               wrapper@resource:///org/gnome/gjs/modules/lang.js:178
                                                                               _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110
                                                                               Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:213
                                                                               _initializeUI@resource:///org/gnome/shell/ui/main.js:167
                                                                               start@resource:///org/gnome/shell/ui/main.js:125
                                                                               @<main>:1
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-shell[12150]: Execution of main.js threw exception: JS_EvaluateScript() failed
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-session-binary[11904]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-session-binary[11904]: Unrecoverable failure in required component org.gnome.Shell.desktop
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-session[11904]: gnome-session-binary[11904]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
Sep 22 08:50:16 ip-172-31-4-164.eu-west-1.compute.internal gnome-session[11904]: gnome-session-binary[11904]: WARNING: App 'org.gnome.Shell.desktop' respawning too quickly



I guess I am missing something on my script that launches the gnome session but at the minimum should print an error and not crash
Comment 1 Ignacio Casal Quinteiro (nacho) 2017-09-22 13:28:29 UTC
Created attachment 360259 [details] [review]
loginManager: check that XDG_SESSION_ID exists
Comment 2 Ignacio Casal Quinteiro (nacho) 2017-09-22 13:29:10 UTC
(In reply to Ignacio Casal Quinteiro (nacho) from comment #1)
> Created attachment 360259 [details] [review] [review]
> loginManager: check that XDG_SESSION_ID exists

FWIW I have not tested it, nor I have no idea about javascript so it may be completely wrong.
Comment 3 Florian Müllner 2017-09-22 16:19:53 UTC
Created attachment 360274 [details] [review]
loginManager: Handle unset XDG_SESSION_ID more gracefully

(In reply to Ignacio Casal Quinteiro (nacho) from comment #2)
> it may be completely wrong.

No, it's not (style nits apart). Turns out I actually have an old almost identical patch sitting around locally - attaching that as I consider it slightly nicer stylistically ...
Comment 4 Rui Matos 2017-09-22 16:26:05 UTC
Review of attachment 360274 [details] [review]:

ok

::: js/misc/loginManager.js
@@ +122,3 @@
+        let sessionId = GLib.getenv('XDG_SESSION_ID');
+        if (!sessionId) {
+            log('getCurrentSessionProxy() called outside a user session.');

mentioning the env variable would make it easier for people hitting this to fix their setups
Comment 5 Florian Müllner 2017-09-22 16:49:33 UTC
Attachment 360274 [details] pushed as de4c0bd - loginManager: Handle unset XDG_SESSION_ID more gracefully

(In reply to Rui Matos from comment #4)
> mentioning the env variable would make it easier for people hitting this to
> fix their setups

Not sure, it's not that setting the variable to some random string would work (but added it to the message anyway) ...
Comment 6 Ignacio Casal Quinteiro (nacho) 2017-09-22 19:12:47 UTC
Can you get this backported so maybe it reaches rhel 7?