On 21/08/2023 17:28, Shruthi Shruthi1 wrote:
The preClose() method internally calls the dup2() system call. If
there is a dup2() call on a file descriptor on a thread while another
thread is blocked in a read/write operation on the same file
descriptor, then the dup2() call is known to hang. Currently,
preClose() experiences a hang because we call dup2() before killing
the reader/writer thread(s).
The JDK has a lot of tests for async close so if dup2 is hanging then I
would expect at least some test failure. Which operating system (and
version) is still happening on? Do you know SO_LINGER has been enabled?
-Alan