This is a Windows specific issue where a virtual thread attempting to establish 
a connection appears to hang, and the test eventually times out. It initially 
looked like an issue on older releases of Windows but it turns out to be an 
issue that arises when a SOCKET handle is recycled quickly. Thanks to Daniel 
Jeliński for spending time to find a way to reproduce this quickly, up to now 
it was too intermittent and needed tens of thousands of runs to having some 
chance of reproducing.

When a SOCKET has been polled, the event is disabled rather than removed from 
wepoll / AFD poll. When the SOCKET is closed and immediately recycled then 
there is a race with the close event and registration the "new" socket for 
events. The change that we've tested is to remove the event after polling. This 
is done in the client thread rather than the poller to avoid racing with an 
async close.

As part of this change I've removed a temporary change to the Windows Pipe 
implementation and also remove a connect timeout that went into a few tests to 
workaround the issue.

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

Commit messages:
 - Fix AIX
 - Initial commit

Changes: https://git.openjdk.org/jdk/pull/16742/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16742&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8282726
  Stats: 42 lines in 8 files changed: 9 ins; 11 del; 22 mod
  Patch: https://git.openjdk.org/jdk/pull/16742.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16742/head:pull/16742

PR: https://git.openjdk.org/jdk/pull/16742

Reply via email to