JDK-8309305 : sun/security/ssl/SSLSocketImpl/BlockedAsyncClose.java fails with jtreg test timeout
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 11.0.14,17,21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2023-06-01
  • Updated: 2024-10-15
  • Resolved: 2023-07-21
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 JDK 21 JDK 22 JDK 8
17.0.11-oracleFixed 21.0.2Fixed 22 b08Fixed 8u441Fixed
Related Reports
Relates :  
Description
----------messages:(8/300)----------
command: main BlockedAsyncClose
reason: User specified action: run main/othervm BlockedAsyncClose 
started: Sun May 07 12:18:44 UTC 2023
Mode: othervm [/othervm specified]
Timeout information:
--- Timeout information end.
finished: Sun May 07 12:30:25 UTC 2023
elapsed time (seconds): 701.01
----------configuration:(0/0)----------

...


test result: Error. Program `c:\ade\mesos\work_dir\jib-master\install\jdk-21+21-1778\windows-x64.jdk\jdk-21\bin\java' timed out (timeout set to 480000ms, elapsed time including timeout handling was 701003ms).

Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2537 Date: 2024-02-21 12:15:28 +0000
21-02-2024

Fix request [17u] I backport this for parity with 17.0.11-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passed.
22-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2144 Date: 2024-01-19 09:27:15 +0000
19-01-2024

Changeset: 8042a50b Author: Matthew Donovan <mdonovan@openjdk.org> Date: 2023-07-21 14:45:59 +0000 URL: https://git.openjdk.org/jdk/commit/8042a50b99a671390910afa5f816894f77255429
21-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14378 Date: 2023-06-08 14:25:26 +0000
08-06-2023

I believe this is happening because the test thread's write loop hasn't blocked yet but the write buffer is (or is almost) full. When socket.close() is called in the main thread, it generates a close_notify alert and tries to write it to the socket. It's at this point that the write buffer is full enough that writing the close_notify alert blocks and the test times out.
07-06-2023

[~mdonovan] Please triage this.
02-06-2023