[v22.x backport] test_runner: avoid hanging on incomplete v8 frames #65807
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 502 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #65807"
general
weight: 0.35
MoLow
Backport #62704 and #64706 together to
v22.x-stagingto fix test-runner hangs and deserialization errors triggered by binary child stdout.This follows up on https://github.com/nodejs/node/pull/64706#issuecomment-5452408812.
Why backport to Maintenance LTS
In #62693, child stdout containing
FF 0F 7F FF FF FFleaves the parent test runner spinning while draining an incomplete V8 frame. The hang can stall CI even with--test-force-exit; the report also documents that the runner's timeout and SIGTERM cannot recover it. #64061 documents an Appium CI failure in the same deserialization path.Both fixes have shipped in Current for more than two weeks: #62704 in v26.2.0 (May 20), and #64706 in v26.7.0 (August 5). They are also released in v24.18.0 and v24.20.0 respectively. This backport changes only the deserializer and its existing regression test, with no new public API.
Backport details
debe2ed2efd377d301282e4c64489ca2a9d7b028(#62704), then1ba3ce45bfa872956d0fd03ff5023e8a93768be3(#64706), preserving the two original commits' authors and messages.StringFromCharCodewithout the unrelatedStringimport present on main. The test changes merge into v22's existing setup.git range-diffshows only those surrounding context differences. Changes are limited tolib/internal/test_runner/runner.jsandtest/parallel/test-runner-v8-deserializer.mjs.Validation
Base:
839480a471e0f5dfe6dd2a6255ad66ddd99e3c14(v22.x-staging, v22.23.3-pre). Environment: Linux x64, GCC 13.3.0, Python 3.12.3.Built the unchanged base and each backport revision locally. The regression test is
test/parallel/test-runner-v8-deserializer.mjs.| Revision | Regression tests |
FF 0F 7F FF FF FFstdout |FF 0F 80 00 00 00stdout || --- | --- | --- | --- |
| Unchanged base | 31 passed | Hangs; SIGKILL required | Exits with failure |
| #62704 only | 36 passed | Passes | Exits with failure |
| Both backports | 37 passed | Passes | Passes |
Both binary-stdout cases were checked with
--testand with--test --test-force-exit. An external timeout bounded the baseline hangs. A directFileTest.parseMessage()check also confirmed the unsigned case's deserialization error on the unchanged base./usr/bin/python3 tools/test.py -j4 --abort-on-timeout -p tap '/test-runner-': passed (55 cases, including 1 built-in skip).make lint PYTHON=/usr/bin/python3 CPPLINT_QUIET='--quiet --repository=.' JOBS=4: passed. The repository override prevents cpplint from using the enclosing checkout when checking header guards; it does not disable those checks.make -j4 test PYTHON=/usr/bin/python3 JOBS=4 TEST_CI_ARGS='--abort-on-timeout -p tap': passed (exit 0). All 4,731 JavaScript/addon cases completed without unexpected failures, including 39 built-in skips. C++ tests (164), doctool tests (7), and tool tests (5) also passed.Runtime tests ran outside the execution sandbox, with
NO_COLOR,FORCE_COLOR, andNODE_DISABLE_COLORSunset. The final full run also usedTERM=xterm-256color. InheritedNO_COLOR=1caused two color-output failures, andTERM=dumbcaused nine REPL failures in the first full run. Both sets reproduced on the unchanged base and passed there with the corrected environment, and all passed in the final full backport run. No test or snapshot changes were made for these environment issues.Could a backporter apply the appropriate v22 backport labels to the original PRs, and could a collaborator or triager start full CI for this PR?
Refs: https://github.com/nodejs/node/pull/62704
Refs: https://github.com/nodejs/node/pull/64706
Refs: https://github.com/nodejs/node/issues/62693
Refs: https://github.com/nodejs/node/issues/64061