[v22.x backport] test_runner: avoid hanging on incomplete v8 frames - #65807
[v22.x backport] test_runner: avoid hanging on incomplete v8 frames#65807P4suta wants to merge 2 commits into
Conversation
Signed-off-by: Ali Hassan <[email protected]> PR-URL: nodejs#62704 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
Signed-off-by: Aviv Keller <[email protected]> PR-URL: nodejs#64706 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
|
Review requested:
|
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
|
Thanks for the reviews and for starting CI! The Jenkins Windows and Alpine checks are reporting failures, but I can't access the logs: Jenkins says my account lacks Could someone with access check the failures and advise whether a rerun or changes to this backport are needed? Sharing the relevant failure output here would help me investigate. |
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 #64706 (comment).
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(test_runner: avoid hanging on incomplete v8 frames #62704), then1ba3ce45bfa872956d0fd03ff5023e8a93768be3(test_runner: convert to uint during deserialization #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.FF 0F 7F FF FF FFstdoutFF 0F 80 00 00 00stdoutBoth 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: #62704
Refs: #64706
Refs: #62693
Refs: #64061