Title: quic: SIGSEGV on exit after a client writes to a unidirectional stream on an h3 session · Issue #65408 · nodejs/node · GitHub
Open Graph Title: quic: SIGSEGV on exit after a client writes to a unidirectional stream on an h3 session · Issue #65408 · nodejs/node
X Title: quic: SIGSEGV on exit after a client writes to a unidirectional stream on an h3 session · Issue #65408 · nodejs/node
Description: Version main Platform N/A Subsystem quic What steps will reproduce the bug? import { readFileSync } from 'node:fs'; import { createPrivateKey } from 'node:crypto'; import { listen, connect } from 'node:quic'; // in the repo, the keys are...
Open Graph Description: Version main Platform N/A Subsystem quic What steps will reproduce the bug? import { readFileSync } from 'node:fs'; import { createPrivateKey } from 'node:crypto'; import { listen, connect } from '...
X Description: Version main Platform N/A Subsystem quic What steps will reproduce the bug? import { readFileSync } from 'node:fs'; import { createPrivateKey } from 'node:crypto'; import { listen, ...
Opengraph URL: https://github.com/nodejs/node/issues/65408
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"quic: SIGSEGV on exit after a client writes to a unidirectional stream on an h3 session","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nN/A\n```\n\n### Subsystem\n\nquic\n\n### What steps will reproduce the bug?\n\n```js\nimport { readFileSync } from 'node:fs';\nimport { createPrivateKey } from 'node:crypto';\nimport { listen, connect } from 'node:quic';\n\n// in the repo, the keys are in test/fixtures/keys\nconst key = createPrivateKey(readFileSync('/path/to/key.pem'));\nconst cert = readFileSync('/path/to/cert.pem');\n\n// ALPN defaults to 'h3'.\nconst endpoint = await listen(() => {}, { sni: { '*': { keys: [key], certs: [cert] } } });\nconst session = await connect(endpoint.address, { servername: 'localhost', verifyPeer: 'manual' });\n\nconst stream = await session.createUnidirectionalStream();\nstream.writer.writeSync('x');\n\nawait endpoint.destroy();\nconsole.log('reached end of script');\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\nexit code 0 with no crash.\n\nThe client opens a plain unidirectional stream on an HTTP/3 connection, which is not a valid h3 stream, so the server should treat it as a protocol error or discard it, and either way tear down cleanly.\n\n### What do you see instead?\n\n```console\nreached end of script\nzsh: segmentation fault (core dumped) ../node/node --experimental-quic --no-warnings repro.js\n```\n\nThe script runs to completion and prints reached end of script, then the process dies with SIGSEGV instead of exiting 0. The crash is therefore after endpoint.destroy() has resolved, during process teardown, not inside any QUIC call the script awaits. Nothing is reported on the JS side: no error, no rejection, no warning.\n\n### Additional information\n\nObservations:\n* ALPN must be h3. With a custom ALPN (`alpn: ['test-proto']`) the same script exits cleanly, and the stream is delivered to `onstream` as expected.\n* The write is required. Dropping `stream.writer.writeSync('x')` makes it exit cleanly.\n* `onstream` is irrelevant: it crashes whether or not the server registers one. That distinguishes it from #64030, which required no `onstream` and a non-h3 ALPN, and was fixed in July.\n* Teardown is what surfaces it. `endpoint.destroy()` alone is enough, and `close()` on both sides also crashes. With no teardown the process just hangs on open handles.\n* On h3 the stream never reaches JavaScript, since nghttp3 consumes non-request streams internally, so no JS-visible stream object is involved.","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-08-19T23:17:15Z","url":"https://github.com/nodejs/node/issues/65408"}
| 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:87cdce91-06dc-58e8-e2a6-c30a97f59a53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E9DA:257A3D:641D14:852F6C:6AED1F5A |
| html-safe-nonce | 79a3b8111217398f5d6c5901fff81baba12fefdb96efbc27cbba72ab33c26a0c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOURBOjI1N0EzRDo2NDFEMTQ6ODUyRjZDOjZBRUQxRjVBIiwidmlzaXRvcl9pZCI6IjYxNTQwOTY2ODEzMTA1NjAwOTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a4f8716e165fe0b9cd992956a68df43dc5f69aefd1ac8695320420305d07bead |
| hovercard-subject-tag | issue:5198001476 |
| 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/65408/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d322a7750a26274f1e643c36d00c999290ce25a3cf896b6a29d9728818e3a646/nodejs/node/issues/65408 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d322a7750a26274f1e643c36d00c999290ce25a3cf896b6a29d9728818e3a646/nodejs/node/issues/65408 |
| og:image:alt | Version main Platform N/A Subsystem quic What steps will reproduce the bug? import { readFileSync } from 'node:fs'; import { createPrivateKey } from 'node:crypto'; import { listen, connect } from '... |
| 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 | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| 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 | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width