[jdk17u-dev] RFR: 8358764: (sc) SocketChannel.close when thread blocked in read causes connection to be reset (win)

Voznia Anton duke at openjdk.org
Mon Oct 27 20:57:52 UTC 2025


Hello,

This is an unclean backport of JDK-8358764 for JDK 17.
I used the following JDK 21 backport as the baseline https://github.com/openjdk/jdk21u-dev/pull/2137

Changes:
* Brought over the Windows socket shutdown on write changes introduced with the virtual threads commit.
* Removed comments related to virtual threads.
* Adapted PeerReadsAfterAsyncClose.java to JDK 17 (removed virtual thread test case/scenario).


Notes:
The fix affects Windows only.
Tested test/jdk/java/nio/ and test/jdk/java/net/ on macOS/ARM and Windows/x64.
The introduced test passed successfully.

OpenJDK GHA Sanity Checks also passed.

-------------

Commit messages:
 - Backport e5196fc24d2ec9e581af7803ac47036111fee029

Changes: https://git.openjdk.org/jdk17u-dev/pull/3936/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=3936&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358764
  Stats: 247 lines in 5 files changed: 239 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/3936.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/3936/head:pull/3936

PR: https://git.openjdk.org/jdk17u-dev/pull/3936


More information about the jdk-updates-dev mailing list