Commit 9f462bf
fix:
`ParallelExecutor._wait_for_co_outputs` had the primary block on every
co-output of its cmd, drawn from `_cmd_artifact_paths[cmd]` which
spans **all** artifacts across all levels. If a co-output was scheduled
for a later level, its `_execute_artifact` hadn't been called yet, its
`_dvc_done_events[co_path]` could never be set, and the primary parked
on `Event.wait()` forever. Main thread parked in `as_completed`
waiting for the primary's future. Deadlock; the pool ran to timeout.
Concrete failure mode: hudcostreets/path's `path-data months` produces
8 co-outputs — 6 land in Level 1 (they share the same per-year `.pqt`
deps as the primary `www/public/all.pqt`) but 2 land in Level 2
(`data/all.pqt` + `data/all.xlsx`, whose `.dvc` deps reference the
`data/*.pqt` outputs). The `path-data` daily-updater GHA has hung at
its 6h timeout every day since 2026-06-20 as a result.
Fix: track `_scheduled_paths` — a set populated at the start of each
`_execute_level` with that level's paths. `_wait_for_co_outputs`
filters `_cmd_artifact_paths[cmd]` down to co-outputs already in
`_scheduled_paths`, so cross-level entries are silently skipped.
Their .dvcs still get written when their own level runs (via
`_handle_co_output`); the primary just doesn't wait for them.
`test_cross_level_co_output_does_not_deadlock` sets up A (Level 1) +
B (Level 2, depends on A) sharing a cmd, runs the executor in a
thread, and asserts `t.join(timeout=15)` returns. Without the fix
it deadlocks and hits the 15s timeout; with it, both artifacts
complete cleanly.
Full suite: 238 passed, 4 skipped (S3 integration). No regressions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>_wait_for_co_outputs skips cross-level co-outputs1 parent 09ba612 commit 9f462bf
2 files changed
Lines changed: 77 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| |||
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| |||
686 | 697 | | |
687 | 698 | | |
688 | 699 | | |
689 | | - | |
690 | | - | |
| 700 | + | |
| 701 | + | |
691 | 702 | | |
692 | 703 | | |
693 | 704 | | |
694 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
695 | 713 | | |
696 | 714 | | |
697 | 715 | | |
698 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
699 | 720 | | |
700 | 721 | | |
701 | 722 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
181 | 234 | | |
182 | 235 | | |
183 | 236 | | |
| |||
0 commit comments