René's URL Explorer Experiment


Title: stream: `pipe()` no longer ends the destination when EOF follows a backpressured last chunk (regression in v26.11.0) · Issue #67762 · nodejs/node · GitHub

Open Graph Title: stream: `pipe()` no longer ends the destination when EOF follows a backpressured last chunk (regression in v26.11.0) · Issue #67762 · nodejs/node

X Title: stream: `pipe()` no longer ends the destination when EOF follows a backpressured last chunk (regression in v26.11.0) · Issue #67762 · nodejs/node

Description: Version v26.11.0, v26.12.1, v26.13.1 (works in v26.10.0 and in v20, v22 and v24) Platform Linux 192.168.1.15 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 16:33:25 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux (It must be note...

Open Graph Description: Version v26.11.0, v26.12.1, v26.13.1 (works in v26.10.0 and in v20, v22 and v24) Platform Linux 192.168.1.15 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 16:33:25 UTC 2026 x86_64 ...

X Description: Version v26.11.0, v26.12.1, v26.13.1 (works in v26.10.0 and in v20, v22 and v24) Platform Linux 192.168.1.15 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 16:33:25 UTC 2026 x86_64 ...

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

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":"stream: `pipe()` no longer ends the destination when EOF follows a backpressured last chunk (regression in v26.11.0)","articleBody":"### Version\n\nv26.11.0, v26.12.1, v26.13.1 (works in v26.10.0 and in v20, v22 and v24)\n\n### Platform\n\n```text\nLinux 192.168.1.15 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 16:33:25 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux\n\n(It must be noted this is the Hosts' command. The replication is done inside a Podman Container)\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\n'use strict';\nconst { Readable, Writable } = require('node:stream');\n\n// Source pushes EOF in a later _read() call than its last chunk.\nconst chunks = [Buffer.alloc(64), Buffer.alloc(64), Buffer.alloc(64)];\nlet i = 0;\nconst src = new Readable({\n  highWaterMark: 64,\n  read() { this.push(i \u003c chunks.length ? chunks[i++] : null); },\n});\n\n// Destination completes every write except the last one.\nlet n = 0;\nconst dest = new Writable({\n  highWaterMark: 1,\n  write(chunk, enc, cb) { if (++n \u003c chunks.length) setImmediate(cb); },\n});\n\nlet endCalled = false;\nconst end = dest.end;\ndest.end = function(...args) { endCalled = true; return end.apply(this, args); };\n\nsrc.pipe(dest);\nsetTimeout(() => {\n  console.log(`${process.version}: src 'end' emitted: ${src.readableEnded}, dest.end() called: ${endCalled}`);\n}, 100);\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways, when both of these hold:\n\n- the source pushes `null` in a `_read()` call after the one that pushed its last chunk, and\n- `dest.write()` returns `false` for that last chunk.\n\n### What is the expected behavior? Why is that the expected behavior?\n\n```\nv26.10.0: src 'end' emitted: true, dest.end() called: true\n```\n\nThis is the behavior of v26.10.0 and earlier, including v20, v22 and v24. There, `read()` schedules `endReadable()` once it has hit EOF and the buffer is empty, so `pipe()` calls `dest.end()` without waiting for `'drain'`.\n\n### What do you see instead?\n\n```\nv26.11.0: src 'end' emitted: false, dest.end() called: false\nv26.13.1: src 'end' emitted: false, dest.end() called: false\n```\n\nThe source stays paused with `readableEnded === false` and `_readableState.ended === true`. `'end'` is only emitted if the destination emits another `'drain'`.\n\n### Additional information\n\n## Additional information\n\nBisected across the published binaries: v26.10.0 is good and v26.11.0 is bad. The relevant change is the new `flowSync()` fast path in `lib/internal/streams/readable.js`. When `_read()` pushes EOF while `flowSync()` is delivering the last chunk, nothing schedules `endReadable()`, whereas the general `read()` path does (`if (nOrig !== n && (state[kState] & kEnded) !== 0) endReadable(this);`).\n\n**Real-world impact:** `@azure/storage-blob`'s `BuffersStream` has exactly this shape, and `node-fetch` 2.x sends request bodies with `body.pipe(req)`. Since v26.11.0, uploads through that stack (for example `actions/upload-artifact`-style clients) can leave a request that never calls `req.end()`. Combined with #YYYYY (the HTTP client drops the socket `'drain'` once the response is complete), the upload step finishes its work and the process then never exits. We saw this in CI over HTTPS, in about 7 of 8 runs uploading a ~180 MB artifact in 8 MiB blocks.\n\n## AI Disclaimer\n\nThis report was made almost entirely with an AI. With the exception of this precise disclaimer.\nIn particular, this was a bug I found in production for our local infrastructure, where CI runs in a self-hosted Forgejo, and a Forgejo Runner, suddenly hung when using forgejo/upload-artifacts@v4 and @v5 with a ~200MB artifact, despite everything working with @v3, and in earlier versions of node.\n\nFor now we are reverting to @v3, but I am obviously notifying the maintainers of the forgejo runner so this can be worked around upstream.\n\nThe AI agent has made a patch that schedules `endReadable()` in `flowSync()` under the same condition as `read()`, with a test.\n\nI don't post a PR, because the AI contribution guidelines specify that the user proposing a PR must fully understand the changes, which I don't yet fully. Thus I post the patch and other relevant files, so the maintainers can check its accuracy, and maybe implement their own patch/test if needed\n\nI am open to any other data that might be needed to clarify the situation, to the best of my ability.\n\nFound at the same time as issue #67763\n\n[0001-stream-emit-end-after-backpressured-last-pipe-chunk.patch](https://github.com/user-attachments/files/35373833/0001-stream-emit-end-after-backpressured-last-pipe-chunk.patch)","author":{"url":"https://github.com/AZMCode","@type":"Person","name":"AZMCode"},"datePublished":"2026-11-24T20:28:45Z","url":"https://github.com/nodejs/node/issues/67762"}

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:9aab2c97-8287-766f-0e06-99385bc8795b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA09A:14227A:3592B3:4816F7:6B06199E
html-safe-noncefc0298c983bca3fca17efc66dd156af49953fd8f1f33669724d8c284380e5e20
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDlBOjE0MjI3QTozNTkyQjM6NDgxNkY3OjZCMDYxOTlFIiwidmlzaXRvcl9pZCI6Ijc3MzkwODI3MzkwMjYzNjg5MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac80f9faf88228d3af1f1401c12c663f3942feac9a232cb2b7a74d9e3c59a90a5a
hovercard-subject-tagissue:6590780383
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/67762/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f19c6855b5c02e87f91ebe48aef4bf5684e6c22ebf5d7129dbb18927e6482f09/nodejs/node/issues/67762
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f19c6855b5c02e87f91ebe48aef4bf5684e6c22ebf5d7129dbb18927e6482f09/nodejs/node/issues/67762
og:image:altVersion v26.11.0, v26.12.1, v26.13.1 (works in v26.10.0 and in v20, v22 and v24) Platform Linux 192.168.1.15 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 16:33:25 UTC 2026 x86_64 ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAZMCode
hostnamegithub.com
expected-hostnamegithub.com
None97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374
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
release866f202ebf7ac5aff8f633417d9fd8a53818a977
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/67762#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67762
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%2F67762
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/67762
Reloadhttps://github.com/nodejs/node/issues/67762
Reloadhttps://github.com/nodejs/node/issues/67762
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues630 (630)https://github.com/nodejs/node/issues
Pull requests659 (659)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/67762
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67762
stream: pipe() no longer ends the destination when EOF follows a backpressured last chunk (regression in v26.11.0)https://github.com/nodejs/node/issues/67762#top
https://github.com/AZMCode
AZMCodehttps://github.com/AZMCode
on Nov 24, 2026https://github.com/nodejs/node/issues/67762#issue-6590780383
@v5https://github.com/v5
@V3https://github.com/V3
@V3https://github.com/V3
#67763https://github.com/nodejs/node/issues/67763
0001-stream-emit-end-after-backpressured-last-pipe-chunk.patchhttps://github.com/user-attachments/files/35373833/0001-stream-emit-end-after-backpressured-last-pipe-chunk.patch
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/67762
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67762
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.