JDK-8257670 : sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java reports leaks
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2020-12-03
  • Updated: 2021-05-10
  • Resolved: 2020-12-07
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 8 Other
11.0.11Fixed 8u271Fixed openjdk8u302Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Test failed with:

java.lang.RuntimeException: Too many open file descriptors. Looks leaky.
	at SSLSocketLeak.main(SSLSocketLeak.java:56)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	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:831)

Only seen on Windows.

Seen once in jdk16 CI so far, but also showed up a couple times in valhalla CI and in a couple of personal builds.

Fix Request (8u): Backport to 8u requested because it is a part of 8u291-oracle. Patch doesn't apply cleanly, review approval email: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-April/013749.html

Fix Request (11u): Backport to 11u requested because it is a part of 11.0.11-oracle. The patch depends on JDK-8256818 (that is currently on approval for 11u) and applies cleanly on top of it. The patch is a prerequisite for JDK-8257884 and JDK-8257997. Testing: checked that changed test passes (with JDK-8257884 and JDK-8257997 included) on Linux and Windows. Commit doesn't pass jcheck because of the discrepancy between git and mercurial author naming, exported commit with corrected naming: https://cr.openjdk.java.net/~akasko/jdk11u/8257670/8257670.changeset

Filing new bug fro follow up.

I assume after JDK-8257884? Can you share the output for the FDs?

This test is still failing in the CI.

Of the 3 runs that are listed as failing, all on Windows: -- run 1 FDs at the beginning: 318 FDs in the end: 370 -- run 2 FDs at the beginning: 313 FDs in the end: 365 -- run 3 FDs at the beginning: 313 FDs in the end: 370

Unfortunately I wasn't notified about this issue earlier. After Looking into the nightly test runs at SAP I think the unreliability with the test in its current form affects Windows only. I'll try adapting the acceptable threshold for open files in a way that the test can be automatic again.

Changeset: 39b8a2e6 Author: Xue-Lei Andrew Fan <xuelei@openjdk.org> Date: 2020-12-07 23:53:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/39b8a2e6

Can anybody check whether we see test failures on Windows only or other platforms are affected? I believe the test should be less reliable on Windows, so maybe only exclude it there?

This test case may be not reliable if there are some other test cases or applications running at the same time. It's a good manual test, but might be not suitable for OpenJDK automation regression test if it could be impacted.

Also saw it in a personal build.

This failure has shown up in a couple of recent Tier2 runs so I'm bumping the priority from P4 -> P3.