-
-
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
Exception: bio is null via SSL#bioLengthByteBuffer #6466
Comments
Saw that Exception a few more times and it was not limited to H2. We eventually had to do a rollback to 4.1.8 and 1.1.33.Fork26 as we started getting reports of SSL not working correctly. |
A common theme was that SSL connections wouldn't return any data or partial data. |
@rkapsi - Thanks for reporting! |
@rkapsi thanks a lot! |
Motivation: To ensure that all bytes queued in OpenSSL/tcnative internal buffers we invoke SSL_shutdown again to stimulate OpenSSL to write any pending bytes. If this call fails we may call SSL_free and the associated shutdown method to free resources. At this time we may attempt to use the networkBIO which has already been freed and get a NPE. Modifications: - Don't call bioLengthByteBuffer(networkBIO) if we have called shutdown() in ReferenceCountedOpenSslEngine Result: Fixes netty#6466
Motivation: To ensure that all bytes queued in OpenSSL/tcnative internal buffers we invoke SSL_shutdown again to stimulate OpenSSL to write any pending bytes. If this call fails we may call SSL_free and the associated shutdown method to free resources. At this time we may attempt to use the networkBIO which has already been freed and get a NPE. Modifications: - Don't call bioLengthByteBuffer(networkBIO) if we have called shutdown() in ReferenceCountedOpenSslEngine Result: Fixes #6466
@rkapsi - Please report back if this issue is not fixed, or there are other issues. I merged the PR because it seemed pretty clear what the cause and required fix was. |
Motivation: To ensure that all bytes queued in OpenSSL/tcnative internal buffers we invoke SSL_shutdown again to stimulate OpenSSL to write any pending bytes. If this call fails we may call SSL_free and the associated shutdown method to free resources. At this time we may attempt to use the networkBIO which has already been freed and get a NPE. Modifications: - Don't call bioLengthByteBuffer(networkBIO) if we have called shutdown() in ReferenceCountedOpenSslEngine Result: Fixes netty#6466
Motivation: To ensure that all bytes queued in OpenSSL/tcnative internal buffers we invoke SSL_shutdown again to stimulate OpenSSL to write any pending bytes. If this call fails we may call SSL_free and the associated shutdown method to free resources. At this time we may attempt to use the networkBIO which has already been freed and get a NPE. Modifications: - Don't call bioLengthByteBuffer(networkBIO) if we have called shutdown() in ReferenceCountedOpenSslEngine Result: Fixes netty#6466
Motivation: To ensure that all bytes queued in OpenSSL/tcnative internal buffers we invoke SSL_shutdown again to stimulate OpenSSL to write any pending bytes. If this call fails we may call SSL_free and the associated shutdown method to free resources. At this time we may attempt to use the networkBIO which has already been freed and get a NPE. Modifications: - Don't call bioLengthByteBuffer(networkBIO) if we have called shutdown() in ReferenceCountedOpenSslEngine Result: Fixes netty#6466
Netty 4.1.9.Final-SNAPSHOT with netty-tcnative 2.0.0.Beta6
First and only time I've seen it so far. Happened on a H2 connection.
The text was updated successfully, but these errors were encountered: