Repository navigation
Conversation
|
Independent parallel diagnostics runs at I also ran the full GPU crate selection on RTX 4070 SUPER three times per tree and three more with #2854 applied. No MEASURED with synthetic tests, no game files. AI-assisted (Codex). |
KelboLive
left a comment
There was a problem hiding this comment.
Verified empirically, and the fix works: the target test fails 18/20 full-suite diagnostics runs on base b3910e5e3 and 0/20 with this branch, and the merged tree passes. CI green, merge clean, and record.rs has not moved between the branch base and current main.
But the stated root cause does not match the failure. Instrumenting base shows the span is in ROLLING right after emit_global_without_contention returns (present=true, overwritten=0), and it only vanishes by freeze with overwritten=339,176 and the ring full at 65,536 — so it is eviction by other tests' events, not a push that never landed. The new has_event check (record.rs:674-676) is a real improvement (silent give-up becomes a panic), but it proves presence only at emit time; the same eviction can still wipe the event between the last check and freeze(). The underlying shared-ring flooding is not addressed.
Two suggestions that would keep this class visible instead of latent:
- assert on
data.meta.overwritten == 0(or gate the foreign producers) so a future flood fails loudly rather than relying on the timing window; - make the wait predicate object-specific —
Kind::Wait && e.b == 0(record.rs:2282) matches any concurrent non-card wait, so the test can be satisfied by someone else's wait.
Mutation note: replacing the retention guard with if true passes the stock test 8/8, so the new guard is only covered when contention actually hits — the temporary 2 ms ring hold I used is the only way I got it red. That is acceptable for a flake fix, but it means the guard is not a regression test on its own.
Nit: the over-long assert! at record.rs:2283 adds a 15th rustfmt diff to a file that already has 14; fmt is report-only here, so cosmetic.
Verdict: approve with the root-cause correction — no runtime risk, and the flake is gone empirically — but the narrative should say "evicted by other tests", not "the push was lost".
|
Verified on Windows 11, Rust 1.98.1, no GPU and no game files. The change is right in shape, and the flake it fixes did not reproduce on this machine. The whole
One failure was seen, in a different test, and it belongs to #2854. On run 8 of the head: That is the pool race #2854 fixes ( What the change does, and it matches the report. One note on the helper's shape. Not checked: the GPU crates' behaviour under a real adapter (no GPU device here); the |
Claim:
D3D12-TIMELINE-STALL-TEST-PARALLEL(#2570 (comment))Fixes the
--features diagnosticsparallel test flake ind3d12/crates/leonida-gpu/src/timeline/record.rs(global_stall_routing_retains_spans_waits_wakes_and_sent_fences_without_stacks, reported by@enlight3din #2854).Root cause
Under parallel
cargo test -p leonida-gpu --lib --features diagnostics,emit_global_without_contentionchecked whether the process-wideROLLING.dropped_contentioncounter changed across the closure. When another test thread concurrently triggered or avoided contention while this test emitted its syntheticSpan,Wake,Sent, orWait,emit_global_without_contentioncould return without the test's own synthetic event actually landing inROLLING, causingdata.events.iter().any(...)to panic afterfinalize_stall.Change
#[cfg(test)] RollingBuffer::has_event(&self, pred)ind3d12/crates/leonida-gpu/src/timeline/record.rs.emit_global_without_contentionwithemit_global_until(pred, emit), which retries until this test's specific synthetic event is retained inROLLING(up to 64 attempts, panicking otherwise), and updated both global-routing tests (global_stall_routing_retains_spans_waits_wakes_and_sent_fences_without_stacksandstep_stall_present_writes_on_background_thread_and_preserves_reentrancy_safety).Verification
mainb3910e5e3, 10 parallel runs ofcargo test --locked -p leonida-gpu --lib --features diagnostics -- --skip depth_bounds_pipeline_loads_and_filters_draws):global_stall_routing_retains_spans_waits_wakes_and_sent_fences_without_stackspanicked atrecord.rs:2325:9(1/10runs here;7/10--8/10on@enlight3d's machine).timeline::(timeline::record::tests::*passed 20/20; the 3/20 failures indescriptor::tests/watch::testsare the separate pre-existing races fixed in d3d12-gpu: fix parallel unit test races in watch, descriptor, and pool #2854).GPUs tested: NVIDIA GeForce RTX 5070 12 GB (driver 621.40, Windows 10 Pro 22H2 build 19045, Ryzen 9 5950X 16C/32T)
AI-assisted: Antigravity