Watch
0
0
Fork
You've already forked hyperhive
0

meta lock waiters keep their queue place; deadlines cover pin_agent git and kill the whole process group

This commit is contained in:
atlas 2026-10-20 00:23:39 +02:00 • committed by mara
commit 161dd8c44b
4 changed files with 138 additions and 51 deletions

View file

@ -358,12 +358,15 @@ Every public `meta.rs` operation takes the module's internal `META_LOCK`
mutex, so concurrent job-queue nodes never
race on the repo's `.git/index.lock`.
Each git or nix child `meta.rs` runs under `META_LOCK` has a deadline, so a hung
forge fetch fails the operation instead of holding the lock: 10 minutes for
`nix flake update`/`lock` and forge fetch/push, 2 minutes for local git. The error
names the command and the deadline, and the child dies with it. A caller waiting on
`META_LOCK` for over a minute logs a `meta_lock: still waiting` warning every
minute, naming its own operation and the holder's.
Each git or nix child under `META_LOCK` has a deadline, so a hung forge fetch
fails the operation instead of holding the lock: 10 minutes for
`nix flake update`/`lock` and forge fetch/push, 2 minutes for local git, including
the `rev-parse` and `show` reads `pin_agents` makes. The error names the command
and the deadline. Each child leads its own process group and the timeout
`SIGKILL`s the whole group, so a `git` or credential helper spawned by a hung
`nix` dies too. A caller waiting on `META_LOCK` for over a minute logs a
`meta_lock: still waiting` warning every minute, naming its own operation and
the holder's. Waiters keep their place in the lock's FIFO queue across warnings.
---