Description
Migrated from SergioDemianLerner/rustock#32 (pull request by @SDL-A1, 2026-09-21).
Merged: yes. The commits are already in this repository's history.
Original: SergioDemianLerner/rustock#32
test_pipeline_exec_failure_halts failed about five runs in eight. test_pipeline_depth_capped_at_one_ahead shared the same race but would have hung rather than failed, so it was never noticed.
The race
ExecController signals completion from inside the execution closure, so wait_completed returns before the closure returns and before the spawn_blocking JoinHandle is marked finished. poll_execution skips a job whose handle is not finished, so the single on_tick that followed reaped nothing — and none of the reap's effects were visible. The parked batch was still parked, which is exactly what the assertion reported.
Why this is a test fix and not a production one
Nothing is wrong with the production path: it ticks on a timer and reaps on whichever tick comes after the handle settles. Only a test that asserts on the reap has to wait for it, which is what await_reapable_execution_for_test does — with a deadline, so that a job which is genuinely blocked fails saying so rather than hanging.
Testing
- 40/40 consecutive runs of
test_pipeline_exec_failure_haltspass (previously ~5-in-8 failing). - 8/8 consecutive runs of the whole 122-test crate pass.
Unrelated: /tmp exhaustion on the build host
Worth recording, because it produced failures that look like flakiness but are not. Running the full crate in parallel also showed 3–6 failures per run with No space left on device — /tmp is a 3.8 GB tmpfs and was 97% full. tempfile only cleans up on a normal Drop, so every killed cargo test run leaks its RocksDB temp directories; roughly 2,200 had accumulated, some dating back ten days. That is an environment problem rather than anything in this repo, but it will keep causing spurious RocksDB failures in anyone's test run until the stale directories are cleared.
🤖 Generated with Claude Code
Activity