You signed in with anot
8000
her tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pynixd: a client that hangs up cancels a shared build future for every other request #15
A client that hangs up fails every other request that waits for the same build. The other request gets RuntimeError: goal child did not record a result, and its client gets an error for a build that was still running.
Cause.BuildDerivationGoal._wait_within_my_limits (pynixd/goals/build_derivation.py) does return await future in its two early returns. That future is the one BuildQueue.enqueue shares between every request that dedups onto the build. When the hung-up request is torn down, GoalEngine.reap cancels its goals. asyncio then cancels the awaited future too, and so the build is cancelled for every holder. The loop further down in the same method already avoids this with asyncio.wait, and its comment states the rule.
The other request's build goal then ends in CancelledError. ExecutionGoal.run_children runs each child in an anyio task group. anyio treats a child that ends cancelled as cancelled, not failed, so the group exits clean, the slot keeps _MISSING, and goal.py:120 raises.
Seen twice on dynhetz, 2026-10-18 (UTC), pynixd /nix/store/09hbrqjapvlkzhyvdvc21pgwjzf94m4m-pynixd-0.1.0:
17:04:40.383 client_hung_up {"op":"BuildPaths","op_seconds":2.208}
17:04:40.387 handle_op_error BuildPaths -> RuntimeError: goal child did not record a result
17:30:28.098 client_hung_up {"op":"BuildPaths","op_seconds":958.762}
17:30:28.098 client_hung_up {"op":"BuildPaths","op_seconds":953.391}
17:30:28.114 build_cancelled 15934..15941 "no goal waits for it"
17:30:29.092 handle_op_error BuildPaths -> RuntimeError: goal child did not record a result
The 17:30 traceback ends in dependencies.py:30 -> goal.py:120run_children, under ensure.py:1224_realise_input_derivations.
Fix:await asyncio.shield(future) at both early returns, the primitive that _the_result_unless_it_stops already uses for the same reason.
Activity
fix(pynixd): let a reaped request leave a shared build to the others
flake: bump nixidae-pynixd to 7f00b3cc
pynixd: a queued build answers through an Answer, not an asyncio future
pynixd: a queued build answers through an Answer, not an asyncio future
Run nixpkgs' own php-fpm service unmodified
Run nixpkgs' own php-fpm service unmodified