Correctly handle task offloading when using BoringSSL / OpenSSL#9575
Merged
Conversation
Motivation: We did not correctly handle taskoffloading when using BoringSSL / OpenSSL. This could lead to the situation that we did not write the SSL alert out for the remote peer before closing the connection. Modifications: - Correctly handle exceptions when we resume processing on the EventLoop after the task was offloadded - Ensure we call SSL.doHandshake(...) to flush the alert out to the outboundbuffer when an handshake exception was detected - Correctly signal back the need to call WRAP again when a handshake exception is pending. This will ensure we flush out the alert in all cases. Result: No more failures when task offloading is used.
Member
Author
|
@netty-bot test this please |
johnou
approved these changes
Sep 18, 2019
ec9a306 to
7d116ed
Compare
Contributor
|
am I the only one using ssl tasks? 😀 |
ejona86
approved these changes
Sep 19, 2019
Member
ejona86
left a comment
There was a problem hiding this comment.
Looks fair, but the try-catch is the main thing I understand :-)
normanmaurer
added a commit
that referenced
this pull request
Sep 19, 2019
Motivation: We did not correctly handle taskoffloading when using BoringSSL / OpenSSL. This could lead to the situation that we did not write the SSL alert out for the remote peer before closing the connection. Modifications: - Correctly handle exceptions when we resume processing on the EventLoop after the task was offloadded - Ensure we call SSL.doHandshake(...) to flush the alert out to the outboundbuffer when an handshake exception was detected - Correctly signal back the need to call WRAP again when a handshake exception is pending. This will ensure we flush out the alert in all cases. Result: No more failures when task offloading is used.
David-Noble-at-work
pushed a commit
to Azure/azure-cosmosdb-java
that referenced
this pull request
Oct 12, 2019
David-Noble-at-work
pushed a commit
to Azure/azure-cosmosdb-java
that referenced
this pull request
Oct 15, 2019
…cult to interpret #273 (#274) * Corrected an error in RequestRateTooLargeException, a regression that caused the status code to be set incorrectly * Corrected ServiceUnavailableException status code, optimized imports, and added DocumentClientExceptionTest.statusCodeIsCorrect The latter resulted in moving DocuemntClientExceptionTest from commons to direct-impl. Without the move commons would need to take a dependency on direct-impl which seems undesirable. * Refactored DocumentClientExceptionTest to spread it out between commons and direct-impl * Bumped version number to 2.6.3-SNAPSHOT * Bumped netty version number to pickup this and other fixes: netty/netty#9575 * Improved error handling for RntbdResponseHeaders * Improved an error message
kushagraThapar
pushed a commit
to Azure/azure-cosmosdb-java
that referenced
this pull request
Dec 2, 2019
* Corrected an error in RequestRateTooLargeException, a regression that caused the status code to be set incorrectly * Corrected ServiceUnavailableException status code, optimized imports, and added DocumentClientExceptionTest.statusCodeIsCorrect The latter resulted in moving DocuemntClientExceptionTest from commons to direct-impl. Without the move commons would need to take a dependency on direct-impl which seems undesirable. * Refactored DocumentClientExceptionTest to spread it out between commons and direct-impl * Bumped version number to 2.6.3-SNAPSHOT * Bumped netty version number to pickup this and other fixes: netty/netty#9575 * Improved error handling for RntbdResponseHeaders * Improved an error message * Resolved #275 * Minor code cleanup in the vicinity of one possible source of this issue * Tweaks * Added logger.info that reports the ssl provider (OPENSSL or JVM) * Improved diagnostics * Added state tracking to RntbdRequestRecord so that the logs reveal the state of a request when it times out * Tweaked text of RequestTimeoutException produced by RntbdRequestRecord.expire * Added RntbdRequestRecord.State.UNSENT to denote failed writes * Sorted methods and improved checkArgument messages * Tweaks * Added logger for tracking hashed wheel timer stops * Added debug logger message * Tweaked comments and line spacing * Added final modifier * Added requestExpiryInterval to RntbdTransportClient.Options * Version bump * Tweaks for performance testing * Port from azure-cosmos-4.X * Removed extraneous file * Updated changelog to force a rebuild * Fixed a test break * Corrected package names in logger configuration file * Updated changelog that tracks unreleased changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
We did not correctly handle taskoffloading when using BoringSSL / OpenSSL. This could lead to the situation that we did not write the SSL alert out for the remote peer before closing the connection.
Modifications:
Result:
No more failures when task offloading is used.