GNOME Bugzilla – Bug 788046
Crash on centos 7 when trying to run on Xvfb
Last modified: 2017-09-22 19:12:47 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
Created attachment 360259 [details] [review] loginManager: check that XDG_SESSION_ID exists
(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.
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 ...
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
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) ...
Can you get this backported so maybe it reaches rhel 7?