Skip to content

Do not count a reserved stream already locally reset as opened - #1545

Open
arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:h2-fix-reserved-stream-remotecount-leak
Open

arturobernalg wants to merge 1 commit into
apache:masterfrom
arturobernalg:h2-fix-reserved-stream-remotecount-leak

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

A reserved stream that is locally reset before its response arrives (its promise refused, or for any other reason) stays reserved. Activating it for late response HEADERS -- an ordinary network race, not a protocol violation -- counted it as opened with no matching close ever coming, permanently inflating the connection's remote stream count.

Mirrors the existing isLocalReset() guard already used for DATA on a refused stream; the same guard also covers trailers arriving on a stream refused during connection shutdown.

@ok2c

ok2c commented Nov 30, 2026

Copy link
Copy Markdown
Member

@arturobernalg I have an impression that we are now bug fixing our bug fixes and the whole thing got terribly rushed. I hope you know what you are doing.

@ok2c ok2c added this to the 5.5.1 milestone Nov 30, 2026
A reserved stream that is locally reset before its response arrives (its promise refused, or for any other reason) stays reserved. Activating it for late response HEADERS -- an ordinary network race, not a protocol violation -- counted it as opened with no matching close ever coming, permanently inflating the connection's remote stream count.

Mirrors the existing isLocalReset() guard already used for DATA on a refused stream; the same guard also covers trailers arriving on a stream refused during connection shutdown.
@arturobernalg
arturobernalg force-pushed the h2-fix-reserved-stream-remotecount-leak branch from 99a52fa to ae71dae Compare December 2, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants