René's URL Explorer Experiment


Title: test_runner: parent runner still crashes on child stdout bytes that mimic an event frame (survives the #64706 fix) · Issue #66164 · nodejs/node · GitHub

Open Graph Title: test_runner: parent runner still crashes on child stdout bytes that mimic an event frame (survives the #64706 fix) · Issue #66164 · nodejs/node

X Title: test_runner: parent runner still crashes on child stdout bytes that mimic an event frame (survives the #64706 fix) · Issue #66164 · nodejs/node

Description: Version: v24.21.0 (this release includes the >>> 0 fix from #64706); also verified on v26.4.0 and v22.23.2 Platform: macOS 26.6.2 (25G83), arm64 Subsystem: test_runner Current behavior node --test crashes the parent runner (exit code 1; ...

Open Graph Description: Version: v24.21.0 (this release includes the >>> 0 fix from #64706); also verified on v26.4.0 and v22.23.2 Platform: macOS 26.6.2 (25G83), arm64 Subsystem: test_runner Current behavior node --test ...

X Description: Version: v24.21.0 (this release includes the >>> 0 fix from #64706); also verified on v26.4.0 and v22.23.2 Platform: macOS 26.6.2 (25G83), arm64 Subsystem: test_runner Current behavior nod...

Opengraph URL: https://github.com/nodejs/node/issues/66164

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_runner: parent runner still crashes on child stdout bytes that mimic an event frame (survives the #64706 fix)","articleBody":"- **Version**: v24.21.0 (this release *includes* the `>>> 0` fix from #64706); also verified on v26.4.0 and v22.23.2\n- **Platform**: macOS 26.6.2 (25G83), arm64\n- **Subsystem**: test_runner\n\n## Current behavior\n\n`node --test` crashes the **parent runner** (exit code 1; the failing component is the parent's stdout frame parser, not any test assertion) with:\n\n```console\nError: Unable to deserialize cloned data due to invalid or unsupported version.\n    at #processRawBuffer (node:internal/test_runner/runner:497:20)\n    at FileTest.parseMessage (node:internal/test_runner/runner:404:29)\n    at Socket.\u003canonymous> (node:internal/test_runner/runner:552:15)\n```\n\nHow often: deterministic — 10/10 runs on every version below. Control (same file minus the stdout write): 10/10 green on every version.\n\n| node | has #64706 `>>> 0` fix | repro | control |\n|---|---|---|---|\n| v24.21.0 | yes (verified in shipped `runner.js` source) | 10/10 crash | 10/10 pass |\n| v26.4.0 | no (compiled-in source still has the signed read) | 10/10 crash | 10/10 pass |\n| v22.23.2 | no (v22 backport tracked in #65934) | 10/10 crash | 10/10 pass |\n\n## Expected behavior\n\nAnything a test (or code it imports) writes to stdout — text, banners, progress bars, QR codes, binary — should not be able to take down the parent runner. At worst it should degrade to `test:stdout` output or a per-file diagnostic, not abort the whole run with an error pointing at runner internals.\n\n## Steps to reproduce\n\nSave as `poison.test.mjs`, then run `node --test poison.test.mjs`:\n\n```js\nimport { test } from 'node:test'\n\ntest('writes bytes that mimic a frame header', () => {\n  const poison = Buffer.from([\n    0xFF, 0x0F,             // frame magic (v8 serdes header tag)\n    0x00, 0x00, 0x00, 0x08, // fake payload size = 8\n    0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, // \"ABCDEFGH\" payload\n  ])\n  process.stdout.write(poison)\n})\n\ntest('subsequent test whose real frames must also be parsed', () => {\n  // trivial\n})\n```\n\nRemoving the `process.stdout.write(poison)` line makes it 10/10 green on all three versions.\n\n## Analysis\n\nIn `lib/internal/test_runner/runner.js`:\n\n- `runTestFile` spawns each test file with `stdio: ['pipe', 'pipe', 'pipe']` and pipes the child's **raw stdout** into `FileTest.parseMessage → #processRawBuffer`.\n- The child's stdout therefore carries two unrelated producers on one pipe: the runner's own length-prefixed frames (`FF 0F | uint32 BE size | v8 payload`) and arbitrary application output. There is no isolation or escape mechanism for user bytes.\n- The first loop in `#processRawBuffer` skips bytes up to the next `FF 0F` magic and reports them as `test:stdout`. But after consuming a frame, the second loop continues **without re-checking the magic** — it trusts the next 4 bytes as a size and hands the slice straight to `readHeader()` / `readValue()`, with **no try/catch anywhere on this path** (the escaping stack above is the proof).\n- #64706 hardened the size read itself (`>>> 0`), which fixes the negative/garbage-size case. What remains — and what the repro above hits on v24.21.0 — is the rest of the path: any stdout bytes that begin with `FF 0F` plus a plausible small size pass every guard, `readHeader()` throws on the payload, and the exception takes down the entire run.\n- Binary output containing `FF 0F` at a buffer head reaches exactly this state; plain text mostly takes the negative-size branch instead, which pre-#64706 silently drops buffered frames (see #65934) rather than crashing.\n\nReal-world impact: one test's stdout can abort the whole `node --test` run with an internals-only error, which is hard for users to act on. We hit this as CI flakiness: a test printed a large terminal-QR block graphic and CI failed intermittently with the identical error; removing that output made the failures disappear.\n\nPossible directions (not exhaustive): re-validate the `FF 0F` magic in the second loop before trusting the size; treat `readHeader()` / `readValue()` failure as lost/stray-output diagnostics for that file instead of a fatal exception; or an escaping mechanism so user stdout is never frame-parsed.\n\n## Related\n\n- #64061 — signed size-read crash (same error/stack); fixed by #64706. This issue is about what that fix does *not* cover.\n- #65934 — pending v22.x backport of #64706.\n\n## Secondary repro (plain text, intermittent)\n\nThe deterministic file above is a minimized stand-in. The organic trigger is chunk-boundary dependent — text landing in the same parse buffer as the end of a frame gets its bytes read as a size. This file matches our real-world case (QR-style block text) and crashes only intermittently:\n\n```js\nimport { test } from 'node:test'\n\nconst tick = () => new Promise((r) => setTimeout(r, 0))\n\ntest('passes some ordinary assertions', async () => { await tick() })\n\ntest('prints a large block of text like a QR code / ASCII banner', async () => {\n  for (let i = 0; i \u003c 54; i++) {\n    console.log('█▀▄ '.repeat(25))\n    await tick() // let runner event frames flush between text writes\n  }\n})\n\ntest('keeps running tests after the noisy one', async () => { await tick() })\n```\n","author":{"url":"https://github.com/fan56","@type":"Person","name":"fan56"},"datePublished":"2026-09-21T01:50:42Z","url":"https://github.com/nodejs/node/issues/66164"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1e4dcc3c-1e44-1204-fcc2-3a1f43622f20
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA8B8:36D84F:975320:C95F72:6AED30AF
html-safe-noncea8a2b06a52f0dab419e1d0b03fbe801e50109825be6480167352fe7a82f48ef6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEI4OjM2RDg0Rjo5NzUzMjA6Qzk1RjcyOjZBRUQzMEFGIiwidmlzaXRvcl9pZCI6IjIwMTA2NTAwODA1NTIyMzUxODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2c90d8e9f65f30de259811f166a8c661a7dc7d01be897d8f616d37c6db55b00a
hovercard-subject-tagissue:5521862162
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/66164/issue_layout
twitter:imagehttps://opengraph.githubassets.com/537303612757410611793e3b7204d3f82ca4e366d1dc64c95b891d2532f70cb5/nodejs/node/issues/66164
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/537303612757410611793e3b7204d3f82ca4e366d1dc64c95b891d2532f70cb5/nodejs/node/issues/66164
og:image:altVersion: v24.21.0 (this release includes the >>> 0 fix from #64706); also verified on v26.4.0 and v22.23.2 Platform: macOS 26.6.2 (25G83), arm64 Subsystem: test_runner Current behavior node --test ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefan56
hostnamegithub.com
expected-hostnamegithub.com
Nonee51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ebb7b901cc154ecc179a44f266fcf69f343b30
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66164#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66164
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66164
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/66164
Reloadhttps://github.com/nodejs/node/issues/66164
Reloadhttps://github.com/nodejs/node/issues/66164
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66164
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66164
#66273https://github.com/nodejs/node/pull/66273
test_runner: parent runner still crashes on child stdout bytes that mimic an event frame (survives the #64706 fix)https://github.com/nodejs/node/issues/66164#top
#66273https://github.com/nodejs/node/pull/66273
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
https://github.com/fan56
fan56https://github.com/fan56
on Sep 21, 2026https://github.com/nodejs/node/issues/66164#issue-5521862162
test_runner: convert to uint during deserialization #64706https://github.com/nodejs/node/pull/64706
#64706https://github.com/nodejs/node/pull/64706
#65934https://github.com/nodejs/node/issues/65934
test_runner: convert to uint during deserialization #64706https://github.com/nodejs/node/pull/64706
test_runner: convert to uint during deserialization #64706https://github.com/nodejs/node/pull/64706
test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file #65934https://github.com/nodejs/node/issues/65934
Error: Unable to deserialize cloned data due to invalid or unsupported version #64061https://github.com/nodejs/node/issues/64061
test_runner: convert to uint during deserialization #64706https://github.com/nodejs/node/pull/64706
test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file #65934https://github.com/nodejs/node/issues/65934
test_runner: convert to uint during deserialization #64706https://github.com/nodejs/node/pull/64706
inoway46https://github.com/inoway46
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
on Sep 21, 2026https://github.com/nodejs/node/issues/66164#event-31501316589
avivkellerhttps://github.com/avivkeller
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
on Sep 21, 2026https://github.com/nodejs/node/issues/66164#event-31533174855
https://github.com/avivkeller
avivkellerhttps://github.com/avivkeller
on Sep 21, 2026https://github.com/nodejs/node/issues/66164#issuecomment-5761655815
https://github.com/faizanu94
faizanu94https://github.com/faizanu94
on Sep 25, 2026https://github.com/nodejs/node/issues/66164#issuecomment-5826482438
#66273https://github.com/nodejs/node/pull/66273
faizanu94https://github.com/faizanu94
on Sep 25, 2026https://github.com/nodejs/node/issues/66164#event-31808870802
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/faizanu94/node/commit/ff400682ad1c99dcda423062beed33e857b86eab
ff40068https://github.com/faizanu94/node/commit/ff400682ad1c99dcda423062beed33e857b86eab
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/faizanu94/node/commit/9366795710a8979b9858342df4f96ba5183b1149
9366795https://github.com/faizanu94/node/commit/9366795710a8979b9858342df4f96ba5183b1149
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/faizanu94/node/commit/0d503f6d15234b62b67a5453ee42be44bbfd4285
0d503f6https://github.com/faizanu94/node/commit/0d503f6d15234b62b67a5453ee42be44bbfd4285
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/faizanu94/node/commit/f4dd671f3e483ca3ea0563afba51fc3162604faf
f4dd671https://github.com/faizanu94/node/commit/f4dd671f3e483ca3ea0563afba51fc3162604faf
riokuroxi-svghttps://github.com/riokuroxi-svg
on Sep 30, 2026https://github.com/nodejs/node/issues/66164#event-32150748705
fix(ci): la suite deja de fallar sola por un bug del supervisor de Nodehttps://github.com/riokuroxi-svg/Shin-MD/commit/f11e3274818bc25fd728d70ef98038ddd3f7eef3
f11e327https://github.com/riokuroxi-svg/Shin-MD/commit/f11e3274818bc25fd728d70ef98038ddd3f7eef3
fix(ci): la suite deja de fallar sola por un bug del supervisor de Nodehttps://github.com/riokuroxi-svg/Shin-MD/commit/22d8202c519bcd0f08e2956fe3efe4d16ee439b1
22d8202https://github.com/riokuroxi-svg/Shin-MD/commit/22d8202c519bcd0f08e2956fe3efe4d16ee439b1
nodejs-github-bothttps://github.com/nodejs-github-bot
on Oct 1, 2026https://github.com/nodejs/node/issues/66164#event-32256683941
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/nodejs/node/commit/21090da0cf76b3c1a6eb32374cf547d9f60e0703
21090dahttps://github.com/nodejs/node/commit/21090da0cf76b3c1a6eb32374cf547d9f60e0703
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#66273https://github.com/nodejs/node/pull/66273
on Oct 1, 2026https://github.com/nodejs/node/issues/66164#event-32256683954
aduh95https://github.com/aduh95
on Oct 3, 2026https://github.com/nodejs/node/issues/66164#event-32398858061
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/nodejs/node/commit/9af72fc84388bd33d01a6b2abc822359f3b5ccdf
9af72fchttps://github.com/nodejs/node/commit/9af72fc84388bd33d01a6b2abc822359f3b5ccdf
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/nodejs/node/commit/d5737262381cb341aeee4e7e959dc25ce4130bdc
d573726https://github.com/nodejs/node/commit/d5737262381cb341aeee4e7e959dc25ce4130bdc
addict85https://github.com/addict85
on Oct 11, 2026https://github.com/nodejs/node/issues/66164#event-32991576365
Passwortfelder liegen in einem Formularhttps://github.com/addict85/BrickInventory/commit/fda9c7c7d14d9049dd19676642847688365b5efa
fda9c7chttps://github.com/addict85/BrickInventory/commit/fda9c7c7d14d9049dd19676642847688365b5efa
Sek1ro-okahttps://github.com/Sek1ro-oka
on Oct 12, 2026https://github.com/nodejs/node/issues/66164#event-33056183432
fix(tests): 转写并发的诊断输出改走 stderr(缓解 node:test IPC 抖动,Refs #11) (#99)https://github.com/GengYunChuChao/GengYun/commit/13262f19345b6e2e99de8ba39d661dae065d3b01
#11https://github.com/GengYunChuChao/GengYun/issues/11
#99https://github.com/GengYunChuChao/GengYun/pull/99
13262f1https://github.com/GengYunChuChao/GengYun/commit/13262f19345b6e2e99de8ba39d661dae065d3b01
aduh95https://github.com/aduh95
on Oct 23, 2026https://github.com/nodejs/node/issues/66164#event-34094416918
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/nodejs/node/commit/e9795058c944bbfcf45f5c8b50cb05a3a7e05c11
e979505https://github.com/nodejs/node/commit/e9795058c944bbfcf45f5c8b50cb05a3a7e05c11
test_runner: do not crash on stdout that mimics a v8 framehttps://github.com/nodejs/node/commit/30203d5c36e2c406374b8b3aa2e331dc0836b014
30203d5https://github.com/nodejs/node/commit/30203d5c36e2c406374b8b3aa2e331dc0836b014
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66164
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66164
confirmed-bugIssues and PRs for confirmed bugs.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22confirmed-bug%22
test_runnerIssues and PRs related to the test runner subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22test_runner%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.