Title: stream: fix pipeTo assert when writer is released during microtask by colinaaa · Pull Request #63733 · nodejs/node · GitHub
Open Graph Title: stream: fix pipeTo assert when writer is released during microtask by colinaaa · Pull Request #63733 · nodejs/node
X Title: stream: fix pipeTo assert when writer is released during microtask by colinaaa · Pull Request #63733 · nodejs/node
Description: Summary The deferred write introduced by #61800 wraps the write operation in queueMicrotask(). A race condition exists where the pipe can shutdown and release the writer between when [kChunk] schedules the microtask and when it executes, causing an ERR_INTERNAL_ASSERTION because writer[[stream]] is undefined. Fix by checking writer[kState].stream === undefined in the deferred microtask before attempting the write. This condition is only true after finalize() has released the writer, precisely targeting the crash without interfering with the spec requirement that already-read chunks are written to a still-writable destination during shutdown. Fixes: #63732
Open Graph Description: Summary The deferred write introduced by #61800 wraps the write operation in queueMicrotask(). A race condition exists where the pipe can shutdown and release the writer between when [kChunk] sched...
X Description: Summary The deferred write introduced by #61800 wraps the write operation in queueMicrotask(). A race condition exists where the pipe can shutdown and release the writer between when [kChunk] sched...
Opengraph URL: https://github.com/nodejs/node/pull/63733
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:68f89b39-72d7-51b9-95d8-59549e8e7bb8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E87C:3452D4:813912:B4148F:6A4C92F7 |
| html-safe-nonce | 0acd43a20fd025c33b7aec12e12f01c3a8a71f8b98a32023c623de0487f23923 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODdDOjM0NTJENDo4MTM5MTI6QjQxNDhGOjZBNEM5MkY3IiwidmlzaXRvcl9pZCI6IjkwNjExODA1NzAxNjQwNDA0MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d055c569a8c00c0d5b801d82b6dba13ee3479ea76d139a7eb57c91cd5b73561c |
| hovercard-subject-tag | pull_request:3794876209 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/nodejs/node/pull/63733/files |
| twitter:image | https://avatars.githubusercontent.com/u/40660121?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40660121?s=400&v=4 |
| og:image:alt | Summary The deferred write introduced by #61800 wraps the write operation in queueMicrotask(). A race condition exists where the pipe can shutdown and release the writer between when [kChunk] sched... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width