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
Leak detection properties are added for the test execution #2461
Conversation
@reactor/netty-team Wait with the review please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
632e2d6
to
24e6188
Compare
Rebased in order to pickup #2464 |
The previous commit avoids a buffer leak in the WebsocketServerOperations class. Now, the empty payload for the http request is allocated from the default channel allocator, so the fix just ensures that the request is closed once the handshake method has completed. Note: This fix, as well as the one from netty/netty#12773 should fully resolve all the leaks from the WebsocketTest |
reactor-netty5-http/src/main/java/reactor/netty5/http/server/WebsocketServerOperations.java
Outdated
Show resolved
Hide resolved
Pushed a fix in 618e866 previous commit, which avoids the following memory leaks caused by the NettyOutboundTest:
|
reactor-netty5-core/src/test/java/reactor/netty5/NettyOutboundTest.java
Outdated
Show resolved
Hide resolved
reactor-netty5-core/src/test/java/reactor/netty5/NettyOutboundTest.java
Outdated
Show resolved
Hide resolved
in c1ead0f commit, fixed the following memory leak reproduced by the TcpServerTests.retryStrategiesWhenServerFails (sendGroups ...):
The proposed fix is closing the PREDICATE_GROUP_BOUNDARY from the NettyOutbound.sendGroups method (because it seems that the boundary was never closed). |
reactor-netty5-core/src/main/java/reactor/netty5/NettyOutbound.java
Outdated
Show resolved
Hide resolved
@pderop WDYT about rebasing this one? |
yes, will you do it or may I do ? |
yep go ahead |
c1ead0f
to
c47ba03
Compare
rebased on netty5, in order to get #2484 . Can you go ahead on the suggestion you did regarding the cleaning of the PREDICATE_GROUP_BOUNDARY ? (I did not have time to investigate yet). |
@pderop I decided to implement another approach for |
@violetagg , this is a great improvement and optimization ! |
the Netty PR (netty/netty#12828), if accepted and merged, will normally resolve the following leak for the HttpServerTests.nonContentStatusCodes test:
|
0f9ba65
to
3b51a75
Compare
I rebased in order to pickup #2495 |
The previous commit 9e29d50 fixes a memory leak reproduced by the HttpServerTests.testIssue1978H2WithDelay test. It was caused by the Http2StreamBridgeServerHandler.channelRead method, which was using old ReferenceCountUtil.release(msg) instead of doing Resource.dispose(msg) |
9e29d50
to
63a7012
Compare
I rebased to pick up #2496 |
08e1492
to
ebb9bb1
Compare
Rebased in order to pickup the latest Netty/Reactor Netty fixes |
Fix memory leak in test
…erverHandshaker.handshake method
…thod in NettyOutboundTest
…osing BOUNDARY in NettyOutbound.sendGroups
…ls by closing BOUNDARY in NettyOutbound.sendGroups" This reverts commit c47ba03.
…ndler out of the pipeline
The Http2StreamBridgeServerHandler.channelRead method was still using old ReferenceCountUtil.release() instead of Resource.dispose() method.
Ensure Http2FrameCodec.Encoder is closed when Exception happened before decoding the server response
ebb9bb1
to
15c05bd
Compare
I rebased the PR in order to resolve the conflicts |
The failing tests on CI are not related |
@OlegDokuka Thanks for the review! |
EmptyLastHttpContent
HttpRequest
passed to theWebSocketServerHandshaker.handshake
methodReactorNetty#BOUNDARY
as on-heap non-releasable bufferSimpleCompressionHandler
out of the pipelineHttp2StreamBridgeServerHandler.channelRead
method should useResource.dispose()
methodHttp2FrameCodec
is created only when there is a need for protocol upgradeHttp2FrameCodec.Encoder
is closed when upgrade is rejected. EnsureHttp2FrameCodec.Encoder
is closed whenException
happened before decoding the server response