René's URL Explorer Experiment


Title: zstd decoding complete frame in read stream halts stream · Issue #64741 · nodejs/node · GitHub

Open Graph Title: zstd decoding complete frame in read stream halts stream · Issue #64741 · nodejs/node

X Title: zstd decoding complete frame in read stream halts stream · Issue #64741 · nodejs/node

Description: Version v26.5.0 Platform Darwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Tue Apr 21 20:19:12 PDT 2026; root:xnu-11417.140.69.710.16~1/RELEASE_ARM64_T6041 arm64 Subsystem No response What steps will reproduce the bug? import { Buffer ...

Open Graph Description: Version v26.5.0 Platform Darwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Tue Apr 21 20:19:12 PDT 2026; root:xnu-11417.140.69.710.16~1/RELEASE_ARM64_T6041 arm64 Subsystem No response What steps ...

X Description: Version v26.5.0 Platform Darwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Tue Apr 21 20:19:12 PDT 2026; root:xnu-11417.140.69.710.16~1/RELEASE_ARM64_T6041 arm64 Subsystem No response What steps ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zstd decoding complete frame in read stream halts stream","articleBody":"### Version\n\nv26.5.0\n\n### Platform\n\n```text\nDarwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Tue Apr 21 20:19:12 PDT 2026; root:xnu-11417.140.69.710.16~1/RELEASE_ARM64_T6041 arm64\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n```js\nimport { Buffer } from 'node:buffer';\nimport * as consumers from 'node:stream/consumers';\nimport * as zlib from 'node:zlib';\n\nfunction consume(codec, writes) {\n\tconst inflate = codec.createDecompress();\n\tconst result = consumers.buffer(inflate);\n\twrites.forEach(write => inflate.write(write));\n\tinflate.end();\n\treturn result;\n}\n\nfunction describe(buffer) {\n\tconst aa = buffer.includes(0x41);\n\tconst bb = buffer.includes(0x42);\n\tconst which = function() {\n\t\tif (aa && bb) {\n\t\t\treturn 'frameA + frameB';\n\t\t} else if (aa) {\n\t\t\treturn 'frameA only';\n\t\t} else if (bb) {\n\t\t\treturn 'frameB only';\n\t\t} else {\n\t\t\treturn 'nothing';\n\t\t}\n\t}();\n\treturn `${buffer.length} bytes (${which})`;\n}\n\nasync function attempt(codec, writes) {\n\ttry {\n\t\treturn describe(await consume(codec, writes));\n\t} catch (error) {\n\t\treturn `threw: ${error.message}`;\n\t}\n}\n\nconst tests = [ {\n\tname: 'zstd',\n\tcompress: buffer => zlib.zstdCompressSync(buffer),\n\tcreateDecompress: () => zlib.createZstdDecompress(),\n}, {\n\tname: 'gzip',\n\tcompress: buffer => zlib.gzipSync(buffer),\n\tcreateDecompress: () => zlib.createGunzip(),\n} ];\n\nconsole.log(`node ${process.version}`);\nfor (const codec of tests) {\n\t// 'A' / 'B'\n\tconst frameA = codec.compress(Buffer.alloc(2000, 0x41));\n\tconst frameB = codec.compress(Buffer.alloc(2000, 0x42));\n\tconst concatenated = Buffer.concat([ frameA, frameB ]);\n\n\t// BUG: both frames in a single write — the boundary between them falls inside one input buffer.\n\tconst bug = await attempt(codec, [ concatenated ]);\n\t// COUNTER-EXAMPLE: the same two frames, one per write — the boundary lands at a write boundary.\n\tconst counter = await attempt(codec, [ frameA, frameB ]);\n\n\tconsole.log(`${codec.name}:`);\n\tconsole.log(`  stream, both frames in ONE write   -> ${bug}`);\n\tconsole.log(`  stream, one frame per write        -> ${counter}`);\n}\n```\n\n### How often does it reproduce? Is there a required condition?\n\nThis reproduces every time\n\n### What is the expected behavior? Why is that the expected behavior?\n\nDecoding concatenated zstd payloads should decode correctly as one stream. Indeed, `zstdcat` will decode this correctly (omitted from example but you can take my word for it).\n\n### What do you see instead?\n\n```\nmarcel[1:42:21PM] [~/xx] ~/Downloads/node-v26.5.0-darwin-arm64/bin/node a.mjs\nnode v26.5.0\nzstd:\n  stream, both frames in ONE write   -> 2000 bytes (frameA only)\n  stream, one frame per write        -> 4000 bytes (frameA + frameB)\ngzip:\n  stream, both frames in ONE write   -> 4000 bytes (frameA + frameB)\n  stream, one frame per write        -> 4000 bytes (frameA + frameB)\n```\n\n### Additional information\n\nThis will cause spurious failures while decoding zstd streams. The odds of it happening are a function of stream read size vs zstd chunk size. In my case I ran into this while decoding a stream after about 3GB and tracked it down to this bug.","author":{"url":"https://github.com/laverdet","@type":"Person","name":"laverdet"},"datePublished":"2026-07-25T18:45:40Z","url":"https://github.com/nodejs/node/issues/64741"}

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:2b42a844-e2c2-1d91-5d94-d1a9237e950d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE5AE:D9695:3F43E0:5235B1:6AED2103
html-safe-noncef741179880fef6343a2b57d71efdc5568d43256f6a720494c8a8c2e7bb07b3bf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUFFOkQ5Njk1OjNGNDNFMDo1MjM1QjE6NkFFRDIxMDMiLCJ2aXNpdG9yX2lkIjoiNDE0MzY1NzAyMTU5MDAyMDM1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac788c939cf9a749f1df3352a70e0f22124e88ab9c64c914d9b3e5fb2f88080ac4
hovercard-subject-tagissue:4977181748
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/64741/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ab10331ea8d60d5c3671bb3940fd0aa8c9be4485f5575ef03cf5e2d8587419d6/nodejs/node/issues/64741
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ab10331ea8d60d5c3671bb3940fd0aa8c9be4485f5575ef03cf5e2d8587419d6/nodejs/node/issues/64741
og:image:altVersion v26.5.0 Platform Darwin Mac.lan 24.6.0 Darwin Kernel Version 24.6.0: Tue Apr 21 20:19:12 PDT 2026; root:xnu-11417.140.69.710.16~1/RELEASE_ARM64_T6041 arm64 Subsystem No response What steps ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelaverdet
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
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
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/64741#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64741
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%2F64741
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/64741
Reloadhttps://github.com/nodejs/node/issues/64741
Reloadhttps://github.com/nodejs/node/issues/64741
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/64741
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64741
zstd decoding complete frame in read stream halts streamhttps://github.com/nodejs/node/issues/64741#top
streamIssues and PRs related to Node.js streams.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stream%22
zlibIssues and PRs related to the zlib module and its compression dependencies.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22zlib%22
https://github.com/laverdet
laverdethttps://github.com/laverdet
on Jul 25, 2026https://github.com/nodejs/node/issues/64741#issue-4977181748
avivkellerhttps://github.com/avivkeller
zlibIssues and PRs related to the zlib module and its compression dependencies.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22zlib%22
streamIssues and PRs related to Node.js streams.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stream%22
on Jul 25, 2026https://github.com/nodejs/node/issues/64741#event-28482655298
agape1225https://github.com/agape1225
on Sep 8, 2026https://github.com/nodejs/node/issues/64741#event-30755695900
zlib: decode concatenated zstd frameshttps://github.com/agape1225/node/commit/f93a2bbd112fa712b7b5ff7d33f9acd07728c9ce
f93a2bbhttps://github.com/agape1225/node/commit/f93a2bbd112fa712b7b5ff7d33f9acd07728c9ce
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Oct 24, 2026https://github.com/nodejs/node/issues/64741#issuecomment-6378145720
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Oct 24, 2026https://github.com/nodejs/node/issues/64741#event-34104610585
https://github.com/laverdet
laverdethttps://github.com/laverdet
on Oct 24, 2026https://github.com/nodejs/node/issues/64741#issuecomment-6385096128
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Oct 25, 2026https://github.com/nodejs/node/issues/64741#event-34159077984
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/64741
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64741
streamIssues and PRs related to Node.js streams.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stream%22
zlibIssues and PRs related to the zlib module and its compression dependencies.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22zlib%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.