GNOME Bugzilla – Bug 775463
Don't add gnome-shell/mutter to the session saved state
Last modified: 2021-07-05 13:45:23 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.
<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
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.
+ Trace 236911
Thread 1 (Thread 0x7f8d61522a80 (LWP 25146))
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 ***
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?
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
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
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?
err why?
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.
(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.
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).
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).
^ this fixes the fail whale crash at least.
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
*** Bug 776675 has been marked as a duplicate of this bug. ***
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.