meta lock waiters keep their queue place; deadlines cover pin_agent git and kill the whole process group
This commit is contained in:
parent
7cde4e7b15
commit
161dd8c44b
4 changed files with 138 additions and 51 deletions
|
|
@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue