JDK-8235973 : javax/net/ssl/SSLSocket/Tls13PacketSize.java failed with java.net.SocketException: An established connection was aborted by the software in your host machine
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 8,11,14,15
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-12-16
  • Updated: 2021-04-06
  • Resolved: 2021-04-06
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 17
17Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Test: javax/net/ssl/SSLSocket/Tls13PacketSize.java
Server input bytes: 16366
Client died: javax.net.ssl.SSLException: An established connection was aborted by the software in your host machine
javax.net.ssl.SSLException: An established connection was aborted by the software in your host machine
	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.SSLSocketImpl.handleException(SSLSocketImpl.java:1654)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1038)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:929)
	at Tls13PacketSize.runClientApplication(Tls13PacketSize.java:97)
	at SSLSocketTemplate.doClientSide(SSLSocketTemplate.java:359)
	at SSLSocketTemplate$2.run(SSLSocketTemplate.java:598)
	Suppressed: java.net.SocketException: An established connection was aborted by the software in your host machine
		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)
		... 8 more
Caused by: java.net.SocketException: An established connection was aborted by the software in your host machine
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:325)
	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:457)
	at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:68)
	at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1411)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1022)
	... 4 more
Comments
There is a socket closing and reading competition, which is addressed in JDK-8258753. This bug should have been addressed in JDK-8258753. If the test fails again in the future, please consider to re-open it.
06-04-2021

When resolved JDK-8231810 for test javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java, I met a problem that the client socket may be already closed when the server socket tries to read the notify_close alert. Not sure it has a similar cause.
20-02-2020