9

When testing the Open JDK 11 HTTP client over HTTP/2, there is a server-side error which looks like a JDK 11 bug.

The test runs several threads against a Tomcat 9 server, testing that all threads use HTTP/2 and TLS1.3.

The concern is that the error is inside the 'sun.security.ssl.SSLHandshake.produce', which means it is not Tomcat, but the JDK causing the error.

Can anyone confirm that you have had the same experience when load testing the HTTP layer of JDK 11? If so, I will reported to the Open JDK team.

The error is only evident when running a load test:

java.util.NoSuchElementException: No value present
        at java.base/java.util.Optional.get(Optional.java:148) ~[na:na]
        at java.base/sun.security.ssl.ServerHello$T13ServerHelloProducer.produce(ServerHello.java:551) ~[na:na]
        at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:436) ~[na:na]
        at java.base/sun.security.ssl.ClientHello$T13ClientHelloConsumer.goServerHello(ClientHello.java:1224) ~[na:na]
        at java.base/sun.security.ssl.ClientHello$T13ClientHelloConsumer.consume(ClientHello.java:1160) ~[na:na]
        at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:849) ~[na:na]
        at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:810) ~[na:na]
        at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) ~[na:na] ...

This github project was used for testing. See the project readme for more details.

4
  • The error occurs on shc.resumingSession.consumePreSharedKey().get() - seems like Java wants to restore a previous session but the session key is no longer available. I agree with you that this seems to be a bug.
    – Robert
    Feb 11, 2019 at 18:52
  • 1
    Thanks for reporting this. This has now been logged as bugs.openjdk.java.net/browse/JDK-8218889
    – daniel
    Feb 13, 2019 at 11:12
  • Can you confirm that the issue occurs when you're making requests over SSL to your Java application? It is incoming requests to your app that cause this.. not outgoing requests from your app to other Internet services over SSL, is that correct?
    – Dan
    May 18, 2019 at 14:02
  • Please see my answer to linked issue: stackoverflow.com/questions/61650050/… hoping it can help
    – Simon
    Jun 13, 2020 at 6:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.