You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#452 Appears to be causing interactive shell users to appear logged out to the system as soon as they sign in. This can be seen in the system logs, as well as checking the results of last and seeing that all user sign-ins last zero seconds. Because of this, user systemd services are also exiting, causing systemctl --user to throw the error Failed to connect to bus: Connection refused.
Reverting commit 03b52c7 makes the login work as expected.
I'm testing this with bash, but it may happen with other shells as well.
Check journalctl and note that the user is signed properly.
Run sudo nix-channel --update and sudo nixos-rebuild switch
Terminate the wsl instance.
Start the wsl instance
Check journalctl and note that the user is immediately signed out, even though the shell is still active.
To fix the issue, do a nixos build with commit 03b52c7 reverted and note that the user once again stays signed in properly.
Logs
The user getting logged out:
May 06 19:44:02 nixos systemd[286]: Starting D-Bus User Message Bus Socket...
May 06 19:44:02 nixos systemd[286]: Listening on D-Bus User Message Bus Socket.
May 06 19:44:02 nixos systemd[286]: Reached target Sockets.
May 06 19:44:02 nixos systemd[286]: Reached target Basic System.
May 06 19:44:02 nixos systemd[1]: Started User Manager for UID 1000.
May 06 19:44:02 nixos systemd[286]: Starting Run user-specific NixOS activation...
May 06 19:44:02 nixos systemd[1]: Started Session 104 of User <redacted>.
May 06 19:44:02 nixos login[280]: pam_unix(login:session): session closed for user <redacted>
May 06 19:44:02 nixos systemd[286]: Finished Run user-specific NixOS activation.
May 06 19:44:02 nixos systemd[286]: Reached target Main User Target.
May 06 19:44:02 nixos systemd[286]: Startup finished in 136ms.
May 06 19:44:02 nixos systemd-logind[271]: Session 104 logged out. Waiting for processes to exit.
May 06 19:44:02 nixos systemd[1]: session-104.scope: Deactivated successfully.
May 06 19:44:02 nixos systemd-logind[271]: Removed session 104.
May 06 19:44:12 nixos systemd[1]: Stopping User Manager for UID 1000...
May 06 19:44:12 nixos systemd[286]: Activating special unit Exit the Session...
May 06 19:44:12 nixos systemd[286]: Stopped target Main User Target.
May 06 19:44:12 nixos systemd[286]: Stopped target Basic System.
May 06 19:44:12 nixos systemd[286]: Stopped target Paths.
May 06 19:44:12 nixos systemd[286]: Stopped vscode-remote-workaround.path.
May 06 19:44:12 nixos systemd[286]: Stopped target Sockets.
May 06 19:44:12 nixos systemd[286]: Stopped target Timers.
May 06 19:44:12 nixos systemd[286]: Closed D-Bus User Message Bus Socket.
May 06 19:44:12 nixos systemd[286]: Removed slice User Application Slice.
May 06 19:44:12 nixos systemd[286]: Reached target Shutdown.
May 06 19:44:12 nixos systemd[286]: Finished Exit the Session.
May 06 19:44:12 nixos systemd[286]: Reached target Exit the Session.
May 06 19:44:12 nixos (sd-pam)[288]: pam_unix(systemd-user:session): session closed for user <redacted>
May 06 19:44:12 nixos systemd[1]: [email protected]: Failed to kill control group /user.slice/user-1000.slice/[email protected], ignoring: Input/output error
May 06 19:44:12 nixos systemd[1]: [email protected]: Deactivated successfully.
May 06 19:44:12 nixos systemd[1]: Stopped User Manager for UID 1000.
May 06 19:44:12 nixos systemd[1]: [email protected]: Consumed 126ms CPU time, read 4.6M from disk, written 0B to disk, no IP traffic.
May 06 19:35:57 nixos systemd[281]: Starting D-Bus User Message Bus Socket...
May 06 19:35:57 nixos systemd[281]: Listening on D-Bus User Message Bus Socket.
May 06 19:35:57 nixos systemd[281]: Reached target Sockets.
May 06 19:35:57 nixos systemd[281]: Reached target Basic System.
May 06 19:35:57 nixos systemd[1]: Started User Manager for UID 1000.
May 06 19:35:57 nixos systemd[281]: Starting Run user-specific NixOS activation...
May 06 19:35:57 nixos systemd[1]: Started Session 102 of User <redacted>.
May 06 19:35:57 nixos systemd[281]: Finished Run user-specific NixOS activation.
May 06 19:35:57 nixos systemd[281]: Reached target Main User Target.
May 06 19:35:57 nixos systemd[281]: Startup finished in 161ms.
Bug description
#452 Appears to be causing interactive shell users to appear logged out to the system as soon as they sign in. This can be seen in the system logs, as well as checking the results of
last
and seeing that all user sign-ins last zero seconds. Because of this, usersystemd
services are also exiting, causingsystemctl --user
to throw the errorFailed to connect to bus: Connection refused
.Reverting commit 03b52c7 makes the login work as expected.
I'm testing this with
bash
, but it may happen with other shells as well.To Reproduce
Steps to reproduce the behavior:
journalctl
and note that the user is signed properly.sudo nix-channel --update
andsudo nixos-rebuild switch
journalctl
and note that the user is immediately signed out, even though the shell is still active.To fix the issue, do a nixos build with commit 03b52c7 reverted and note that the user once again stays signed in properly.
Logs
The user getting logged out:
A normal login after reverting 03b52c7:
WSL version
The text was updated successfully, but these errors were encountered: