JDK-8241368 : SSLSession/TestEnabledProtocols.java failed due to SSLException: Connection reset
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: x86_64
  • Submitted: 2020-03-20
  • Updated: 2020-03-20
  • Resolved: 2020-03-20
Related Reports
Duplicate :  
Description
The following test failed in the JDK15 CI:

javax/net/ssl/SSLSession/TestEnabledProtocols.java

Here's a snippet from the log file:

----------System.err:(38/2593)----------
java.lang.RuntimeException: javax.net.ssl.SSLException: Connection reset
	at TestEnabledProtocols.runClientApplication(TestEnabledProtocols.java:144)
	at SSLSocketTemplate.doClientSide(SSLSocketTemplate.java:359)
	at SSLSocketTemplate$2.run(SSLSocketTemplate.java:598)
Caused by: javax.net.ssl.SSLException: Connection reset
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:127)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:324)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:262)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:144)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1466)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1372)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:437)
	at TestEnabledProtocols.runClientApplication(TestEnabledProtocols.java:108)
	... 2 more
	Suppressed: java.net.SocketException: Connection reset by peer
		at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420)
		at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
		at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
		at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1052)
		at java.base/sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:82)
		at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:355)
		... 9 more
Caused by: java.net.SocketException: Connection reset
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982)
	at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:469)
	at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:463)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:110)
	... 6 more

JavaTest Message: Test threw exception: java.lang.RuntimeException: javax.net.ssl.SSLException: Connection reset
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: javax.net.ssl.SSLException: Connection reset

Starting this bug as a P3 since this is a Tier2 failure.
Comments
Closing "connection reset" issues as duplicate of JDK-8241372 as most likely root cause is same for all.
20-03-2020

I updated the description to remove System.out messages and added error logs from System.err. SSLHandshakeException in System.out shouldn't be confused as reason for test failure. Test expects handshake exception and it is logged in out for debugging purpose. The root cause for this failure is connection reset which we have seen with several tests across components.
20-03-2020