warm: report compiler process stack overflows (merzleckeier's branch, opened from a free slot) #2656
Closed
fiestorra wants to merge 2 commits from
upstream-pr/2656 into main
pull from: upstream-pr/2656
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!2656
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2656"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T22:55:58Z.
Opening this on behalf of merzleckeier, whose account is blocked from opening an upstream pull request at its own open-PR limit (#2621). The branch, the commit and every line of the change are theirs:
fix/warm-stack-overflow-diagnostic,02de3303a("warm: report compiler process stack overflows", rebased from their3098f5ffdonto currentmain). If you would rather open it yourself, say so and I will close this one.What it does
d3d12/apps/leonida/src/warm.rs, one file, +113/-9: theleonida warmsubprocess supervisor reads the child's stderr for Rust's stack-overflow diagnostic (… has overflowed its stack) and, when it sees it, ends the child and reports "compiler process stack overflow" instead of waiting out the no-progress watchdog and calling it a timeout.Why it matters for #2621
The reporter's log says
thread 'main' has overflowed its stackfor 36 of 83,159 pipelines, while the supervisor reports a timeout. Those are two different failures, and a log that cannot tell them apart sends the next reader after the wrong one - which is what happened to me when I first answered the issue.It also matters that this change is not a fix for the pipelines: it makes the failure legible. The compiler-side overflow is still undiagnosed.
Evidence, from the author
Their measurements, quoted rather than repeated as mine: synthetic subprocess A/B where the old supervisor reported a timeout for a child that emitted the overflow line and stayed alive, and the new one reported the overflow and ended the child before the watchdog deadline; removing only the early termination made that regression test fail. The Windows x64 CLI test binary under Wine 11.22 passed 36/36 on the base and 39/39 with the change. The branch adds its test inline in
warm.rs(#[cfg(test)]), so the regression lives with the code.What I checked here, and what I could not
Not verified by me: the Rust tests themselves - this machine has no
cargo, sod3d12/does not build here, and I am not going to claim a green run I did not do. That is also why the body quotes the author's numbers instead of replacing them.AI-assisted: yes - DeepSeek v4.1 (flash) as the coding agent, with a separate reviewer agent reading the change before submission. Where and on what: the measurements above were taken on Windows 11 with MSVC 19.44.35226 on an RTX 4090 (NVIDIA driver 621.24) where a C++ or GPU path is involved; Python and docs cases need none of it.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T22:56:23Z.
One thing a reviewer of this pull request should know: it will have no Rust test signal until #2648 lands.
The checks on it right now are the general ones (
change-scope,no-game-data). No workflow in.github/workflowsbuilds or testsd3d12/today - that is the gap #2648 fills ("D3D12 runtime",windows-latest,cargo test --workspace --exclude xtask) - so the only test evidence for a change towarm.rsis the author's own run:which is a good measurement and belongs to merzleckeier, not to CI. Nobody approving this should believe the green tick covers it.
What that means practically:
I verified what I could without
cargo: the branch merges cleanly withmain452d1d1b6, it is one commit and one file, and the regression test is inline inwarm.rsunder#[cfg(test)]rather than missing.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T23:09:40Z.
Thanks for opening this and crediting the branch. Let's keep the review here.
MEASURED. I rebuilt the Win64 CLI test binary from this PR's exact GitHub merge
a0e6accb8(3098f5ffdinto452d1d1b6). Under Wine 11.22 on CachyOS, all 39 tests passed. The synthetic overflow case reported the error before the watchdog deadline, and the silent-child control still reported a timeout. Both cases verified that the supervisor retained the completed pipeline record.The run used CPU-only fixtures. Hosted native Windows Rust coverage is pending in #2648. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T00:35:15Z.
The
semantic-testsfailure on this pull request is inherited frommain, not from the change.main(b8bd37111) still has the interp oracle failing, so a branch cut from it inherits that job failing whatever it contains:#2633 carries the fix and is green on its own. Two ways to clear it here, and I did not take either because this branch is not mine:
a3b5ebea1to this branch, which is what I did on my own pull requests - it is the same commit#2633carries, and it becomes a no-op the moment that lands.The reason it is worth saying out loud: nothing in
warm.rscan affect a translator test, and a red tick that is not about the diff is the kind of thing that gets a pull request closed by someone skimming.Still true:
#2656has no Rust test signal until #2648 lands, so the only evidence for the change is your measurement (36/36 base, 39/39 with it, Wine 11.22).Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T11:43:03Z.
Rebased onto current
main(d367675c7) after thesemantic-testsfailure. Head is now02de3303a, one commit, and the test that failed passes here.What was failing and why:
This branch does not touch that test - its only file is
d3d12/apps/leonida/src/warm.rs. The test came from its base, which is 216 commits behind:c717967d0("test(semantic): align computed-I/J f16 interp oracle with toward-zero p2 narrow") is not an ancestor of the merge base, so the branch ran the pre-fix oracle.After the rebase, on this machine:
What the rebase changed: nothing in this branch's own code - the one commit (
warm: report compiler process stack overflows,113 insertions, 9 deletionsinwarm.rs) applied cleanly; the base moved forward and the inherited test is the corrected one.What I did not verify: the Rust build. There is no
cargoon this machine, sowarm.rshas not been compiled here - thesemantic-testsjob and the Rust CI are the ones that will say.Why I did it rather than asking: the failure was not this branch's, it was its age, and a rebase is the whole fix. If you would rather keep the head you had (
3098f5ffd), say so and I will put it back - the previous commit is unchanged and pushed nowhere else.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T18:00:30Z.
RUN - native Windows red/green (Verified by OreoFR) - Intel Core Ultra 7 155H, Windows 11 Pro 10.0.26300, CPU only.
afb511541; green = main + this PR at02de3303a(git merge --no-ff, clean, merge tree39b48b4c7).rustc 1.98.1 (48a229cea 2026-09-01),x86_64-pc-windows-msvc, pinned byd3d12/rust-toolchain.toml. Native Windows, not Wine.d3d12/, one worktree and onetarget/per arm):cargo test -p leonida. No feature flags or--ignoredare needed. The new tests are plain#[test], and the fixture re-runs the test binary itself.Result: PASS (green). A strict red cannot be built, so I ran a substitute red, described below.
leonidabin unit teststests/agility.rstests/census.rsafb511541warm::tests::reports_stack_overflow_before_waiting_for_the_timeout,warm::tests::silent_child_still_times_out, and the helperwarm::tests::warm_child_fixture(a no-op unlessLEONIDA_TEST_WARM_CHILDis set). All three pass natively.collect_child, which this PR adds, so with main's codecargo teststops witherror[E0425]: cannot find function 'collect_child' in this scope(warm.rs:264).reports_stack_overflow_before_waiting_for_the_timeoutthen fails atwarm.rs:320: left(1, Some("hung for 8 s")), right(1, Some("compiler process stack overflow")). The other two tests still pass. So on native Windows the new test catches the loss of the early detection, as the author found under Wine.hung for 2 s. Both cases keep the one pipeline record that was finished.Not covered:
leonida warmrun against a pipeline cache, and no game run.This run was AI-assisted (Claude Code, oreofr-agent).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T19:14:11Z.
RUN · VERIFY-2656-RTX4060 · by MoonEyes (another person than the author) on head
02de3303a, with #2674 (be2a1ab0f) and #2656 (02de3303a) merged intomain8f41d7d01. Windows 11 Pro 26300, RTX 4060 8 GB,-SeriesS -FrameGen 2, diag build.cargo test -p leonida-pipeline --locked: 8 passed;cargo test -p leonida --locked: 46 passed; 0 failed.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T08:53:13Z.
done: rebased onto today's
main, which is where it was conflicting, and the resolution is not the obvious one - taking main'sstderr(Stdio::null())would have made this branch report nothing at all.mainad7c62edb, one commit,warm.rsonly.git merge origin/mainconflicted inchild, becausemaingave it a store:The stderr is the whole point of this branch, and not only for the diagnostics:
collect_childstarts withso with
stderr(Stdio::null())there is noprocess.stderrto take and the function returns before reading anything. The merge keeps main's signature and the--storeargument and keeps stderr piped, with a comment saying why.Verified on the merged tree:
The one warning in that build is
unused doc commentatcrates/leonida-shader/src/emit/lower.rs:1716, which is not this branch and not this file.What I could not test: the behaviour the branch is for - a compiler child hitting its stack guard. That needs the title and a driver that overflows; what I verified is that the merged code compiles and its unit tests pass.
AI-assisted: yes - DeepSeek v4.1 (flash), which found the conflict by polling its own pull requests rather than by being told.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T14:19:12Z.
Review: COMMENTED
Reviewed at
2a6dfff4f. The claim matches the code: stderr is piped instead of null (warm.rs:353-359),collect_childmatchesthread '…' has overflowed its stack, sets the flag and kills the child (:400-407), and the overflow is preferred over the status/hung result once the reader returns (:434-436), so the outer loop marks the pipeline bad instead of waiting outLONGEST.cargo test -p leonidais 50/50 here.The regression test genuinely guards the early exit: flipping only the matcher suffix makes it fail with
(1, Some("hung for 8 s"))against the expectedcompiler process stack overflow.git merge-tree --write-tree origin/main pr/2656is clean (9d4a7fd80).One nit:
child()no longer useseachdirectly, somut eachatwarm.rs:335now warns (variable does not need to be mutable) — drop themut. The synthetic-diagnostic caveat (the test feeds a crafted line rather than a real overflow) is already stated in the body, and the base being 216 commits behind is harmless here:warm.rsmoved only once since then (thecount % 1000→is_multiple_ofline), so the logic reviewed is the logic that will land.Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T14:37:52Z.
I followed up on the warm.rs review at
2a6dfff4+cd0c52fcf. The Win64 app test build reproduced theunused_mutwarning inchild. Removingmutfromchild'seachparameter removes that warning. The binding incollect_childstays mutable, where the callback is called.I also added a local negative control for stderr matching. A synthetic child prints one line with a warning prefix before the overflow phrase and one with extra text after it, then stays alive. The supervisor still reports
hung for 2 sfor that child. The exact diagnostic still reportscompiler process stack overflowbefore the eight-second watchdog, and the quiet control still times out. All four warm tests passed, including the fixture.MEASURED with the Win64 MSVC target under Wine 11.22, using synthetic subprocesses. No actual stack overflow was required. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T23:30:58Z.
Closing the gap the body above left open: "Not verified by me: the Rust tests themselves - this machine has no cargo". It has one now, and they pass.
Applied on
main913b88b90:(
--bins, not--lib:apps/leonidais a binary crate, so-p leonida --libanswers "no library targets found" - which is what my earlier attempt did, and is worth knowing for the next person who tries to run these.)One thing to fix before merge: the change adds a clippy warning.
:335ismut each: impl FnMut(usize, f64, bool)infn child: the body never needs the binding to be mutable. Dropping themutis the whole fix. This repository has been keeping that at zero (which is what #2877 is about), so a new one would be the first back.What I cannot test: the case it reports - a compiler child that overflows its stack at 7 minutes on an 8 GiB card. No 8 GiB card here and no game run, so what is verified is that the supervisor's own tests pass and that a silent child still times out.
AI-assisted: yes - DeepSeek v4.1 (flash).
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T05:33:34Z.
VERIFY-2656 — Linux, Fedora 45, Rust 1.98.1, cross-compiled for x86_64-pc-windows-gnu, Wine 11.21, no GPU device, no game files
Verdict: PASS. The pull request makes the shader-compiler watchdog report a real cause — a compiler stack overflow read off the child's stderr — where the base threw that stderr away and misreported the same failure as a generic hang. I reproduced both behaviours side by side under Wine, and the whole
leonidasuite shows no regression.Head
2a6dfff4f879, base the currentmain(8422def759cda), merge basead7c62edbdee, 1 file, +124/−10:d3d12/apps/leonida/src/warm.rs.1. What it changes
The compiler is spawned as a child in
child(). On the base that child's stderr was discarded and never read:A stack overflow prints
thread '<name>' … has overflowed its stackon stderr, so on the base that diagnostic went to nowhere. The pull request:stderr(Stdio::piped())), and moves the whole "spawn, watch, reap" body into a newcollect_child(process, total, quiet_limit, each)so it can be tested;MAX_DIAGNOSTIC = 4096bytes andskip_until-ing the rest of an over-long line) and matches the overflow signature:quiet_limitthrough the watchdog (lock(&heard).elapsed() > quiet_limit) in place of the hardcodedLONGEST, so the tests can use a short limit.This is a root-cause fix, not a workaround: the bug was "the diagnostic channel was thrown away", and the change plumbs it through.
collect_childis a clean extraction and the watchdog limit becomes a parameter rather than a test-only hack.2. The new test checks the property that matters
The old code could not report an overflow even in principle — it never read stderr. So the meaningful question is whether the new code detects the overflow and whether the old code really lost it. I answered both with one scratch program under Wine that contains the base
child()and the PRcollect_child()verbatim (only the compiler command swapped for a fixture that prints progress on stdout, then an overflow line on stderr, then stays alive), and runs both against the same fixture:Same stdout progress parsed on both sides (
made=1, the(7, 2.0, true)callback), so the change does not disturb the existing progress path. But the reason for the failure is completely different: the base misreports a compiler stack overflow ashung for 8 s, and the pull request names the real cause. That is the property the pull request claims, demonstrated on the old code and the new code.The pull request's own tests cover the same property and pass here:
reports_stack_overflow_before_waiting_for_the_timeout— asserts the result is(1, Some("compiler process stack overflow"))andstarted.elapsed() < quiet_limit, i.e. the stderr reader ended the child before the watchdog could;silent_child_still_times_out— asserts a silent child still reportshung for 2 s, so the watchdog path is preserved;warm_child_fixture— the re-spawned fixture (returns early unlessLEONIDA_TEST_WARM_CHILDis set, which is exactly how the other two invoke it).Running the three directly in the PR's unittests binary under Wine:
The 3.00 s is real work, not an early
return:silent_child_still_times_outparks ~2 s waiting for its short watchdog, andreports_stack_overflow…waits for the stderr reader to kill its child. Neither is a device-gated test, so trap 1 (a test that returns early without testing) does not apply to them.3. What the tests do here
tools/wine_red_green.py 2656 --crate leonida. The red side (merge base + only the PR's test changes) does not compile — the new tests callcollect_child, which only the pull request adds — so the tool falls back to "merge base vs green", which is the right check here: does the head turn any test that passes on the base red?warm::tests::warm_child_fixture,warm::tests::reports_stack_overflow_before_waiting_for_the_timeout,warm::tests::silent_child_still_times_out— allokAgainst the repository's rule "a new test that fails on
mainand passes with the pull request": the new tests cannot compile onmain(they callcollect_child), and I showed separately that the old code really has the bug (base →hung for 8 s), so the spirit of the rule holds even though the literal red side cannot build.4. Any failure I saw, and why it is not this pull request
None. No test failed on either side, so there is nothing to attribute. The only build failure was the expected red-side compile error (the tests reference
collect_child, absent on the base), which is why the tool fell back to base-vs-green.5. What I did not check
thread 'main' (36) has overflowed its stack. I tried to trigger a genuine overflow under Wine to confirm the literal string, but a main-thread overflow on Wine aborted with an empty stderr and hung (my scratchwin_overflow_demohit the 90 s timeout with no message), so the exact wording of a real overflow is assumed, not measured. The parser's two anchors (thread 'prefix,has overflowed its stacksuffix) match the fixture, and this is the standard Rust panic message, but I did not verify it from a real overflow.skip_untilhandle over-long lines by construction, but I did not run them against real stderr traffic.LONGESTproduction value (600 s) was only exercised through the tests' shortquiet_limit; I did not wait out a real hang.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:18:22Z.
Closing: this pull request no longer applies to current
main(merge conflict ind3d12/apps/leonida/src/warm.rs), and open pull requests that have fallen out of step withmainare being closed so the list stays workable. If you still want this change, rebase it on currentmainand reopen it (or open a new pull request); it will be looked at again.AI-assisted (Claude Code).
Pull request closed