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
Fixes http4s#2744 and http4s#2192 #359
Conversation
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.
Nice work! I will publish a release.
@sholokhov it seems the issue is still here even with your fix applied.
Can it be something wrong on my side? openjdk version "11.0.2" 2019-01-15 scala: 2.13.1 |
Hi @satorg! We've never seen this issue anymore after that fix, but we're still running Scala 2.12.10 on OpenJDK 11.0.5 and http4s 0.20.14. I will try to upgrade at least http4s to the latest version and see if I can catch this again. |
@sholokhov so what I found out in the last couple of day:
Unfortunately, I have to deal with our GitHub Enterprise and there's only JDK 11 available in the company's cluster. |
@satorg I’ve managed to migrate our services on latest http4s version, but don’t see any issues so far. Can you may be enable trace logs for blaze and try to catch it once again? Would be nice if you can attach it here so we can get better picture of what’s going on there. |
@sholokhov yes, for sure, here it is: There're a lot of exceptions like
but as I understand from the sources these can be safely ignored.
BTW, it seems I found a workaround to the issue. At least it works for me when I have to use Java11. I found an article which gave me a hint (although I'm not completely sure that it is the same issue): |
It sounds like this is distinct from #376, but I wonder if that TLS1.3 implementation is to blame there, as well. We should start testing on the latest JDKs. |
I'm getting this as well with OpenJDK 11.0.7 and http4s 0.21.3. I was on 11.0.6 but had to upgrade because of a different SSL bug: https://bugs.openjdk.java.net/browse/JDK-8236039 fixed in 11.0.7. I do find this bug seems a bit sporadic. My guess is that I don't get this when reusing an HTTP connection as subsequent requests don't fail in the same way.
|
Hi!
Recently we've faced an issue on our production env with http4s client - #647.
I finally got some time to investigate it a bit more and found that the problem was lying in
org.http4s.blaze.pipeline.stages.SSLStage#sslHandshake#sslHandshakeLoop
in this arm:There was already an attempt to fix it here #258, but the main issue is that after
handshakeFailure
being called, nextchannelWrite(...)
call sometimes completes withSuccess
arm which leads to infinite recursion.After spending some time wondering how is it possible (
bytesProduced = 0
, which should mean connection is closed, butchannelWrite
reports successful status), I found this JDK regression - https://bugs.openjdk.java.net/browse/JDK-8220703 with the following comment:It indeed looks like a regression in JDK.
I ran some tests with this fix on our envs and there are some JVM stats (OpenJDK 11, fix was deployed at ~18.30):
According to logs (not included in this PR) it catches the case with infinite recursions. I also haven't spot any resource/memory leakages, so this workaround potentially fixes http4s/http4s#2192 and #647.