Title: stream/iter: zero-byte broadcast writes bypass backpressure and grow buffer unbounded · Issue #64771 · nodejs/node · GitHub
Open Graph Title: stream/iter: zero-byte broadcast writes bypass backpressure and grow buffer unbounded · Issue #64771 · nodejs/node
X Title: stream/iter: zero-byte broadcast writes bypass backpressure and grow buffer unbounded · Issue #64771 · nodejs/node
Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: channel } = broadcast({ budget: 16_384, backpressure: 'strict', }); const rea...
Open Graph Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: channel } = broadcast({ budget: 16_38...
X Description: Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: channel } = broadcast({ budge...
Opengraph URL: https://github.com/nodejs/node/issues/64771
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter: zero-byte broadcast writes bypass backpressure and grow buffer unbounded","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nmacOS 26.5.2\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { broadcast } from 'node:stream/iter';\n\nconst { writer, broadcast: channel } = broadcast({\n budget: 16_384,\n backpressure: 'strict',\n});\nconst readable = channel.push();\n\nlet accepted = 0;\nwhile (accepted \u003c 100_000 && writer.writevSync([])) accepted++;\n\nconsole.log({ accepted, canWrite: writer.canWrite });\n\nawait writer.end();\n\nlet entries = 0;\nfor await (const _ of readable) entries++;\n\nconsole.log({ entries });\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n```console\n{ accepted: 100000, canWrite: true }\n{ entries: 0 }\n```\n\nZero-byte writes should be accepted as no-ops and create no buffer entries, preventing unbounded growth.\n\nFrom specification [§13.1.2 Broadcast backpressure](https://stream-iter.jasnell.me/#broadcast-backpressure)\n> The shared buffer cannot overwrite entries that the slowest consumer has not yet read.\n\n### What do you see instead?\n\n```console\n{ accepted: 100000, canWrite: true }\n{ entries: 100000 }\n```\n\nAll 100,000 empty batches are buffered.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-07-27T01:50:39Z","url":"https://github.com/nodejs/node/issues/64771"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c4cdface-d4d8-6e47-cbd8-55176e5bb629 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1F0:9EF81:5E5A80:7ACD2C:6AED2AB9 |
| html-safe-nonce | 78f20d73ad2186e037b56283d0e1777bafc31a1305b244c92317f927b50bea6c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUYwOjlFRjgxOjVFNUE4MDo3QUNEMkM6NkFFRDJBQjkiLCJ2aXNpdG9yX2lkIjoiNTcxNDk0MzI4NDY4MTE5MDA3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 789ef9246d4682301abb71e8094bca9fca3962b6ae35841f25dbe983817a75dd |
| hovercard-subject-tag | issue:4983587915 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64771/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b751a16d5c86017636fa446fe17ab704146fb02078070c4de0ef1bc6c21116be/nodejs/node/issues/64771 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b751a16d5c86017636fa446fe17ab704146fb02078070c4de0ef1bc6c21116be/nodejs/node/issues/64771 |
| og:image:alt | Version main Platform macOS 26.5.2 Subsystem stream What steps will reproduce the bug? import { broadcast } from 'node:stream/iter'; const { writer, broadcast: channel } = broadcast({ budget: 16_38... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width