On a Bullseye host:
- Debootstrap a fresh Bookworm system
- Launch it in systemd-nspawn: sudo systemd-nspawn -b -D bookworm
- Type your login and password
- See the "message of the day"
- Exactly 2 minutes of nothing happening
- See the command prompt: user@machine:~$

The same happens if you log out and then log in again.

This does NOT happen on a Bookworm host.

I've tried running the same system in qemu, and this was stil happening,
but now I'm trying again, and it does not. I've even tried upgrading a
fresh Bullseye system to Bookworm - again, it happened a few days
before, but not anymore. So now the problem seems to be specific to a
container - maybe even systemd-container.



Here is the relevant journalctl part:

Jun 18 22:14:22 DEBIAN systemd[1]: Finished console-setup.service - Set
console font and keymap.
Jun 18 22:14:22 DEBIAN systemd[1]: Startup finished in 760ms.

(here, I'm taking a few seconds to log in)

Jun 18 22:14:36 DEBIAN login[109]: pam_unix(login:session): session
opened for user kami(uid=1000) by LOGIN(uid=0)
Jun 18 22:14:36 DEBIAN systemd-logind[106]: New session 987 of user kami.
Jun 18 22:14:36 DEBIAN systemd[1]: Created slice user-1000.slice - User
Slice of UID 1000.
Jun 18 22:14:36 DEBIAN systemd[1]: Starting
user-runtime-dir@1000.service - User Runtime Directory /run/user/1000...
Jun 18 22:14:36 DEBIAN systemd[1]: Finished
user-runtime-dir@1000.service - User Runtime Directory /run/user/1000.
Jun 18 22:14:36 DEBIAN systemd[1]: Starting user@1000.service - User
Manager for UID 1000...
Jun 18 22:14:36 DEBIAN (systemd)[223]: pam_unix(systemd-user:session):
session opened for user kami(uid=1000) by (uid=0)
Jun 18 22:14:36 DEBIAN (systemd)[223]:
pam_systemd(systemd-user:session): Runtime directory '/run/user/1000' is
not owned by UID 1000, as it should.
Jun 18 22:14:36 DEBIAN (systemd)[223]:
pam_systemd(systemd-user:session): Not setting $XDG_RUNTIME_DIR, as the
directory is not in order.
Jun 18 22:14:36 DEBIAN systemd[223]: Trying to run as user instance, but
$XDG_RUNTIME_DIR is not set.
Jun 18 22:14:36 DEBIAN systemd[1]: user@1000.service: Main process
exited, code=exited, status=1/FAILURE
Jun 18 22:14:36 DEBIAN (sd-pam)[224]: pam_unix(systemd-user:session):
session closed for user kami

(exactly 2 minutes of waiting, after MOTD, but before I get the prompt)

Jun 18 22:16:36 DEBIAN systemd[1]: user@1000.service: Processes still
around after SIGKILL. Ignoring.
Jun 18 22:16:36 DEBIAN systemd[1]: user@1000.service: Failed with result
'exit-code'.
Jun 18 22:16:36 DEBIAN systemd[1]: Failed to start user@1000.service -
User Manager for UID 1000.
Jun 18 22:16:36 DEBIAN systemd[1]: Started session-987.scope - Session
987 of User kami.
Jun 18 22:16:36 DEBIAN login[109]: pam_systemd(login:session): Runtime
directory '/run/user/1000' is not owned by UID 1000, as it should.
Jun 18 22:16:36 DEBIAN login[109]: pam_systemd(login:session): Not
setting $XDG_RUNTIME_DIR, as the directory is not in order.
Jun 18 22:16:46 DEBIAN sudo[229]:     kami : TTY=console ;
PWD=/home/kami ; USER=root ; COMMAND=/usr/bin/journalctl
Jun 18 22:16:46 DEBIAN sudo[229]: pam_unix(sudo:session): session opened
for user root(uid=0) by (uid=1000)

It's some systemd shenanigans again, isn't it?.. What could be the
reason, and is there a workaround?

Reply via email to