-
Notifications
You must be signed in to change notification settings - Fork 355
HTTPCORE-775: The SSLIOSession::write does not handle SSLEngineResult#BUFFER_OVERFLOW #513
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
Conversation
…#BUFFER_OVERFLOW Signed-off-by: Andriy Redko <drreta@gmail.com>
ok2c
left a comment
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.
@reta Awesome! Looks really good!
| .loadKeyMaterial(keyStoreURL, storePassword.toCharArray(), storePassword.toCharArray()); | ||
|
|
||
| if (protocol != null) { | ||
| sslContextBuilder = sslContextBuilder.setProtocol(protocol); |
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.
@reta It should be OK to pass null to #setProtocol
| this(scheme, null); | ||
| } | ||
|
|
||
| public H2CoreTransportTest(final URIScheme scheme, final String protocol) { |
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.
@reta Can we give the variable a better name to make it clearer what protocol it is? tlsVersion or tlsProtocol maybe?
Signed-off-by: Andriy Redko <drreta@gmail.com>
|
@reta Cherry-picked to |
|
We believe we hit this bug, and grateful for fix. However, are their any timeouts that should of had an impact on this infinite loop? |
I think the loop is infinite in theory, what is happening under the hood is just buffer adjustment: should be quick and only could fail with allocation exception. I am wondering have you seen the infinite spin in the wild? Thank you. |
|
We ran into a scenario where randomly our cpu would spike and we narrowed
it down to a hung thread from IOReactor threadpool. We do not know what
was so special about the endpoint we were hitting or what could cause this
thread to just go wild and never return to threadpool. After updating to
this version, we have not seen it again.
We updated from
Http client 5.4.2 > 5.4.3 httpcore 5.3.3 > 5.3.4
…On Tue, May 13, 2025 at 8:59 PM Andriy Redko ***@***.***> wrote:
*reta* left a comment (apache/httpcomponents-core#513)
<#513 (comment)>
We believe we hit this bug, and grateful for fix. However, are their any
timeouts that should of had an impact on this infinite loop?
I think the loop is infinite in theory, what is happening under the hood
is just buffer adjustment: should be quick and only could fail with
allocation exception. I am wondering have you seen the infinite spin in the
wild? Thank you.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPLPCQ6MLHUIN36LNAQ5HL26KIPNAVCNFSM6AAAAABVBNBVMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNZYGMZDMNZQGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The SSLIOSession::write does not handle SSLEngineResult#BUFFER_OVERFLOW. The suggested fix it to make sure there is enough place in the output buffer to store
SSLSession#getPacketBufferSize()bytes. Closes https://issues.apache.org/jira/browse/HTTPCORE-775