<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We discussed the issue with AIX OS team to get their input as this issue is happening only in AIX platform. Update from AIX OS dev team: A thread gets stuck in dup2() while duplicating a file descriptor that is already being used by two other threads (one for
 reading, one for writing). The writer thread does not write or close the FIFO, causing the reader to wait indefinitely, which blocks dup2(). Also he is saying that we cannot change OS side as it may break or change its existing behavior which other existing
 applications may be depending on.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
Can we apply the previously proposed fix at java level(reordering the <code style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;">
preClose</code><code>()</code> method) while adding an AIX-specific check to ensure it doesn’t affect other platforms? Or do you have any alternative suggestions?<br>
<br>
<span style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace;">            if (!tryClose()) {</span></div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                long th = thread;</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                if (th != 0) {</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                    if (!AIX.isAIX)</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                        nd.preClose(fd);</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                    NativeThread.signal(th);</div>
<div class="elementToProof" style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                    if (AIX.isAIX)</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                        nd.preClose(fd);</div>
<div style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
                }</div>
<div class="elementToProof" style="font-family: "Aptos Mono", Aptos_EmbeddedFont, Aptos_MSFontService, monospace; font-size: 12pt; color: rgb(0, 0, 0);">
            }</div>
<div class="elementToProof" style="margin-top: 1em; margin-bottom: 1em; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Restarting the previous discussion: <a href="https://mail.openjdk.org/pipermail/net-dev/2023-August/021859.html" id="LPlnk370927">
https://mail.openjdk.org/pipermail/net-dev/2023-August/021859.html</a></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>