Repository navigation
test(javascript): two release tests accept the engine's own crash on a Node without the fix; the guide says what a release can cost - #1382
Merged
Conversation
…sh on a Node without the fix; the guide says what a release can cost Issue #1119: a fork released with the child-session cap at 0 sometimes died with an access violation, and the test expected a clean exit. The crash is Node's (nodejs/node#64209: the inspector writes to a socket the release's detach has just closed), fixed in 24.19.0 and 26.5.0 and in no 22.x release. Three server-side workarounds were built or designed and none was safe, so the server does not change. - The test requires exit 0 on a Node with the fix. On one without it, it accepts 0 or exactly the engine's crash: the launch's exit code for an access violation on Windows (0xC0000005, unsigned or signed), or 1 elsewhere with the fixture naming a memory-fault signal for its fork. A tolerated crash prints a warning. - The fixture names the signal when its fork was killed by one. - The JavaScript guide no longer says a cap of 0 leaves children untouched, and says what a release can cost on which Node and how to avoid releases. Measured here on Node 24.14.1, six runs at a time: 30 runs, 2 crashes (launch exit code -1073741819), all 30 passed. Helper, test and guide written by a GPT model; the signed exit code, the signal check and the changelog entry are the manager session's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BDrn82vMcRzWFDD9aUbZs
…one check for a released fork's outcome With the first commit in place the whole file failed once in three runs: the test that closes a paused, adopted fork saw the fork die with 3221225477 where it expected it to finish. close_debug_session on a child releases it by a detach, and the engine's crash follows that detach too. Both tests now share one check: the fork ran to its end, or, only on a Node without the fix, parent.js saw it die of the access violation or of a memory-fault signal. The guide and the changelog entry say that closing a child session releases it the same way. Measured on Node 24.14.1: the whole file twelve times, four at a time: 12 passed, 1 tolerated crash. Mine (the manager session). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BDrn82vMcRzWFDD9aUbZs
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…e more tests covered; the guide says exactly who releases what From the review of this branch: the cascade test (closing one of two forks) and the two attach tests (detaching and closing an attached root with a paused fork) release the same fixture and still required a clean end, so they had the same exposure to the engine's crash. The shared check moves to tests/test-utils/helpers/released-fork-outcome.ts with a table of unit cases; it also ties the launch's or the target's exit code to what the fixture saw, in every test that uses it. SIGTRAP joins the accepted signals; SIGKILL, SIGTERM and SIGINT do not pass. The other two fixtures name the signal too. The guide and the changelog entry no longer say that closing a child releases it 'the same way' as the throwaway attach: it detaches the child's existing connection. They say on which sessions detach_from_process releases a tree's children and on which it is refused. Run by the manager session on Node 24.14.1: the three files twelve times four at a time, 12 passed; the tree file's two release tests thirty times six at a time, 30 passed, 1 on the crash branch (exit code -1073741819). The cascade and attach crash branches have met no real crash; their line shapes are held by the helper's unit cases. Written by a GPT model. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BDrn82vMcRzWFDD9aUbZs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1119.
A fork released with the child-session cap at 0 sometimes died with an access violation, and the test expected a clean exit. The crash is Node's: its inspector can write to a socket that a detach has just closed (
nodejs/node#64209, fixed in 24.19.0 and 26.5.0, and in no 22.x release). Three server-side workarounds were built or designed and none was safe (the record is in #1119), so the server does not change. The tests and the guide now say what is true.What this changes
close_debug_sessionon a child,detach_from_processand a close on an attached root), and how to avoid releases.No product code.
Evidence
8c3d9f89: 18 checks green.Review
56076068, merge with three changes (three more tests with the same exposure, the exit code tied to the outcome, and exact wording about who releases what); at8c3d9f89, merge.Not in this change
🤖 Generated with Claude Code
https://claude.ai/code/session_015BDrn82vMcRzWFDD9aUbZs