René's URL Explorer Experiment


Title: http: chunked ServerResponse never emits 'drain' and stalls after ~64 KiB when written strings contain non-ASCII (regression in v24.22.0 / v26.9.0) · Issue #66924 · nodejs/node · GitHub

Open Graph Title: http: chunked ServerResponse never emits 'drain' and stalls after ~64 KiB when written strings contain non-ASCII (regression in v24.22.0 / v26.9.0) · Issue #66924 · nodejs/node

X Title: http: chunked ServerResponse never emits 'drain' and stalls after ~64 KiB when written strings contain non-ASCII (regression in v24.22.0 / v26.9.0) · Issue #66924 · nodejs/node

Description: Version v24.22.0, v24.22.1, v26.9.0 – v26.12.1 (regression; last good: v24.21.0, v26.8.2, v25.9.0, v22.23.4) Platform Linux (official node:*-alpine Docker images, linux/amd64). Also seen in production on the same images. Subsystem http W...

Open Graph Description: Version v24.22.0, v24.22.1, v26.9.0 – v26.12.1 (regression; last good: v24.21.0, v26.8.2, v25.9.0, v22.23.4) Platform Linux (official node:*-alpine Docker images, linux/amd64). Also seen in product...

X Description: Version v24.22.0, v24.22.1, v26.9.0 – v26.12.1 (regression; last good: v24.21.0, v26.8.2, v25.9.0, v22.23.4) Platform Linux (official node:*-alpine Docker images, linux/amd64). Also seen in product...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"http: chunked ServerResponse never emits 'drain' and stalls after ~64 KiB when written strings contain non-ASCII (regression in v24.22.0 / v26.9.0)","articleBody":"### Version\n\nv24.22.0, v24.22.1, v26.9.0 – v26.12.1 (regression; last good: v24.21.0, v26.8.2, v25.9.0, v22.23.4)\n\n### Platform\n\nLinux (official `node:*-alpine` Docker images, linux/amd64). Also seen in production on the same images.\n\n### Subsystem\n\nhttp\n\n### What steps will reproduce the bug?\n\nA chunked `http.ServerResponse` stops sending data and never emits `'drain'` after the first backpressure cycle when the written strings contain non-ASCII characters. ASCII-only data is fine.\n\n```js\nimport http from 'node:http';\n\nconst nonAscii = process.argv[2]; // try \"x\" (works) and \"—\" (hangs)\n\nconst server = http.createServer(async (req, res) => {\n  let writes = 0;\n  let drainWaits = 0;\n  const watchdog = setTimeout(() => {\n    console.log(process.version, `char=${JSON.stringify(nonAscii)}`,\n      `STUCK: writes=${writes} drainWaits=${drainWaits}`,\n      `writableLength=${res.writableLength} hwm=${res.writableHighWaterMark}`,\n      `corked=${res.writableCorked} socketWritableLength=${res.socket.writableLength}`);\n    process.exit(1);\n  }, 2500);\n\n  for (let i = 0; i \u003c 4000; i++) {\n    const pieces = [(i ? ',' : '') + '{\"id\":\"row_' + i + '\",\"note\":\"Accrued payroll ', nonAscii, ' March\",\"amount\":' + i * 1.5 + '}'];\n    for (const piece of pieces) {\n      writes++;\n      if (!res.write(piece)) {\n        drainWaits++;\n        await new Promise((resolve) => res.once('drain', resolve));\n      }\n    }\n  }\n  clearTimeout(watchdog);\n  res.end();\n  console.log(process.version, `char=${JSON.stringify(nonAscii)}`, `DONE writes=${writes} drainWaits=${drainWaits}`);\n});\n\nserver.listen(0, '127.0.0.1', () => {\n  http.request({ port: server.address().port, host: '127.0.0.1', method: 'POST' }, (res) => {\n    res.resume();\n    res.on('end', () => process.exit(0));\n  }).end();\n});\n```\n\n```\ndocker run --rm -v \"$PWD\":/src:ro node:24.22.1-alpine node /src/repro.mjs x\ndocker run --rm -v \"$PWD\":/src:ro node:24.22.1-alpine node /src/repro.mjs —\n```\n\n### How often does it reproduce? Is there a required condition?\n\n100% in repeated runs. Required: chunked response (no `Content-Length`, the default for streamed writes), more than ~64 KiB written in total, and at least one non-ASCII string chunk (`—`, `é`, `😀` all trigger it). Using `Readable.from(...).pipe(res)` instead of the manual `write`/`drain` loop hangs the same way. An all-ASCII body of the same size completes.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe response completes (270,150 bytes in this repro), as it does on v24.21.0, v22.23.4, v25.9.0 and v26.8.2. When `res.write()` returns `false`, `'drain'` should be emitted once the buffered data has been flushed.\n\n### What do you see instead?\n\n```\nv24.21.0 char=\"x\" DONE writes=12000 drainWaits=5\nv24.21.0 char=\"—\" DONE writes=12000 drainWaits=5\nv24.22.1 char=\"x\" DONE writes=12000 drainWaits=4\nv24.22.1 char=\"—\" STUCK: writes=2967 drainWaits=1 writableLength=0 hwm=65536 corked=0 socketWritableLength=0\n```\n\nAfter the first `write()` that returns `false`, `'drain'` is never emitted, even though `res.writableLength` is 0, the socket's `writableLength` is 0 and nothing is corked. The server simply stops. Inspecting the raw socket, the bytes already sent are valid chunked framing (one complete ~64 KiB chunk), and no further data is written, so the client waits until its own timeout. With ASCII-only data the writes are coalesced into larger chunks and the response completes.\n\nSame test with a plain-`pipe` variant (`Readable.from(strings).pipe(res)`, 4000 rows, 270 KB), one run per version, plus repeated runs on 24.22.x and 26.12.x:\n\n| Node | ASCII `x` | non-ASCII `—`, `é`, `😀` |\n|---|---|---|\n| 22.23.4 | OK | OK |\n| 24.21.0 | OK | OK |\n| 24.22.0 | OK | **stalls after ~65 KB** |\n| 24.22.1 | OK | **stalls after ~65 KB** |\n| 25.9.0 | OK | OK |\n| 26.7.0, 26.8.2 | OK | OK |\n| 26.9.0, 26.10.0, 26.11.1, 26.12.0, 26.12.1 | OK | **stalls after ~65 KB** |\n\n### Additional information\n\nNot bisected. Possibly related: the chunked-write coalescing rework in `lib/_http_outgoing.js` (nodejs/node#64987, \"http: coalesce chunked writes during auto-corking\"), which is listed in the v24.22.0 changelog. I only know the regression window from the version table above.\n\nWe found this in production when a streamed JSON endpoint (`stream-json` piped into `res`) stopped completing after our base image moved from 24.21.0 to 24.22.0. Our endpoint returned an 844 KB body that included `—`, `–` and `’`. Replacing those three characters with `?` made it complete, and so did pinning to `node:24.21.0`. Rolling back the JSON stream library to an older major also made it complete on 24.22.0; we have not investigated why that changes the write pattern. The security releases from Oct 21 (22.23.4, 24.22.1, 26.12.1) do not change the behaviour.\n","author":{"url":"https://github.com/imrihe-ledge","@type":"Person","name":"imrihe-ledge"},"datePublished":"2026-10-22T10:57:15Z","url":"https://github.com/nodejs/node/issues/66924"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:798ea705-91c2-35f7-73b8-846b90da2a72
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA0EE:257BEE:5FE45A:7F7A8D:6AED1DB9
html-safe-nonced978ba162d899f60103fbd3abc80206598fab424cb7bf567f9316da0962c9052
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEVFOjI1N0JFRTo1RkU0NUE6N0Y3QThEOjZBRUQxREI5IiwidmlzaXRvcl9pZCI6Ijg3MTU1Nzg4MTAxMjIzMTYwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8d66f78dcadad599a2d31f06a50d08df3463259bebfaffae3b00a8613c489c25
hovercard-subject-tagissue:5977973824
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/66924/issue_layout
twitter:imagehttps://opengraph.githubassets.com/67c8ee750132d36e8c1d1e4ac64ac02bea0b9d78633e6f227f9594f7a7cf3e6a/nodejs/node/issues/66924
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/67c8ee750132d36e8c1d1e4ac64ac02bea0b9d78633e6f227f9594f7a7cf3e6a/nodejs/node/issues/66924
og:image:altVersion v24.22.0, v24.22.1, v26.9.0 – v26.12.1 (regression; last good: v24.21.0, v26.8.2, v25.9.0, v22.23.4) Platform Linux (official node:*-alpine Docker images, linux/amd64). Also seen in product...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameimrihe-ledge
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
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
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66924#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66924
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%2F66924
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/66924
Reloadhttps://github.com/nodejs/node/issues/66924
Reloadhttps://github.com/nodejs/node/issues/66924
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues655 (655)https://github.com/nodejs/node/issues
Pull requests666 (666)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/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66924
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66924
http: chunked ServerResponse never emits 'drain' and stalls after ~64 KiB when written strings contain non-ASCII (regression in v24.22.0 / v26.9.0)https://github.com/nodejs/node/issues/66924#top
https://github.com/imrihe-ledge
imrihe-ledgehttps://github.com/imrihe-ledge
on Oct 22, 2026https://github.com/nodejs/node/issues/66924#issue-5977973824
#64987https://github.com/nodejs/node/pull/64987
https://github.com/imrihe-ledge
imrihe-ledgehttps://github.com/imrihe-ledge
on Oct 22, 2026https://github.com/nodejs/node/issues/66924#issuecomment-6339112703
#66781https://github.com/nodejs/node/issues/66781
#66782https://github.com/nodejs/node/pull/66782
imrihe-ledgehttps://github.com/imrihe-ledge
not plannedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Oct 22, 2026https://github.com/nodejs/node/issues/66924#event-33941617427
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66924
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66924
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

Viewport: width=device-width


URLs of crawlers that visited me.