You signed in with another 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
Integration Tests (blacksmith-4vcpu-windows-2025) fails intermittently with STATUS_STACK_OVERFLOW (exit code: 0xc00000fd). The binary that aborts varies between runs, which is what makes it look random:
In the f4f72dc log every individual test prints ok and the process then aborts, so it is stack exhaustion in the harness rather than one assertion failing.
Measurement: this is not new, and not caused by any recent feature work
RUST_MIN_STACK reproduces the Windows condition on Linux. Build normally first (setting it during the build makes rustc itself segfault), then run the built test binary under a constrained stack:
cargo test --test execute_file_test --no-run
RUST_MIN_STACK=1048576 ./target/debug/deps/execute_file_test-<hash> --test-threads=1
Comparing origin/main against the branch for PR #676, same test, same procedure:
Identical at every size. The interpreter needs somewhere between 1.8 MB and 2 MB of stack to run execute_file_test today, on main, independent of any in-flight branch. I checked this specifically because the failure first appeared on a PR and looked like a regression; it is not one.
Why it is intermittent rather than constant
The requirement sits just above what the failing configuration provides, so whether a given run tips over depends on which binary runs and how deep its particular program nests. That also explains the varying test name and why main passes on some commits and failed on 438780a.
Root cause direction
Interpreter::execute_statement is a plain async fn that recurses through execute_block for every nested construct. Each await in any match arm enlarges the single generated state machine, and that cost is paid at every level of statement nesting. Deeply nested WFL programs — main loop → check → check → try → … — therefore consume stack quickly. This is a language-level limit, not a test artifact: a sufficiently nested user program will hit it too, and on Windows sooner.
Two directions, not mutually exclusive:
Reduce per-level cost. Box the larger arms of execute_statement so their locals do not inflate the shared state machine (PR Add transactions, AEAD encryption, file modes, and TOML support #676 does this for its own new arm, which is why that branch measures no worse than main despite adding a block-bearing statement). Applying the same treatment to the other block-bearing arms would lower the floor for everyone.
Give the harness room. Set RUST_MIN_STACK for the Windows CI job so the gate stops flapping while (1) is worked. Mitigation only — it does not help a user running a deeply nested program.
A guard test that runs a deeply nested program under a known stack size would keep the ceiling from quietly regressing.
Context
Found while driving PR #676 to green. Filed separately because it reproduces identically on main and is unrelated to that PR's changes.
Summary
Integration Tests (blacksmith-4vcpu-windows-2025)fails intermittently withSTATUS_STACK_OVERFLOW(exit code: 0xc00000fd). The binary that aborts varies between runs, which is what makes it look random:438780a(onmain)concurrent_disconnect_burst_testaffd7eb(PR #676)concurrent_disconnect_burst_testf4f72dc(PR #676)execute_file_testIn the
f4f72dclog every individual test printsokand the process then aborts, so it is stack exhaustion in the harness rather than one assertion failing.Measurement: this is not new, and not caused by any recent feature work
RUST_MIN_STACKreproduces the Windows condition on Linux. Build normally first (setting it during the build makesrustcitself segfault), then run the built test binary under a constrained stack:Comparing
origin/mainagainst the branch for PR #676, same test, same procedure:origin/mainIdentical at every size. The interpreter needs somewhere between 1.8 MB and 2 MB of stack to run
execute_file_testtoday, onmain, independent of any in-flight branch. I checked this specifically because the failure first appeared on a PR and looked like a regression; it is not one.Why it is intermittent rather than constant
The requirement sits just above what the failing configuration provides, so whether a given run tips over depends on which binary runs and how deep its particular program nests. That also explains the varying test name and why
mainpasses on some commits and failed on438780a.Root cause direction
Interpreter::execute_statementis a plainasync fnthat recurses throughexecute_blockfor every nested construct. Eachawaitin any match arm enlarges the single generated state machine, and that cost is paid at every level of statement nesting. Deeply nested WFL programs —main loop→check→check→try→ … — therefore consume stack quickly. This is a language-level limit, not a test artifact: a sufficiently nested user program will hit it too, and on Windows sooner.Two directions, not mutually exclusive:
execute_statementso their locals do not inflate the shared state machine (PR Add transactions, AEAD encryption, file modes, and TOML support #676 does this for its own new arm, which is why that branch measures no worse thanmaindespite adding a block-bearing statement). Applying the same treatment to the other block-bearing arms would lower the floor for everyone.RUST_MIN_STACKfor the Windows CI job so the gate stops flapping while (1) is worked. Mitigation only — it does not help a user running a deeply nested program.A guard test that runs a deeply nested program under a known stack size would keep the ceiling from quietly regressing.
Context
Found while driving PR #676 to green. Filed separately because it reproduces identically on
mainand is unrelated to that PR's changes.