Title: zlib: BrotliCompress.flush() with Z_FINISH or Z_BLOCK hangs at 100% CPU · Issue #63701 · nodejs/node · GitHub
Open Graph Title: zlib: BrotliCompress.flush() with Z_FINISH or Z_BLOCK hangs at 100% CPU · Issue #63701 · nodejs/node
X Title: zlib: BrotliCompress.flush() with Z_FINISH or Z_BLOCK hangs at 100% CPU · Issue #63701 · nodejs/node
Description: Version v26.3.0 (also reproduces on v22.20.0 and v27.0.0-nightly20260601aa444b2f58) Platform Darwin arm64 but not platform-specific Subsystem zlib What steps will reproduce the bug? const zlib = require("zlib"); zlib.createBrotliCompress...
Open Graph Description: Version v26.3.0 (also reproduces on v22.20.0 and v27.0.0-nightly20260601aa444b2f58) Platform Darwin arm64 but not platform-specific Subsystem zlib What steps will reproduce the bug? const zlib = re...
X Description: Version v26.3.0 (also reproduces on v22.20.0 and v27.0.0-nightly20260601aa444b2f58) Platform Darwin arm64 but not platform-specific Subsystem zlib What steps will reproduce the bug? const zlib = re...
Opengraph URL: https://github.com/nodejs/node/issues/63701
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zlib: BrotliCompress.flush() with Z_FINISH or Z_BLOCK hangs at 100% CPU","articleBody":"### Version\n\nv26.3.0 (also reproduces on v22.20.0 and v27.0.0-nightly20260601aa444b2f58)\n\n### Platform\n\n```text\nDarwin arm64 but not platform-specific\n```\n\n### Subsystem\n\nzlib\n\n### What steps will reproduce the bug?\n\n```ts\nconst zlib = require(\"zlib\");\nzlib.createBrotliCompress().flush(zlib.constants.Z_FINISH);\n```\nThe process spins at ~100% CPU and never exits\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time. flush(Z_FINISH) (4) and flush(Z_BLOCK) (5) both hang. flush(Z_TREES) (6) throws, and 0–3 are the valid brotli operations.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nIt should throw (as flush(6) already does) or be a no-op, not loop forever. Z_FINISH and Z_BLOCK are zlib flush modes with no corresponding brotli operation, so they reach a state the flush loop never satisfies.\n\n### What do you see instead?\n\nThe call never returns. CPU stays pinned and the event loop makes no progress. Calling .end() afterwards does not drain it.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/alii","@type":"Person","name":"alii"},"datePublished":"2026-06-01T18:17:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/63701/node/issues/63701"}
| 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:e4556e35-409d-cbc3-e2c3-2c3e664ad3e3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C854:3D21AE:789AD3:A2D57C:6A4D4573 |
| html-safe-nonce | 1a51ce48d17680e1ca3cfe7204c420bfdd4624252522e039f961166fbec18e11 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODU0OjNEMjFBRTo3ODlBRDM6QTJENTdDOjZBNEQ0NTczIiwidmlzaXRvcl9pZCI6IjIzNTU4NjQ3NzcxMDY3MzY0OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4559693b8d347946332a175fba7b390933adc16cd31ae71b69f80c5643257a28 |
| hovercard-subject-tag | issue:4565353807 |
| 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/63701/issue_layout |
| twitter:image | https://opengraph.githubassets.com/690b9e5cb095c4e7bc1948f435c3792547fa5f63f1f224d02b99a6b52f8ee593/nodejs/node/issues/63701 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/690b9e5cb095c4e7bc1948f435c3792547fa5f63f1f224d02b99a6b52f8ee593/nodejs/node/issues/63701 |
| og:image:alt | Version v26.3.0 (also reproduces on v22.20.0 and v27.0.0-nightly20260601aa444b2f58) Platform Darwin arm64 but not platform-specific Subsystem zlib What steps will reproduce the bug? const zlib = re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alii |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| 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 | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width