René's URL Explorer Experiment


Title: test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file · Issue #65934 · nodejs/node · GitHub

Open Graph Title: test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file · Issue #65934 · nodejs/node

X Title: test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file · Issue #65934 · nodejs/node

Description: Request Please consider backporting #64706 (fix for #64061) to the v22.x release line. State as of 2026-09-09, checked with the GitHub contents API against lib/internal/test_runner/runner.js, looking for ) >>> 0) + kSerializedSizeHeader:...

Open Graph Description: Request Please consider backporting #64706 (fix for #64061) to the v22.x release line. State as of 2026-09-09, checked with the GitHub contents API against lib/internal/test_runner/runner.js, looki...

X Description: Request Please consider backporting #64706 (fix for #64061) to the v22.x release line. State as of 2026-09-09, checked with the GitHub contents API against lib/internal/test_runner/runner.js, looki...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test file","articleBody":"### Request\n\nPlease consider backporting #64706 (fix for #64061) to the `v22.x` release line.\n\n**State as of 2026-09-09**, checked with the GitHub contents API against `lib/internal/test_runner/runner.js`, looking for `) >>> 0) + kSerializedSizeHeader`:\n\n| ref | has the fix |\n| --- | --- |\n| `main` | yes |\n| `v26.x` | yes |\n| `v24.x`, `v24.x-staging` | yes |\n| `v22.x`, `v22.x-staging` | **no** |\n\n#64706 carries no `dont-land-on-v22.x` label, and I could not find an existing backport request or backport PR for v22.x.\n\nThe line is actively released — the most recent v22 release is v22.23.2 (2026-07-29), three days after #64706 landed on `main` (2026-07-26).\n\n### Why this may deserve more weight than the original report suggested\n\n#64061 was reported as an intermittent CI flake. On v22.19.0 I traced the trigger, and it turns out not to be exotic: **it is ordinary non-ASCII text written to stdout by a test.**\n\n`FileTest.#processRawBuffer` advances `bufferHead` past a consumed message and then reads the next four bytes as a length **without re-checking for the `FF 0F` header**:\n\n```js\nbufferHead = TypedArrayPrototypeSubarray(concatenatedBuffer, fullMessageSize);\nthis.#rawBufferSize = TypedArrayPrototypeGetLength(bufferHead);\n...\nwhile (bufferHead?.length >= kSerializedSizeHeader) {\n  const fullMessageSize = (\n    bufferHead[kV8HeaderLength] \u003c\u003c 24 |\n    bufferHead[kV8HeaderLength + 1] \u003c\u003c 16 |\n    bufferHead[kV8HeaderLength + 2] \u003c\u003c 8 |\n    bufferHead[kV8HeaderLength + 3]\n  ) + kSerializedSizeHeader;          // signed 32-bit\n\n  if (this.#rawBufferSize \u003c fullMessageSize) break;\n```\n\nWhen a test's own stdout follows a report message inside the same read, those bytes are interpreted as a length. Every UTF-8 lead/continuation byte is `>= 0x80`, so any non-ASCII output — CJK, emoji, accented Latin — can make `fullMessageSize` negative, which defeats the `break` guard and hands garbage to `DefaultDeserializer`.\n\nIn our repository the emitter was a server start-up banner containing an emoji, printed by the code under test. Three sightings over two days, always the same test file.\n\n### Minimal deterministic reproduction\n\nNo load, no concurrency, no flakiness. One `write()`:\n\n```js\n// repro.mjs   —   node --test repro.mjs\nimport { writeSync } from 'node:fs';\nimport test from 'node:test';\nimport { DefaultSerializer } from 'node:v8';\n\ntest('a passing test', () => {});\n\nconst s = new DefaultSerializer();\ns.writeHeader();\ns.writeValue({ __proto__: null, type: 'test:diagnostic',\n               data: { __proto__: null, nesting: 0, message: 'hi', file: 'repro.mjs' } });\nconst payload = s.releaseBuffer();\nconst size = Buffer.alloc(4);\nsize.writeUInt32BE(payload.length);\nconst message = Buffer.concat([Buffer.from([0xff, 0x0f]), size, payload]);\n\n// a report message, immediately followed by ordinary test stdout, in ONE write\nconst tail = process.env.ASCII ? '\\nserver listening -> http://localhost:3456\\n'\n                               : '\\n\\u{1F7E1} 서버 실행 중 -> http://localhost:3456\\n';\nwriteSync(1, Buffer.concat([message, Buffer.from(tail, 'utf8')]));\n```\n\nOn **v22.19.0, Windows 11 x64**:\n\n```\n$ node --test repro.mjs\nnot ok 1 - repro.mjs\n  error: 'Unable to deserialize cloned data due to invalid or unsupported version.'\n# fail 1\n\n$ ASCII=1 node --test repro.mjs\nok 1 - a passing test\n# fail 0\n```\n\nThe only difference between the two runs is whether the trailing stdout is ASCII.\n\nI only have v22.19.0 on this machine, so I have **not** run this against a fixed release line — the report above is strictly about v22.19.0.\n\n### Three symptoms, and one of them is silent\n\nAlso observed on v22.19.0, depending on where in the stream the corruption lands:\n\n1. a file-level failure carrying the message above (the symptom in #64061);\n2. **the file's results vanish with no failure and no summary.** Running a poisoned file together with a healthy one printed only the healthy file's `ok 1` / `ok 2` — no `1..N`, no `# tests`, no `# fail`, no error text. The exit code was `1`, but the TAP body reads as a clean pass;\n3. with a length byte below `0x80` but large, the runner waits for a message that never arrives and **hangs**.\n\nSymptom 2 is the reason I am filing this: on a line that is still in service, a whole test file can drop out of a run while the output looks green, and only the exit code disagrees.\n\n### Offer\n\nIf the missing step is just a `backport-requested-v22.x` label or an approval, I am happy to open the `[v22.x backport]` PR against `v22.x-staging` — please say so.\n","author":{"url":"https://github.com/positivef","@type":"Person","name":"positivef"},"datePublished":"2026-09-09T11:15:39Z","url":"https://github.com/nodejs/node/issues/65934"}

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:decfaa7a-1f35-e580-8e27-cebfabcbc0be
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC2B2:F1E2C:ED760:1433A2:6AED3532
html-safe-nonce1bf8c3fa679156d0ecdca5826c077df48e067e4dc8c5845073c9089e38be9974
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkIyOkYxRTJDOkVENzYwOjE0MzNBMjo2QUVEMzUzMiIsInZpc2l0b3JfaWQiOiI4MzUyMzQyNTYwNjY2ODkxNTcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6f3abbad9e0856390df50bb9a669db0fa59aa6d421f63f37679eb9945a32b360
hovercard-subject-tagissue:5398680548
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/65934/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6ca2efbaed651087416e404a761f16d964b88b6c5adb6204e258c3ece3dd12e8/nodejs/node/issues/65934
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6ca2efbaed651087416e404a761f16d964b88b6c5adb6204e258c3ece3dd12e8/nodejs/node/issues/65934
og:image:altRequest Please consider backporting #64706 (fix for #64061) to the v22.x release line. State as of 2026-09-09, checked with the GitHub contents API against lib/internal/test_runner/runner.js, looki...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepositivef
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
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
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/65934#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F65934
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%2F65934
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/65934
Reloadhttps://github.com/nodejs/node/issues/65934
Reloadhttps://github.com/nodejs/node/issues/65934
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)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/65934
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/65934
test_runner: backport #64706 to v22.x — non-ASCII test stdout can silently drop a whole test filehttps://github.com/nodejs/node/issues/65934#top
https://github.com/positivef
positivefhttps://github.com/positivef
on Sep 9, 2026https://github.com/nodejs/node/issues/65934#issue-5398680548
#64706https://github.com/nodejs/node/pull/64706
#64061https://github.com/nodejs/node/issues/64061
#64706https://github.com/nodejs/node/pull/64706
#64706https://github.com/nodejs/node/pull/64706
#64061https://github.com/nodejs/node/issues/64061
Error: Unable to deserialize cloned data due to invalid or unsupported version #64061https://github.com/nodejs/node/issues/64061
https://github.com/abhinav-phi
abhinav-phihttps://github.com/abhinav-phi
on Sep 9, 2026https://github.com/nodejs/node/issues/65934#issuecomment-5601889868
#64706https://github.com/nodejs/node/pull/64706
https://github.com/inoway46
inoway46https://github.com/inoway46
on Sep 16, 2026https://github.com/nodejs/node/issues/65934#issuecomment-5697002640
#65807https://github.com/nodejs/node/pull/65807
James-tech92https://github.com/James-tech92
on Sep 18, 2026https://github.com/nodejs/node/issues/65934#event-31401270778
Document the node --test IPC flake and add a workaround scripthttps://github.com/James-tech92/entra-collect/commit/bcccf928fdb1cd9cd52acb05a7d17f0d31d39ef5
bcccf92https://github.com/James-tech92/entra-collect/commit/bcccf928fdb1cd9cd52acb05a7d17f0d31d39ef5
1395490241lhj-codehttps://github.com/1395490241lhj-code
on Oct 21, 2026https://github.com/nodejs/node/issues/65934#event-33801906532
test(node22): avoid startup log deserialization failurehttps://github.com/1395490241lhj-code/kitchenmanager/commit/f533d6d339025966fefd79e5590f51df6456d416
f533d6dhttps://github.com/1395490241lhj-code/kitchenmanager/commit/f533d6d339025966fefd79e5590f51df6456d416
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/65934
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/65934
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.