Skip to content

quic: release stream arenas before cleanup - #65410

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:quic-h3-sigsev-on-exit
Open

quic: release stream arenas before cleanup#65410
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:quic-h3-sigsev-on-exit

Conversation

@trivikr

@trivikr trivikr commented Aug 20, 2026

Copy link
Copy Markdown
Member

Fixes: #65408

Release QUIC stream stats and state arena slots when the stream is destroyed instead of from the Stream destructor.
Realm cleanup destroys QUIC binding data before draining remaining BaseObjects, so a stream that survives until process teardown must not need BindingData from its destructor.

HTTP/3 header callbacks can synchronously destroy their stream. Check whether the stream was destroyed after those callbacks before accessing its arena-backed state, and make repeated native destruction safe after the slots have been released.


Assisted-by: codex:gpt-5.6-sol

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (f3a8f1a) to head (d761626).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65410      +/-   ##
==========================================
+ Coverage   90.10%   90.12%   +0.01%     
==========================================
  Files         752      752              
  Lines      252207   252208       +1     
  Branches    47446    47441       -5     
==========================================
+ Hits       227254   227293      +39     
+ Misses      16261    16221      -40     
- Partials     8692     8694       +2     

see 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Release QUIC stream stats and state arena slots when the stream is
destroyed instead of from the Stream destructor.
Realm cleanup destroys QUIC binding data before draining remaining
BaseObjects, so a stream that survives until process teardown must
not need BindingData from its destructor.

HTTP/3 header callbacks can synchronously destroy their stream. Check
whether the stream was destroyed after those callbacks before accessing
its arena-backed state, and make repeated native destruction safe after
the slots have been released.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@trivikr
trivikr force-pushed the quic-h3-sigsev-on-exit branch from 3c9eeb3 to d761626 Compare August 20, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quic: SIGSEGV on exit after a client writes to a unidirectional stream on an h3 session

3 participants