bneradt opened a new pull request, #14019:
URL: https://github.com/apache/trafficserver/pull/14019

   This PR fixes two related lifetime and progress bugs in the HTTP/3 QPACK 
decoder.
   
   **Cancel pending QPACK decodes when a stream goes away**
   
   QPACK delivered each decode result by scheduling an event directly to the 
HTTP/3 header adaptor that requested it, and a decode blocked on the dynamic 
table kept a pointer to that adaptor as well. Nothing cancelled either one, so 
a transaction torn down before its headers were delivered left an event or a 
blocked request pointing at freed memory. A blocked request also pointed into 
the HEADERS frame's header block, which is freed or reused before the request 
resumes.
   
   This patch has QPACK deliver results through a small continuation it tracks 
per stream, and implements `QPACK::cancel()` to cancel those pending events and 
drop any blocked requests for the stream. The header adaptor calls it when it 
is destroyed, and QPACK cleans up the same way in its own destructor. Blocked 
requests now keep their own copy of the header block.
   
   **Resume QPACK decodes once the dynamic table catches up**
   
   A header block that references dynamic table entries the decoder has not yet 
received is parked until the encoder stream inserts them. The decoder decided 
when to resume those blocks from a counter that only its encoder-side 
bookkeeping advances, so a parked block never resumed. Its stream hung, and if 
the decoder later turned invalid the parked block was never failed either.
   
   This patch resumes parked blocks using the same dynamic table check that 
decided to park them, and fails every parked block when the decoder turns 
invalid, since nothing can unblock them after that. The unit tests now drive 
resumption through the real encoder stream path.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to