jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Fix buffer leak in `HttpClientStreamTest.testUploadWithConcurrentServerCloseClosesStream()`

Open lorban opened this issue 2 years ago • 6 comments

Depends on https://github.com/jetty/jetty.project/pull/10432 - so this PR is a branch of that other PR.

See #10226

lorban avatar Aug 29 '23 13:08 lorban

This requires more investigations as stopping the connector should release any pending buffer not yet handed over to user code.

lorban avatar Aug 29 '23 15:08 lorban

@sbordet nudge

lorban avatar Sep 08 '23 07:09 lorban

On hold until #10277 is sorted.

lorban avatar Sep 11 '23 16:09 lorban

The problem is that stopping the connector is notifying the HttpConnection via onClose, but that notification isn't reported to the channel state.

The tentative fix of releasing the buffer in onClose and ensuring the buffer only gets released once by making it atomic isn't right as HttpConnection's buffer shouldn't need any thread safety.

lorban avatar Sep 12 '23 13:09 lorban

@lorban I think this PR needs to be updated from jetty-12.0.x

joakime avatar Sep 20 '23 21:09 joakime

@lorban this PR needs a merge from jetty-12.0.x HEAD.

joakime avatar Dec 15 '23 12:12 joakime

@sbordet nudge

lorban avatar Apr 02 '24 10:04 lorban

@joakime not that I know. A final review pass from @sbordet would be preferable but I think I addressed all his concerns.

lorban avatar Apr 12 '24 10:04 lorban