<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<span style="font-family: Calibri, Helvetica, sans-serif;">Hi Alan.,</span>
<div><br class="ContentPasted0">
</div>
<span style="font-family: Calibri, Helvetica, sans-serif;">We are seeing the issue in AIX 7.2 and Java 11.0.11+9. And SO_LINGER is not enabled.</span><br>
<br>
<span style="font-family: Calibri, Helvetica, sans-serif;">Thanks</span><br>
<span style="font-family: Calibri, Helvetica, sans-serif;">Shruthi</span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alan Bateman <Alan.Bateman@oracle.com><br>
<b>Sent:</b> Monday, August 21, 2023 10:55 PM<br>
<b>To:</b> Shruthi Shruthi1 <Shruthi.Shruthi1@ibm.com>; net-dev@openjdk.org <net-dev@openjdk.org><br>
<b>Cc:</b> Syed Moinudeen1 <smoinud1@in.ibm.com><br>
<b>Subject:</b> [EXTERNAL] Re: Suggestion needed to port the fix to JDK17 and JDK11</font>
<div> </div>
</div>
<div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
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
</div>
<div style="display:none!important; display:none; visibility:hidden; font-size:1px; color:#ffffff; line-height:1px; height:0px; max-height:0px; opacity:0; overflow:hidden">
</div>
<style>
<!--
#x_pfptBanner67lzado
{display:block!important;
visibility:visible!important;
opacity:1!important;
background-color:#D0D8DC!important;
max-width:none!important;
max-height:none!important}
-->
</style>On 21/08/2023 17:28, Shruthi
Shruthi1 wrote:<br>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<div class="x_ContentPasted0">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).
</div>
<br>
</div>
</blockquote>
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?<br>
<br>
-Alan<br>
</div>
</body>
</html>