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.

Jorn Vernee
  • 31,735
  • 4
  • 76
  • 93
user304217
  • 153
  • 6
  • 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 '19 at 18:52
  • 1
    Thanks for reporting this. This has now been logged as https://bugs.openjdk.java.net/browse/JDK-8218889 – daniel Feb 13 '19 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 '19 at 14:02
  • Please see my answer to linked issue: https://stackoverflow.com/questions/61650050/null-pointer-in-java-nio-sso-processor/62356390#62356390 hoping it can help – Simon Jun 13 '20 at 06:40

0 Answers0