NixOS / NixOS/nixpkgs

nixos/systemd: 257.7 -> 257.8 update fails to start `systemd-hostnamed.socket`; breaking hostname resolution over varlink

Open
#449,092 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0.kind: bug 2.status: stale 6.topic: nixos
Dominant language
Nix
Stars
26.2k
Forks
20.1k
PR merge metrics
PR metrics pending

Description

Nixpkgs version
  • Unstable (25.11)
Describe the bug

When updating systemd versions, systemd-hostnamed.socket fails to start.

I think the problem here is that systemd-hostname.service is both socket-activated for varlink as well as dbus-activated for dbus.

  1. systemd-hostnamed.service and systemd-hostnamed.socket is stopped
  2. hostname request comes in through dbus; restarting systemd-hostnamed.service
  3. systemd-hostnamed.socket fails to come up
Steps to reproduce

Do a nixos-rebuild switch whilst also doing a hostname resolution at the same time.

Expected behaviour

This I don't know. but it's an annoying bug.

Screenshots

No response

Relevant log output
$ sudo nixos-rebuild switch --flake . 
warning: Git tree '/home/arian/Projects/nixos-stuff' is dirty
building the system configuration...
warning: Git tree '/home/arian/Projects/nixos-stuff' is dirty
updating systemd-boot from 257.7 to 257.8
Copied "/nix/store/psk3q50fzri1v50qigq5ffbmkcw67d1h-systemd-257.8/lib/systemd/boot/efi/systemd-bootaa64.efi" to "/boot/EFI/systemd/systemd-bootaa64.efi".
Copied "/nix/store/psk3q50fzri1v50qigq5ffbmkcw67d1h-systemd-257.8/lib/systemd/boot/efi/systemd-bootaa64.efi" to "/boot/EFI/BOOT/BOOTAA64.EFI".
Skipping "/boot/EFI/BOOT/BOOTAA64.EFI", same boot loader version in place already.
stopping the following units: alertmanager.service, cgroup-exporter.service, kmod-static-nodes.service, logrotate-checkconf.service, nscd.service, prometheus-node-exporter.service, prometheus-smartctl-exporter.service, prometheus-systemd-exporter.service, prometheus.service, spire-agent.service, spire-agent.socket, spire-controller-manager.service, spire-server-local.socket, spire-server.service, spire-server.socket, systemd-growfs-root.service, systemd-hostnamed.service, systemd-hostnamed.socket, systemd-modules-load.service, systemd-networkd-wait-online.service, systemd-oomd.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-vconsole-setup.service, yggdrasil-persistent-keys.service, yggdrasil.service
NOT restarting the following changed units: getty@tty1.service, serial-getty@ttyAMA0.service, systemd-fsck@dev-disk-by\x2ddiskseq-9\x2dpart1.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-update-utmp.service, systemd-user-sessions.service, user-runtime-dir@1000.service, user@1000.service
activating the configuration...
bcache-tools: 1.0.8 → 1.1, +76.8 KiB
bind: 9.20.11 → 9.20.13
boost: ∅ → 1.87.0, +16203.7 KiB
btop: 1.4.4 → 1.4.5
btrfs-progs: 6.15 → 6.16
c-grammar-neovim: 0.11.3 → 0.11.4, -11.3 KiB
chroot-realpath: 0.1.0 → ∅, -655.7 KiB
cryptsetup: 2.8.0 → 2.8.1, +19.0 KiB
fuse: 3.17.2 → 3.17.4
fzf: 0.65.1 → 0.65.2, +67.5 KiB
git: 2.50.1 → 2.51.0, +15.3 KiB
glib: 2.84.3 → 2.84.4, +776.5 KiB
go: 1.24.6 → 1.25.0, -51414.7 KiB
icu4c: ∅ → 76.1, +39284.5 KiB
initrd: ∅ → ε
initrd-linux: 6.12.44 → 6.12.50, -112.7 KiB
iproute2: 6.15.0 → 6.16.0
kbd: 2.8.0 → 2.8.0-unstable-2025-08-12, +120.4 KiB
kitty: 0.42.2 → 0.43.1
krb5: 1.21.3 → 1.22.1
libICE: 1.1.2 → ∅, -148.9 KiB
libSM: 1.2.6 → ∅, -74.2 KiB
libXmu: 1.2.1 → ∅, -226.7 KiB
libXt: 1.3.1 → ∅, -520.0 KiB
libbpf: 1.6.1 → 1.6.2
libice: ∅ → 1.1.2, +147.8 KiB
libsm: ∅ → 1.2.6, +73.8 KiB
libxmu: ∅ → 1.2.1, +224.8 KiB
libxt: ∅ → 1.3.1, +516.5 KiB
linux: 6.12.44, 6.12.44-modules → 6.12.50, 6.12.50-modules, +104.8 KiB
lua-grammar-neovim: 0.11.3 → 0.11.4
markdown-grammar-neovim: 0.11.3 → 0.11.4
markdown_inline-grammar-neovim: 0.11.3 → 0.11.4
neovim: 0.11.3 → 0.11.4
neovim-unwrapped: 0.11.3 → 0.11.4, +49.3 KiB
nix: 2.28.4 → 2.28.5
nix-cmd: ∅ → 2.30.3, +886.0 KiB
nix-expr: ∅ → 2.30.3, +2483.8 KiB
nix-fetchers: ∅ → 2.30.3, +1182.3 KiB
nix-flake: ∅ → 2.30.3, +859.2 KiB
nix-main: ∅ → 2.30.3, +330.4 KiB
nix-store: ∅ → 2.30.3, +4269.1 KiB
nix-util: ∅ → 2.30.3, +1767.5 KiB
nixd: 2.6.4 → 2.7.0, +146.3 KiB
nixf: 2.6.4 → 2.7.0
nixfmt: 1.0.0 → 1.0.1
nixos-system-altra: 25.11.20250831.37ff64b → 25.11.20251005.d7f52a7
nixt: 2.6.4 → 2.7.0, -153.9 KiB
nss-cacert: 3.114, 3.114-p11kit → 3.115, 3.115-p11kit
passt: 2025_08_05.309eefd → 2025_09_11.6cbcccc
perl5.40.0-Crypt-URandom: 0.39 → 0.54, +71.0 KiB
perl5.40.0-Digest-HMAC: 1.04 → 1.05
perl5.40.0-File-BaseDir: ∅ → 0.09, +18.9 KiB
perl5.40.0-File-DesktopEntry: ∅ → 0.22, +27.2 KiB
perl5.40.0-File-MimeInfo: ∅ → 0.33, +78.6 KiB
perl5.40.0-IPC-System-Simple: ∅ → 1.30, +36.5 KiB
perl5.40.0-Net-DBus: ∅ → 1.2.0, +478.2 KiB
perl5.40.0-X11-Protocol: ∅ → 0.56, +244.4 KiB
perl5.40.0-XML-Parser: ∅ → 2.46, +481.7 KiB
perl5.40.0-XML-Twig: ∅ → 3.52, +502.7 KiB
prometheus: 3.5.0 → 3.6.0, -1828.0 KiB
python3: 3.13.6 → 3.13.7, +67.5 KiB
python3.13-pynvim: 0.5.2 → 0.6.0, +9.5 KiB
query-grammar-neovim: 0.11.3 → 0.11.4
s2n-tls: 1.5.23 → 1.5.24
spire: 1.12.4 → 1.13.0, -3927.0 KiB
systemd: 257.7 → 257.8, +109.7 KiB
systemd-minimal: 257.7 → 257.8, -15.4 KiB
systemd-minimal-libs: 257.7 → 257.8
tailscale: 1.86.4 → 1.86.5, -727.8 KiB
tbb: 2021.12.0 → 2022.2.0
unit: 10-foo.link → 80-x550.link
unit-script-initrd-find-nixos-closure: ε → ∅
vim: 9.1.1566 → 9.1.1623, +32.6 KiB
vim-grammar-neovim: 0.11.3 → 0.11.4
vimdoc-grammar-neovim: 0.11.3 → 0.11.4
vimplugin-fzf: 0.65.1 → 0.65.2
vimplugin-fzf.vim: 2025-06-20 → 2025-09-03
vimplugin-nerdtree: 2024-07-20 → 2025-09-26
vimplugin-nvim-lspconfig: 2025-08-29 → 2025-10-01, +20.4 KiB
w3m: 0.5.3+git20230121 → 0.5.5
wayland: ∅ → 1.24.0, +447.8 KiB
wl-clipboard: ∅ → 2.2.1, +192.1 KiB
xdg-user-dirs: ∅ → 0.18, +237.8 KiB
xdg-utils: ∅ → 1.2.1, +385.9 KiB
zlib-ng: 2.2.4 → 2.2.5
setting up /etc...
removing obsolete symlink ‘/etc/systemd/network/10-foo.link’...
restarting systemd...
reloading user units for arian...
restarting sysinit-reactivation.target
reloading the following units: dbus.service, firewall.service, reload-systemd-vconsole-setup.service
restarting the following units: nix-daemon.service, sshd.service, systemd-journald.service, systemd-networkd.service, systemd-resolved.service, systemd-udevd.service, tailscaled.service
starting the following units: alertmanager.service, cgroup-exporter.service, kmod-static-nodes.service, logrotate-checkconf.service, nscd.service, prometheus-node-exporter.service, prometheus-smartctl-exporter.service, prometheus-systemd-exporter.service, prometheus.service, spire-agent.socket, spire-controller-manager.service, spire-server-local.socket, spire-server.socket, systemd-growfs-root.service, systemd-hostnamed.socket, systemd-modules-load.service, systemd-networkd-wait-online.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-resetup.service, systemd-vconsole-setup.service, yggdrasil-persistent-keys.service, yggdrasil.service
Failed to start systemd-hostnamed.socket
Command 'systemd-run -E LOCALE_ARCHIVE -E NIXOS_INSTALL_BOOTLOADER --collect --no-ask-password --pipe --quiet --service-type=exec --unit=nixos-rebuild-switch-to-configuration /nix/store/9pvds3pqng3scq1vay0jfqi0yc9hf4nl-nixos-system-altra-25.11.20251005.d7f52a7/bin/switch-to-configuration switch' returned non-zero exit status 4.
Additional context

No response

System metadata
  • system: "aarch64-linux"
  • host os: Linux 6.12.44, NixOS, 25.11 (Xantusia), 25.11.20251005.d7f52a7
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Lix, like Nix) 2.93.3 System type: aarch64-linux Additional system types: Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/arian/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/arian/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/arian/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/arian/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/2p8fs45sr7b8ik0wg8r48csn7vb51yhk-lix-2.93.3/share
  • channels(root): "nixos"
  • nixpkgs: /nix/store/ybmnblw90230yl4p0l18ghwx9ry597bz-source
Notify maintainers

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs
Is this issue important to you?

Add a 👍 reaction to issues you find important.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported nixos-rebuild switch reproduction and inspect the systemd-hostnamed.service and systemd-hostnamed.socket activation sequence in the log. Determine why the socket fails when hostname resolution occurs during the systemd 257.7 to 257.8 update. Done means the switch completes successfully, the socket starts, and hostname resolution continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.