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
Excessively large cumulation ByteBuf in SslHandler #3567
Comments
Thanks for reporting. I guess there might be some edge case we didn't handle correctly. Would you mind if I ask to share the heap dump with us? |
Alternatively, you could just share the readerIndex and writerIndex of the cumulative buffer. |
@dkartaschew Thanks! It seems like the reader/writerIndex of the cumulative buffer is: 556527170/556581723, which seems way too large. |
@dkartaschew Could you tell me which |
@dkartaschew I'm also interested in the vaule of the |
Related: #3567 Motivation: SslHandler.channelReadComplete() forgets to call super.channelReadComplete(), which discards read bytes from the cumulative buffer. As a result, the cumulative buffer can expand its capacity unboundedly. Modifications: Call super.channelReadComplete() instead of calling ctx.fireChannelReadComplete() Result: Fixes #3567
Related: #3567 Motivation: SslHandler.channelReadComplete() forgets to call super.channelReadComplete(), which discards read bytes from the cumulative buffer. As a result, the cumulative buffer can expand its capacity unboundedly. Modifications: Call super.channelReadComplete() instead of calling ctx.fireChannelReadComplete() Result: Fixes #3567
Perhaps we should make the handler method implementations in |
@dkartaschew Please feel free to reopen this issue if you still observe the problem with the SNAPSHOT build. |
@trustin ouch.... We should aim for release 4.0.27.Final very soon. About your question: I agree we should probably do this but this is a breaking change so we will need to do it in master only. |
@normanmaurer Do you mind to release "exceptionnaly" 4.1 too ? |
Hi, I find this issue 4.1.4.Final and 4.1.6.Final as well... |
@svnp10 please open a new issue and provide more infos |
@normanmaurer issue here #5928 |
Related: netty#3567 Motivation: SslHandler.channelReadComplete() forgets to call super.channelReadComplete(), which discards read bytes from the cumulative buffer. As a result, the cumulative buffer can expand its capacity unboundedly. Modifications: Call super.channelReadComplete() instead of calling ctx.fireChannelReadComplete() Result: Fixes netty#3567
Hi,
Upon upgrading from netty 4.0.23 to netty 4.0.26, we've found that during large/fast data transfers via TLS 1.2, the "cumulation" ByteBuf in the SslHandler grows to over 1GB in direct buffer usage, leading to OOM errors. The growth of the "cumulation" ByteBuf does appear to correspond with the amount of data received.
This growth occurs only the receiving side, irrespective of which side initiated the connection.
Testing with netty 4.0.23 and 4.0.24 shows the buffer never/rarely grows, but starting with 4.0.25 the growth is seen. We've tested with Oracle JRE 7u67 and 8u31 with the same result.
The channel pipeline setup is:
This may be related to bugs #3559 and #3447 , but ultimately unsure. Removing the SslHandler does improve things in our instance, but suspect that is due to the pipeline setup.
If there is any more information required, please let me know.
The text was updated successfully, but these errors were encountered: