René's URL Explorer Experiment


Title: http2: async iterator rejects complete buffered response after NO_ERROR reset with request side open · Issue #66693 · nodejs/node · GitHub

Open Graph Title: http2: async iterator rejects complete buffered response after NO_ERROR reset with request side open · Issue #66693 · nodejs/node

X Title: http2: async iterator rejects complete buffered response after NO_ERROR reset with request side open · Issue #66693 · nodejs/node

Description: Version Reproduced on v24.18.0 and v26.11.1, with 20/20 failures on each. v26.11.1 was the node npm package's latest version when tested. Platform Linux 6.12.95+deb13-amd64, x86_64 GNU/Linux. The installed v24.18.0 reports nghttp2 1.69.0...

Open Graph Description: Version Reproduced on v24.18.0 and v26.11.1, with 20/20 failures on each. v26.11.1 was the node npm package's latest version when tested. Platform Linux 6.12.95+deb13-amd64, x86_64 GNU/Linux. The i...

X Description: Version Reproduced on v24.18.0 and v26.11.1, with 20/20 failures on each. v26.11.1 was the node npm package's latest version when tested. Platform Linux 6.12.95+deb13-amd64, x86_64 GNU/Linux. T...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"http2: async iterator rejects complete buffered response after NO_ERROR reset with request side open","articleBody":"### Version\n\nReproduced on **v24.18.0** and **v26.11.1**, with 20/20 failures on each. v26.11.1 was the `node` npm package's latest version when tested.\n\n### Platform\n\nLinux 6.12.95+deb13-amd64, x86_64 GNU/Linux.\n\nThe installed v24.18.0 reports nghttp2 1.69.0 and OpenSSL 3.5.7. v26.11.1 was tested using `npm exec --yes --package=node@26.11.1 -- node ...`.\n\n### Subsystem\n\n`http2`, `stream` (`ClientHttp2Stream` readable async iteration / end-of-stream handling).\n\n### What steps will reproduce the bug?\n\nA standalone, dependency-free reproduction gist:\n\nhttps://gist.github.com/jbeda/cb47933e03eb33febf937c159b780b9b\n\nPinned script: https://gist.githubusercontent.com/jbeda/cb47933e03eb33febf937c159b780b9b/raw/6502872f0d06b6c3b93ee1c83ab17b4c19dbe7e2/repro.mjs\n\nSave the gist's `repro.mjs` locally and run:\n\n```sh\nnode repro.mjs\n```\n\nNo package installation, proxy, Go server, or gRPC library is required. It uses `node:http2` as the client and a small `node:net` peer bound to a loopback ephemeral port. The peer writes explicit HTTP/2 frames with a static-table `:status: 200` HPACK entry and a literal `grpc-status: 0` trailer. The body is synthetic plain bytes, not protobuf or gRPC framing.\n\nThe script synchronizes on events, without scheduling sleeps or retries:\n\n1. Client starts a POST, writes some request bytes, and deliberately does **not** call `request.end()`.\n2. Peer sends response HEADERS and initial DATA.\n3. Client creates the built-in async iterator, consumes the initial DATA, verifies `writableEnded === false`, then pauses iteration.\n4. Peer sends final DATA, trailers with `END_STREAM`, and `RST_STREAM(NO_ERROR)` in that order in one socket write. The reset does not overtake the response bytes on the wire.\n5. Client waits for trailers and the reset-induced `aborted` event. It verifies `grpc-status === '0'`, `rstCode === 0`, and that all 17 final response bytes remain buffered.\n6. Client resumes the **existing** iterator. It receives and verifies the exact final bytes.\n7. The following `next()` throws `ERR_STREAM_PREMATURE_CLOSE` instead of returning EOF.\n\nThe five-second timeout only catches a hung reproduction. Session/socket destruction is in `finally`, after the EOF read; it does not cause the failure.\n\n### How often does it reproduce? Is there a required condition?\n\nDeterministic with the event-gated sequence above. I tested the failing case and both controls 20 times each on both runtimes, checking the failing exit status, specific error code, and complete-byte receipt:\n\n| Version | Buffered final DATA + NO_ERROR reset | Same exchange without reset | Final DATA consumed before trailers/reset |\n| --- | --- | --- | --- |\n| v24.18.0 | 20/20 `ERR_STREAM_PREMATURE_CLOSE` | 20/20 clean EOF | 20/20 clean EOF |\n| v26.11.1 | 20/20 `ERR_STREAM_PREMATURE_CLOSE` | 20/20 clean EOF | 20/20 clean EOF |\n\nControls:\n\n```sh\nnode repro.mjs no-reset\nnode repro.mjs drained\n```\n\nThe relevant conditions are an open request side, an already-created readable async iterator, and response DATA still buffered when a post-response `NO_ERROR` reset arrives. Without event gating, this manifests intermittently in application traffic.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe request side is closed by the reset, but the complete response remains consumable and the readable iterator finishes normally. Successful response END_STREAM has already arrived and every response byte can still be read.\n\nRFC 9113 section 8.1 explicitly permits `RST_STREAM(NO_ERROR)` after a complete response while a request remains in progress and says clients must not discard responses because of such a reset. Both control cases demonstrate clean EOF on the same response content.\n\n### What do you see instead?\n\nOn v24.18.0:\n\n```text\n{\"node\":\"v24.18.0\",\"mode\":\"reset\",\"status\":\"0\",\"rstCode\":0,\"readableLength\":17,\"writableEnded\":true}\nComplete response bytes received.\nnode:internal/streams/end-of-stream:166\n                             new ERR_STREAM_PREMATURE_CLOSE());\n                             ^\n\nError [ERR_STREAM_PREMATURE_CLOSE]: Premature close\n    at ClientHttp2Stream.onclose (node:internal/streams/end-of-stream:166:30)\n    at ClientHttp2Stream.emit (node:events:521:24)\n    at closeStream (node:internal/http2/core:2033:14)\n    at Http2Stream.onStreamClose (node:internal/http2/core:605:5) {\n  code: 'ERR_STREAM_PREMATURE_CLOSE'\n}\n\nNode.js v24.18.0\n```\n\n`writableEnded` becomes true upon reset; it was explicitly checked as false before sending completion, and the script never calls `request.end()`.\n\nv26.11.1 also yields all response bytes and then throws, with `getEosOnCloseError` at `end-of-stream:98`, `onclose` at `end-of-stream:265`, and `closeStream` at `http2/core:2088`.\n\n### Additional information\n\n**Related, but a different reproducer from #65677 / #65689:** that issue ends the request and begins iteration after normal stream closure. It lists v24.18.0 as passing. This case leaves the request open and starts/consumes the iterator before closure; it fails on v24.18.0 as well. I have not tested #65689's proposed patch against this case and am not claiming it fixes or fails to fix it.\n\nThe observed sequence suggests readable end-of-stream handling interprets the reset-induced duplex `aborted` event as premature response termination while completed-response bytes are buffered. Those bytes can subsequently be yielded, but the iterator retains a premature-close error for its next read. This is a mechanism hypothesis for maintainers to validate, not a proposed production monkeypatch.\n\nThis was observed in the wild with gRPC, but it is a more general HTTP/2 response-consumption issue. The standalone reproduction uses only Node core and synthetic response bytes; it does not depend on gRPC or an application framework.\n\nFiling this to determine whether the open-request/active-iterator case belongs with #65677 or requires separate handling.\n","author":{"url":"https://github.com/jbeda","@type":"Person","name":"jbeda"},"datePublished":"2026-10-13T02:15:19Z","url":"https://github.com/nodejs/node/issues/66693"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4657c682-12b7-0cfb-f893-c8f4d1970f4e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id89D6:220853:B4285:EEDEE:6B036A24
html-safe-nonceace13711b88a307bc598d4623f6047f4b7e594e841a089191fc7a2af3dc58cf6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUQ2OjIyMDg1MzpCNDI4NTpFRURFRTo2QjAzNkEyNCIsInZpc2l0b3JfaWQiOiI0NDEyNzUwOTM0NzMyNjYzMzMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb9521a17e6fdd0cee4dd9b2ba2dc08fec08ad997c11d40a5cb7f00d2f3a0a95b
hovercard-subject-tagissue:5823352411
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/66693/issue_layout
twitter:imagehttps://opengraph.githubassets.com/616691dc339e864b2f53a2b543ba7c84aa8eb6ee2dd4c8039d985a8ea5625b38/nodejs/node/issues/66693
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/616691dc339e864b2f53a2b543ba7c84aa8eb6ee2dd4c8039d985a8ea5625b38/nodejs/node/issues/66693
og:image:altVersion Reproduced on v24.18.0 and v26.11.1, with 20/20 failures on each. v26.11.1 was the node npm package's latest version when tested. Platform Linux 6.12.95+deb13-amd64, x86_64 GNU/Linux. The i...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejbeda
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66693#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66693
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%2F66693
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/66693
Reloadhttps://github.com/nodejs/node/issues/66693
Reloadhttps://github.com/nodejs/node/issues/66693
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues639 (639)https://github.com/nodejs/node/issues
Pull requests667 (667)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/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66693
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66693
#67558https://github.com/nodejs/node/pull/67558
#67553https://github.com/nodejs/node/pull/67553
http2: async iterator rejects complete buffered response after NO_ERROR reset with request side openhttps://github.com/nodejs/node/issues/66693#top
#67558https://github.com/nodejs/node/pull/67558
#67553https://github.com/nodejs/node/pull/67553
https://github.com/jbeda
jbedahttps://github.com/jbeda
on Oct 13, 2026https://github.com/nodejs/node/issues/66693#issue-5823352411
https://gist.github.com/jbeda/cb47933e03eb33febf937c159b780b9bhttps://gist.github.com/jbeda/cb47933e03eb33febf937c159b780b9b
https://gist.githubusercontent.com/jbeda/cb47933e03eb33febf937c159b780b9b/raw/6502872f0d06b6c3b93ee1c83ab17b4c19dbe7e2/repro.mjshttps://gist.githubusercontent.com/jbeda/cb47933e03eb33febf937c159b780b9b/raw/6502872f0d06b6c3b93ee1c83ab17b4c19dbe7e2/repro.mjs
#65677https://github.com/nodejs/node/issues/65677
#65689https://github.com/nodejs/node/pull/65689
#65689https://github.com/nodejs/node/pull/65689
#65677https://github.com/nodejs/node/issues/65677
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 13, 2026https://github.com/nodejs/node/issues/66693#issuecomment-6151520095
@jbedahttps://github.com/jbeda
#65677https://github.com/nodejs/node/issues/65677
one week from nowhttps://endoflife.date/nodejs
#63249https://github.com/nodejs/node/pull/63249
https://github.com/jbeda
jbedahttps://github.com/jbeda
on Oct 14, 2026https://github.com/nodejs/node/issues/66693#issuecomment-6160089343
peppescghttps://github.com/peppescg
on Oct 15, 2026https://github.com/nodejs/node/issues/66693#event-33339034447
fix(sdk): end gRPC request sides when response trailers arrivehttps://github.com/stacklok/mecatl/commit/3a94de7f3dc8318ed504a4119fc8b321da60c2ff
3a94de7https://github.com/stacklok/mecatl/commit/3a94de7f3dc8318ed504a4119fc8b321da60c2ff
https://github.com/bitpshr
bitpshrhttps://github.com/bitpshr
on Oct 19, 2026https://github.com/nodejs/node/issues/66693#issuecomment-6279212830
@pimterryhttps://github.com/pimterry
#65677https://github.com/nodejs/node/issues/65677
#65689https://github.com/nodejs/node/pull/65689
#65689https://github.com/nodejs/node/pull/65689
#65677https://github.com/nodejs/node/issues/65677
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Nov 18, 2026https://github.com/nodejs/node/issues/66693#issuecomment-6977620618
#67553https://github.com/nodejs/node/pull/67553
#67558https://github.com/nodejs/node/pull/67558
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#67553https://github.com/nodejs/node/pull/67553
on Nov 19, 2026https://github.com/nodejs/node/issues/66693#event-36681263214
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66693
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66693
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.