nix-daemon fails to lookup dynamically allocated users #1029
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1029
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I have services that from dynamically allocated users (via systemd) make calls to the nix-daemon. Every once in a while nix-daemon starts denying access and logs that the uid is not allowed to connect.
I only ever configured the usernames as trusted, so if it cannot look up the username any more, then rip.
The stopping happens when I switch into a new generation.
Happens on multiple machines and the shared configuration is
DynamicUser=.Steps To Reproduce
DynamicUser=Expected behavior
Looking up transient users that systemd creates should be reliable.
nix --versionoutputnix (Lix, like Nix) 2.91.3
Additional context
probably a glibc bug. glibc caches nscd failure, so once nscd is unavailable when the daemon wants to ask it something it'll never retry. there's nothing we can about this (that we know of), but lix head will not be affected by this since it runs these specific queries in a subprocess
But probably not before 2.94.0, so not the default lix in 25.11, right?
that change is only in 2.94 so far, but we could probably backport that specific change to 2.93. not sure it's a great idea though since it does change how daemons are launched :/
not sure we'll get to actually doing this. it may make sense to add systemd ordering constraint to the daemon/nscd link to mitigate this in the meantime
I can mitigate this on my own until 2.94.0, no biggie.