ci(scripts): disable V8 Maglev for Windows test children#9131
Conversation
Network-heavy specs intermittently abort with STATUS_STACK_BUFFER_OVERRUN (0xC0000409) on Windows: mocha-run-file forces process.exit() the moment mocha finishes, and that races V8's Maglev teardown while libuv still has in-flight sockets from the spec's real HTTP traffic. The child dies with no stderr and no crash report, so mocha-parallel-files only sees a non-zero exit and reports the file as crashed (e.g. inferred_proxy.spec.js, which is just whichever network spec lost the race that run). --no-maglev sidesteps the faulty tier and can only be passed as a CLI flag, not through NODE_OPTIONS, so the runner injects it into the spawned per-file node processes on win32. Refs: nodejs/node#62260
Overall package sizeSelf size: 6.42 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.2.0 | 104.26 kB | 843.44 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 4540f29 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-06-29 15:19:38 Comparing candidate commit 4540f29 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2255 metrics, 31 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9131 +/- ##
==========================================
+ Coverage 93.69% 93.71% +0.02%
==========================================
Files 889 891 +2
Lines 50861 51161 +300
Branches 11832 11900 +68
==========================================
+ Hits 47653 47948 +295
- Misses 3208 3213 +5 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 407dbd80ec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The Windows --no-maglev workaround was appended on every win32 child, but the top-level --maglev/--no-maglev toggle only exists from V8 11 (Node 20). On the supported Node 18 line (V8 10) the flag does not exist, so each spawned spec aborts with `bad option: --no-maglev` (exit 9) before mocha runs, breaking the parallel runner for Windows Node 18. Gate on the running V8 major, which the children inherit via the shared binary.
* ci(scripts): disable V8 Maglev for Windows test children Network-heavy specs intermittently abort with STATUS_STACK_BUFFER_OVERRUN (0xC0000409) on Windows: mocha-run-file forces process.exit() the moment mocha finishes, and that races V8's Maglev teardown while libuv still has in-flight sockets from the spec's real HTTP traffic. The child dies with no stderr and no crash report, so mocha-parallel-files only sees a non-zero exit and reports the file as crashed (e.g. inferred_proxy.spec.js, which is just whichever network spec lost the race that run). --no-maglev sidesteps the faulty tier and can only be passed as a CLI flag, not through NODE_OPTIONS, so the runner injects it into the spawned per-file node processes on win32. Refs: nodejs/node#62260 * ci(scripts): gate --no-maglev by V8 version The Windows --no-maglev workaround was appended on every win32 child, but the top-level --maglev/--no-maglev toggle only exists from V8 11 (Node 20). On the supported Node 18 line (V8 10) the flag does not exist, so each spawned spec aborts with `bad option: --no-maglev` (exit 9) before mocha runs, breaking the parallel runner for Windows Node 18. Gate on the running V8 major, which the children inherit via the shared binary.
* ci(scripts): disable V8 Maglev for Windows test children Network-heavy specs intermittently abort with STATUS_STACK_BUFFER_OVERRUN (0xC0000409) on Windows: mocha-run-file forces process.exit() the moment mocha finishes, and that races V8's Maglev teardown while libuv still has in-flight sockets from the spec's real HTTP traffic. The child dies with no stderr and no crash report, so mocha-parallel-files only sees a non-zero exit and reports the file as crashed (e.g. inferred_proxy.spec.js, which is just whichever network spec lost the race that run). --no-maglev sidesteps the faulty tier and can only be passed as a CLI flag, not through NODE_OPTIONS, so the runner injects it into the spawned per-file node processes on win32. Refs: nodejs/node#62260 * ci(scripts): gate --no-maglev by V8 version The Windows --no-maglev workaround was appended on every win32 child, but the top-level --maglev/--no-maglev toggle only exists from V8 11 (Node 20). On the supported Node 18 line (V8 10) the flag does not exist, so each spawned spec aborts with `bad option: --no-maglev` (exit 9) before mocha runs, breaking the parallel runner for Windows Node 18. Gate on the running V8 major, which the children inherit via the shared binary.
* ci(scripts): disable V8 Maglev for Windows test children Network-heavy specs intermittently abort with STATUS_STACK_BUFFER_OVERRUN (0xC0000409) on Windows: mocha-run-file forces process.exit() the moment mocha finishes, and that races V8's Maglev teardown while libuv still has in-flight sockets from the spec's real HTTP traffic. The child dies with no stderr and no crash report, so mocha-parallel-files only sees a non-zero exit and reports the file as crashed (e.g. inferred_proxy.spec.js, which is just whichever network spec lost the race that run). --no-maglev sidesteps the faulty tier and can only be passed as a CLI flag, not through NODE_OPTIONS, so the runner injects it into the spawned per-file node processes on win32. Refs: nodejs/node#62260 * ci(scripts): gate --no-maglev by V8 version The Windows --no-maglev workaround was appended on every win32 child, but the top-level --maglev/--no-maglev toggle only exists from V8 11 (Node 20). On the supported Node 18 line (V8 10) the flag does not exist, so each spawned spec aborts with `bad option: --no-maglev` (exit 9) before mocha runs, breaking the parallel runner for Windows Node 18. Gate on the running V8 major, which the children inherit via the shared binary.
Summary
Windows test jobs intermittently fail with a crashed spec file and exit code
3221226505(0xC0000409/STATUS_STACK_BUFFER_OVERRUN) — no stderr, nocrash report, no mocha failure.
scripts/mocha-run-file.jsforcesprocess.exit()as soon as mocha finishes, and on Windows that races V8'sMaglev teardown while libuv still has in-flight sockets from a spec's real HTTP
traffic. The runner only sees a non-zero child exit and reports the file as
crashed. The file in the originating run was
inferred_proxy.spec.js, but it isjust whichever network-heavy spec lost the race — its plugin logic is sound.
scripts/mocha-parallel-files.jsnow injects--no-maglevinto the spawnedper-file
nodeprocesses onwin32only, sidestepping the faulty tier.Why
--no-maglevis a V8 flag that cannot be set throughNODE_OPTIONS, so it hasto be a direct CLI argument on each spawned child — the parent runner can't
forward it any other way. The crash is upstream (nodejs/node#62260, still open);
this is a stop-gap until that lands, gated to Windows where the abort occurs.
Test plan
tracing-windows, and other Windows suites routedthrough
mocha-parallel-files.js) stay green across reruns.node scripts/mocha-parallel-files.js --timeout 30000 -- "packages/dd-trace/test/plugins/util/inferred_proxy.spec.js"passes locally with no flag added.Refs: nodejs/node#62260