-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DynamicUser services can not access dbus since systemd 255 #297756
Comments
Could you run with log level set to debug? |
|
FWIW, this seems to work for me. I'm using dbus-broker, which might make a difference. $ sudo systemd-run -E SYSTEMD_LOG_LEVEL=debug -p DynamicUser=1 --collect --pty systemctl is-system-running
Running as unit: run-u47.service
Press ^] three times within 1s to disconnect TTY.
Cannot stat /proc/1/root: Permission denied
Bus n/a: changing state UNSET → OPENING
sd-bus: starting bus by connecting to /run/dbus/system_bus_socket...
Bus n/a: changing state OPENING → AUTHENTICATING
Bus n/a: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
Got message type=method_return sender=org.freedesktop.DBus destination=:1.48 path=n/a interface=n/a member=n/a cookie=4294967295 reply_cookie=1 signature=s error-name=n/a error-message=n/a
Bus n/a: changing state HELLO → RUNNING
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1 interface=org.freedesktop.DBus.Properties member=Get cookie=2 reply_cookie=0 signature=ss error-name=n/a error-message=n/a
Got message type=method_return sender=:1.3 destination=:1.48 path=n/a interface=n/a member=n/a cookie=6177 reply_cookie=2 signature=v error-name=n/a error-message=n/a
running
Bus n/a: changing state RUNNING → CLOSED
$ init --version
systemd 255 (255.2)
+PAM +AUDIT -SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK -XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified |
Peeking at the dbus NixOS module, It's also still trying to talk to nsncd, in addition of having a (possibly outdated) nssModules path set. I'm currently working on teaching nsncd socket activation, I think I want to move it to DefaultDependencies=no land and start it alongside dbus-broker, hopefully alleviating some of the issues. |
Apparently there's other regressions with the switch to dbus-broker too, I opened a PR with a revert for now in #307731. |
Which ones? There is one other issue open where we have no logs and no reproducer. |
Given the other comments here (particularly #297756 (comment)) and from testing on my system, this is actually fixed by dbus-broker. |
Not sure if this is related, but I started seeing the same symptom after an automatic update this morning from 24.05.5562.1bfbbbe5bbf8 to 24.05.5596.d51c28603def:
It looks like not much changed so I don’t understand why this suddenly started happening. Switching to dbus-broker made it start working again: Cannot stat /proc/1/root: No such file or directory
Failed to check if we're running in chroot, assuming not: Function not implemented
Bus n/a: changing state UNSET → OPENING
sd-bus: starting bus by connecting to /run/dbus/system_bus_socket...
Bus n/a: changing state OPENING → AUTHENTICATING
Showing one /org/freedesktop/systemd1/unit/example_2eservice
Bus n/a: changing state AUTHENTICATING → HELLO
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 s>
-Bus n/a: changing state HELLO → CLOSING
+Bus n/a: changing state HELLO → RUNNING
-Failed to get properties: Transport endpoint is not connected
+Got message type=method_return sender=org.freedesktop.DBus destination=:1.31 path=n/a interface=n/a member=n/a cookie=5107905569 reply_cookie=1 signature=s error-name=n/>
+Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 path=/org/freedesktop/systemd1/unit/example_2eservice interface=org.freedesktop.DBus.P>
+Got message type=method_return sender=:1.4 destination=:1.31 path=n/a interface=n/a member=n/a cookie=2769 reply_cookie=2 signature=a{sv} error-name=n/a error-message=n/a
-Bus n/a: changing state CLOSING → CLOSED
+Bus n/a: changing state RUNNING → CLOSED |
there is an issue with DynamicUser services accessing dbus since systemd 255 was merged
old:
new:
@NixOS/systemd
The text was updated successfully, but these errors were encountered: