JDK-8205653 : test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java and RmiSslBootstrapTest.sh fail with handshake_failure
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-26
  • Updated: 2020-06-09
  • Resolved: 2018-07-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8
11.0.8-oracleFixed 12 b01Fixed 8u261Fixed
Related Reports
Relates :  
Relates :  
Description
Two tests fail in CI tier3:

test/jdk/sun/management/jmxremote/bootstrap/RmiSslBootstrapTest.sh
test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java

Both of them with similar handshake_failure issues. Example:

RmiRegistry lookup...
KO: Got unexpected exception!
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
	javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
	at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
	at java.rmi/sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
	at RmiRegistrySslTestApp.main(RmiRegistrySslTestApp.java:78)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:125)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:116)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:312)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:266)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:877)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:810)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:383)
	at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:477)
	at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:709)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
	at java.base/java.io.DataOutputStream.flush(DataOutputStream.java:123)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:222)
	... 4 more
Exception in thread "main" java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
	javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:300)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196)
	at java.rmi/sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
	at java.rmi/sun.rmi.registry.RegistryImpl_Stub.list(RegistryImpl_Stub.java:85)
	at RmiRegistrySslTestApp.main(RmiRegistrySslTestApp.java:78)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:125)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:116)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:312)
	at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:266)
	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:877)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:810)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:383)
	at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:477)
	at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:709)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
	at java.base/java.io.DataOutputStream.flush(DataOutputStream.java:123)
	at java.rmi/sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:222)
	... 4 more

Failure may be related to the recent TLS 1.3 changes which is one of the new changes in the run. 
Comments
Fix request (11u) I would like to downport this for parity with 11.0.8-oracle. Applies clean.
28-02-2020

The "revokeall.exe: Permission denied" issue occurring frequently is fixed with JDK-8192953. Now there is only 1 Test intermittently fails(RmiSslBootstrapTest.sh) in Sparc, Mac but whenever it fails, it fails with the following exception, javax.net.ssl|ERROR|25|RMI TCP Connection(10)-10.133.68.242|2018-06-28 08:29:48.587 GMT|TransportContext.java:317|Fatal (HANDSHAKE_FAILURE): no cipher suites in common ( "throwable" : { javax.net.ssl.SSLHandshakeException: no cipher suites in common at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:125) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:116) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:312) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:268) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:259) at java.base/sun.security.ssl.ServerHello$T12ServerHelloProducer.chooseCipherSuite(ServerHello.java:457) at java.base/sun.security.ssl.ServerHello$T12ServerHelloProducer.produce(ServerHello.java:290) at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:429) at java.base/sun.security.ssl.ClientHello$T12ClientHelloConsumer.consume(ClientHello.java:1066) at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:833) at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:792) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:390) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:445) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:422) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:178) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:877) at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:810) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:383) at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:477) at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:558) at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252) at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:271) at java.base/java.io.DataInputStream.readInt(DataInputStream.java:392) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:716) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)}
28-06-2018

Moving the promotion_blocker label to JDK-8205673.
27-06-2018

Tests are problem listed for now. Please remember to remove tests from ProblemList.txt when fixing this (JDK-8205653) issue.
27-06-2018