Title: stream/iter: toWritable() duplicates writes when writeSync() returns false after accepting chunk · Issue #63359 · nodejs/node · GitHub
Open Graph Title: stream/iter: toWritable() duplicates writes when writeSync() returns false after accepting chunk · Issue #63359 · nodejs/node
X Title: stream/iter: toWritable() duplicates writes when writeSync() returns false after accepting chunk · Issue #63359 · nodejs/node
Description: Version 26.1.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { push, text, toWritable } from 'node:stream/iter'; const { writer, readable } = push({ highWaterMark: 1, backpressure: 'block' }); const wri...
Open Graph Description: Version 26.1.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { push, text, toWritable } from 'node:stream/iter'; const { writer, readable } = push({ highWaterMark...
X Description: Version 26.1.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { push, text, toWritable } from 'node:stream/iter'; const { writer, readable } = push({ highW...
Opengraph URL: https://github.com/nodejs/node/issues/63359
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stream/iter: toWritable() duplicates writes when writeSync() returns false after accepting chunk","articleBody":"### Version\n\n26.1.0\n\n### Platform\n\n```text\nmacOS 26.5.0\n```\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n```js\nimport { push, text, toWritable } from 'node:stream/iter';\n\nconst { writer, readable } = push({ highWaterMark: 1, backpressure: 'block' });\nconst writable = toWritable(writer);\n\nawait new Promise((resolve, reject) =\u003e {\n writable.write('a', (err) =\u003e err ? reject(err) : resolve());\n});\n\nwritable.write('b');\nwritable.end();\n\nconsole.log(await text(readable)); // abb, expected ab\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\nab\n```\n\nThe adapter should not write the same chunk twice; the repro should output `ab`.\n\n### What do you see instead?\n\n```console\nabb\n```\n\n`toWritable()` retries via `writer.write()` when `PushWriter.writeSync()` returns false, even though `PushWriter` already accepted the chunk under `backpressure: 'block'`, producing `abb`.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-05-16T02:18:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/63359/node/issues/63359"}
| 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:39ab374d-0c2f-c6e9-9ac2-4ff7a8d61f88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A22C:391DC1:1C82D3B:294779F:6A4D0097 |
| html-safe-nonce | 3eb68e511b8dc64c6dcd1971e1cd84ffeeb946327e21ab571f14e033c04d8452 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjJDOjM5MURDMToxQzgyRDNCOjI5NDc3OUY6NkE0RDAwOTciLCJ2aXNpdG9yX2lkIjoiMTU5MTM0MjMzNjIxNzc3NjI3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5cc3cecc9e88be02deaf15cbec79eeebf885b3488511165263765a8d977a85a9 |
| hovercard-subject-tag | issue:4458191507 |
| 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/63359/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5e090bf96ce89fc92ece2d1b86c9185e24461d07c013342bcc632c04566e49e/nodejs/node/issues/63359 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5e090bf96ce89fc92ece2d1b86c9185e24461d07c013342bcc632c04566e49e/nodejs/node/issues/63359 |
| og:image:alt | Version 26.1.0 Platform macOS 26.5.0 Subsystem stream What steps will reproduce the bug? import { push, text, toWritable } from 'node:stream/iter'; const { writer, readable } = push({ highWaterMark... |
| 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 | 31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5 |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width