JDK-8228442 : DHKeyExchange/LegacyDHEKeyExchange.java failed due to "SSLException: An established connection was aborted by the software in your host machine"
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 11,14,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2019-07-19
  • Updated: 2021-09-14
  • Resolved: 2021-04-28
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 17
11.0.14-oracleFixed 17 b21Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The following test failed in the JDK14 CI:

sun/security/ssl/DHKeyExchange/LegacyDHEKeyExchange.java

Here's a snippet from the log file:

----------System.err:(44/3380)----------
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.SSLTransport.decode(SSLTransport.java:137)
	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1455)
	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1363)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:437)
	at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:878)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:969)
	at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:929)
	at LegacyDHEKeyExchange.doServerSide(LegacyDHEKeyExchange.java:102)
	at LegacyDHEKeyExchange.startServer(LegacyDHEKeyExchange.java:291)
	at LegacyDHEKeyExchange.<init>(LegacyDHEKeyExchange.java:204)
	at LegacyDHEKeyExchange.main(LegacyDHEKeyExchange.java:185)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:830)
	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:421)
		at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:441)
		at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:825)
		at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:989)
		at java.base/sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:82)
		at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:355)
		... 19 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:326)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:351)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:802)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:919)
	at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:450)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:165)
	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:108)
	... 16 more

JavaTest Message: Test threw exception: javax.net.ssl.SSLException: An established connection was aborted by the software in your host machine
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: javax.net.ssl.SSLException: An established connection was aborted by the software in your host machine
----------rerun:(39/4411)*----------
Comments
Fix Request (11u): Should get backported for parity with 11.0.14-oracle. Applies cleanly.
13-09-2021

Changeset: 7e3bc4cb Author: Fernando Guallini <fguallini@openjdk.org> Committer: Xue-Lei Andrew Fan <xuelei@openjdk.org> Date: 2021-04-28 15:40:53 +0000 URL: https://git.openjdk.java.net/jdk/commit/7e3bc4cb444c7b7f3cd3e514b4ad7d7137799401
28-04-2021

this looks to me to be thread synchronization issue. We have several other tests in the past which used this template and were updated later on. Probably this test should be updated as well.
24-07-2019

[~rhalade] Assigning to you for now to triage.
24-07-2019