flake-update-cascade hangs on interactive extra-substituters prompt and can't be killed with Ctrl-C #143
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#143
Loading…
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?
Summary
flake-update-cascadeblocks indefinitely when a repo's flake declaresextra-substitutersinnixConfig, and the block cannot be interrupted with Ctrl-C — only^Z(job-control stop) escapes it.Reproduction
Run the cascade over a repo whose
flake.nixhasnixConfig.extra-substituters(observed with a cashudevkit repo advertisinghttps://cache.cashudevkit.org https://cashudevkit.cachix.org):Output stalls at:
Answering
ydoes not reliably continue; Ctrl-C is ignored; only Ctrl-Z stops the job:Root cause
Two stacked issues:
nix flake updateinvocation (dry-run branch and both execute branches) runs without--accept-flake-config. When a nested flake declaresextra-substituters, nix prompts(y/N)?and waits on the TTY.timeoutbreaks Ctrl-C. The update runs astimeout 120 nix flake update ....timeoutplaces nix in a separate process group, so the terminal's SIGINT (Ctrl-C) does not reach the nix process holding the prompt. Hence Ctrl-C is ignored and only SIGTSTP (Ctrl-Z) stops the job. The 120s timeout also never fires while blocked on stdin in practice, because the prompt keeps the pipeline alive.Suggested fix
--accept-flake-config(or setaccept-flake-config = true/ equivalent) on everynix flake updateinvocation so the tool runs non-interactively, consistent with its batch/cascade purpose.timeout --foreground(or</dev/null) so a stuck child is still interruptible and the timeout can actually fire.Impact
A single consuming repo with
extra-substitutersinnixConfigwedges the whole cascade, requiring^Zand manual cleanup. No data was corrupted in the observed run (all work-tree repos clean afterward), but the run aborts mid-cascade.