-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP/2 InboundHttp2ToHttpAdapter Leak #4780
Comments
@Scottmitch - I know where and why this leak is occurring, I just don't know what the preferred netty solution is to fixing this. Where: InboundHttp2ToHttpAdapterTest.clientRequestSingleHeaderNonAsciiShouldThrow() Why: It is happening because One solution is for the |
@blucas I think the former is the right solution. @Scottmitch ? |
@normanmaurer Agreed. It makes more sense this way. As an example of the former solution, lines 393-396 would have to be wrapped in a |
@blucas - I have a PR which reworks a bunch of the logic in |
Motivation: In HttpConversionUtil's toHttpRequest and toHttpResponse methods can allocate FullHttpMessage objects, and if an exeception is thrown during the header conversion then this object will not be released. If a FullHttpMessage is not fired up the pipeline, and the stream is closed then we remove from the map, but do not release the object. This leads to a ByteBuf leak. Some of the logic related to stream lifetime management and FullHttpMessage also predates the RFC being finalized and is not correct. Modifications: - Fix leaks in HttpConversionUtil - Ensure the objects are released when they are removed from the map. - Correct logic and unit tests where they are found to be incorrect. Result: Fixes netty#4780 Fixes netty#3619
A leak still exists (as seen in PR #4831). I suspect it may be related to the HTTP//2 codec not necessarily calling
|
I think this was fixed |
@Scottmitch - I didn't try. I figured the CI would reliably fail the build. |
PR #4774 uncovered a leak in the HTTP/2 codec.
The text was updated successfully, but these errors were encountered: