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 775463 - Don't add gnome-shell/mutter to the session saved state
Don't add gnome-shell/mutter to the session saved state
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Wayland
: 776675 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-12-01 12:39 UTC by Kamil Páral
Modified: 2021-07-05 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fail-whale: handle X server dying before startup (3.17 KB, patch)
2017-05-30 16:58 UTC, Ray Strode [halfline]
committed Details | Review

Description Kamil Páral 2016-12-01 12:39:38 UTC
If you have "org.gnome.SessionManager auto-save-session" set to true (which can be a remnant of past GNOME releases, where you could have configured this setting in a GUI), every second login fails (this is almost precise).

This can be trivially reproduced with a clean installation (I tested in a Fedora 25 VM), or even using a Live image (like Fedora 25 Workstation Live).

The problem has been described in length in here:
https://bugzilla.redhat.com/show_bug.cgi?id=1384508
It also contains a backtrace and logs.
Comment 1 Kamil Páral 2016-12-01 12:49:55 UTC
<mcatanzaro> kparal: So the bad news is there are actually two separate bugs there, and the bug we have a stacktrace for is only a consequence of some other gnome-session bug
<mcatanzaro> kparal: That's a crash in gnome-session-failed... which only gets run if gnome-session has to quit unexpectedly
Comment 2 Bastien Nocera 2016-12-01 13:17:03 UTC
Backtrace:
[New LWP 25146]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/libexec/gnome-session-failed --allow-logout'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 1 (Thread 0x7f8d61522a80 (LWP 25146))

  • #0 _gtk_style_provider_private_get_settings
    at gtkstyleproviderprivate.c line 123
  • #1 gtk_css_value_initial_compute
    at gtkcssinitialvalue.c line 52
  • #2 gtk_css_static_style_compute_value
    at gtkcssstaticstyle.c line 237
  • #3 _gtk_css_lookup_resolve
    at gtkcsslookup.c line 122
  • #4 gtk_css_static_style_new_compute
    at gtkcssstaticstyle.c line 195
  • #5 gtk_css_static_style_get_default
    at gtkcssstaticstyle.c line 164
  • #6 gtk_css_node_init
    at gtkcssnode.c line 663
  • #7 g_type_create_instance
    at gtype.c line 1860
  • #8 g_object_new_internal
    at gobject.c line 1783
  • #9 g_object_newv
    at gobject.c line 1930
  • #10 g_object_new
    at gobject.c line 1623
  • #11 gtk_css_widget_node_new
    at gtkcsswidgetnode.c line 301
  • #12 gtk_widget_init
    at gtkwidget.c line 4407
  • #13 g_type_create_instance
    at gtype.c line 1860
  • #14 g_object_new_internal
    at gobject.c line 1783
  • #15 g_object_newv
    at gobject.c line 1930
  • #16 g_object_new
    at gobject.c line 1623
  • #17 main
    at gsm-fail-whale-dialog.c line 382

Comment 3 Bastien Nocera 2016-12-01 13:18:04 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 775337 ***
Comment 4 Bastien Nocera 2016-12-01 13:24:02 UTC
Reopening as the bug was opened specifically about the setting not working. The backtrace is the consequence of gnome-shell or gnome-session going away. Can you please check in your journal logs which it is, and if there's any relevant information?
Comment 5 Kamil Páral 2016-12-01 13:26:33 UTC
I don't really care about the setting working or not, but I don't want every second login attempt failed :-)

The journal during login attempts is here:
https://bugzilla.redhat.com/attachment.cgi?id=1225459
Comment 6 Kamil Páral 2016-12-01 13:39:59 UTC
Thanks to hadess's help, we found that .config/gnome-session/saved-session/ is populated on logout, and it causes the next login to fail. When the login fails, it clears the state. Which explains why every *second* login fails.

In my clean F25 VM where I can easily reproduce the issue, only one item is created on logout:

$ ls .config/gnome-session/saved-session/
org.gnome.Shell.desktop

The file contents is:

[Desktop Entry]
Name=gnome-shell
Comment=Client 1030f58b5049d29ca3148059935334560800000032530000 which was automatically saved
Icon=system-run
Type=Application
StartupNotify=true
X-GNOME-Autostart-startup-id=1030f58b5049d29ca3148059935334560800000032530000
Exec=gnome-shell --sm-client-id 1030f58b5049d29ca3148059935334560800000032530000
X-GNOME-Autostart-discard-exec=rm -f /home/kparal/.config/mutter/sessions/1030f58b5049d29ca3148059935334560800000032530000.ms
Comment 7 Bastien Nocera 2016-12-01 13:43:31 UTC
Retitling the bug and reassigning.

Either gnome-session needs not to save it, or gnome-shell (mutter in this case) needs to not offer xsmp client support.

Mutter maintainers?
Comment 8 Ray Strode [halfline] 2016-12-01 15:15:38 UTC
err why?
Comment 9 Ray Strode [halfline] 2016-12-01 15:16:58 UTC
to be clear, is mutter crashing when trying to restore state ? window manager performs a special role in the whole xsmp dance, without it other xsmp clients won't restore correctly.
Comment 10 Bastien Nocera 2016-12-01 15:39:23 UTC
(In reply to Ray Strode [halfline] from comment #9)
> to be clear, is mutter crashing when trying to restore state ? window
> manager performs a special role in the whole xsmp dance, without it other
> xsmp clients won't restore correctly.

Mutter/gnome-shell is crashing during the session restoration. I'm really not sure this plays well with a Wayland session, and the different ordering.

Anyway, I don't have great knowledge of XSMP on the server side, so I shouldn't be advising particular solutions to this problem. The problem is that gnome-settings-daemon is started, as per the session file, even though gnome-shell isn't started (yet?). This only happens when gnome-shell is saved in the session.
Comment 11 Bastien Nocera 2016-12-01 16:43:45 UTC
The missing comment (in another tab...):

lis 28 20:47:30 kraken gnome-settings-[6706]: Unable to initialize GTK+
lis 28 20:47:30 kraken gnome-session[6686]: gnome-session-binary[6686]: WARNING: App 'gnome-settings-daemon.desktop' exited with code 1
lis 28 20:47:30 kraken gnome-session-binary[6686]: WARNING: App 'gnome-settings-daemon.desktop' exited with code 1

gnome-settings-daemon can't init GTK+. I think that's because gnome-session is trying to start the applications in the saved state too early (earlier than gnome-shell).
Comment 12 Ray Strode [halfline] 2017-05-30 16:58:30 UTC
Created attachment 352892 [details] [review]
fail-whale: handle X server dying before startup

This commit deals with gtk_init_with_args failing,
without setting an error (which it does if it can't
connect to the X server).
Comment 13 Ray Strode [halfline] 2017-05-30 16:59:24 UTC
^ this fixes the fail whale crash at least.
Comment 14 Ray Strode [halfline] 2017-06-20 18:05:42 UTC
Comment on attachment 352892 [details] [review]
fail-whale: handle X server dying before startup

Attachment 352892 [details] pushed as 15e0023 - fail-whale: handle X server dying before startup
Comment 15 Ray Strode [halfline] 2017-11-13 21:16:15 UTC
*** Bug 776675 has been marked as a duplicate of this bug. ***
Comment 16 GNOME Infrastructure Team 2021-07-05 13:45:23 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.