If $HOME (or any parent directory) takes too long to mount, for example because it is an autofs being fscked, pam_systemd will timeout and proceed to open the session without XDG_SESSION_ID (which will crash gnome-shell)
We nowadays set a very long timeout for the CreateSession() bus call (which is what pam_systemd ultimately calls), which should fix the issue. if you can reproduce on current git, please file a new bug on github.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.