Skip to content
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

okhttp3.tls.HandshakeCertificatesTest.clientAndServer is failing on recent OpenJDK 8 #4423

Closed
bemasc opened this issue Nov 29, 2018 · 5 comments

Comments

@bemasc
Copy link

bemasc commented Nov 29, 2018

With OpenJDK 8u181 on Debian, I'm seeing this test failing with a NoSuchMethodError. After adding some debug logs I see this error trace:

java.lang.NoSuchMethodError: sun.security.ssl.SSLSessionImpl.<init>(Lsun/security/ssl/ProtocolVersion;Lsun/security/ssl/CipherSuite;Ljava/util/Collection;Ljava/security/SecureRandom;Ljava/lang/String;IZ)V
        at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:787)
        at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:232)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
        at okhttp3.tls.HandshakeCertificatesTest$1.call(HandshakeCertificatesTest.java:167)
        at okhttp3.tls.HandshakeCertificatesTest$1.call(HandshakeCertificatesTest.java:156)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

This is consistent with a reported bug in OpenJDK: https://bugs.openjdk.java.net/browse/JDK-8213936. The bug was first reported about a month ago but there hasn't been any progress on it yet.

@swankjesse
Copy link
Member

Are you using Jetty-ALPN for HTTP/2 ?

@bemasc
Copy link
Author

bemasc commented Nov 30, 2018 via email

@swankjesse
Copy link
Member

Gotcha. HTTP/2 requires a bootclasspath hack for platforms through Java 8 and that's likely what's breaking here.

Best workaround is upgrading to Java 11. Conscrypt is another fix. Avoiding HTTP/2 also avoids this.

@yschimke
Copy link
Collaborator

yschimke commented Nov 30, 2018

I wonder whether alpn-boot missed a change they need to build against

https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html#alpn-versions

@yschimke
Copy link
Collaborator

Debian specific based on discussion in jetty-project/jetty-alpn#26 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants