<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 class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Awesome, thank you guys.</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>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-- Marko</div>
<div id="appendonsend"></div>
<P style="FONT-SIZE: 10pt; FONT-FAMILY: ARIAL; COLOR: #373a3b"> </P>
<P
style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: ARIAL; COLOR: #373a3b; MARGIN-LEFT: 10px">
<TABLE style="WIDTH: 865px; COLOR: #373a3b" cellSpacing=0 cellPadding=0
border=0>
<TBODY style="COLOR: #373a3b">
<TR style="COLOR: #373a3b">
<TD
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH: 65px; COLOR: #373a3b; PADDING-LEFT: 0px; PADDING-RIGHT: 20px"
vAlign=bottom><IMG style="HEIGHT: 60px; WIDTH: 65px" border=0
src="cid:Infobip_logo_vertical_signature_e28e13d2-255b-4571-a70c-8292f2d75c0b.png" width=65
height=60></TD>
<TD
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH: 800px; COLOR: #373a3b"
vAlign=bottom>
<TABLE style="COLOR: #373a3b" cellSpacing=0 cellPadding=0 border=0>
<TBODY style="COLOR: #373a3b">
<TR style="COLOR: #373a3b">
<TD
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; COLOR: #373a3b; PADDING-LEFT: 11px; PADDING-RIGHT: 19px"
vAlign=bottom align=left>
<P
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; COLOR: #373a3b; MARGIN: 0px 0px 2px"><STRONG
style="COLOR: #373a3b">Marko Bakšić</STRONG><BR></P>
<P
style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 2px; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><SPAN
style="FONT-SIZE: 8.4pt">Software Engineer</SPAN></P></TD>
<TD
style="FONT-SIZE: 8.4pt; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; COLOR: #373a3b; PADDING-LEFT: 20px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 20px"
vAlign=bottom>
<P
style="FONT-SIZE: 8.4pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><STRONG
style="COLOR: #373a3b">E </STRONG><SPAN
style="FONT-SIZE: 8.4pt">Marko.Baksic@infobip.com</SPAN><BR></P>
<P
style="FONT-SIZE: 8.4pt; MARGIN-BOTTOM: 2px; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><STRONG
style="COLOR: #373a3b">M</STRONG> <SPAN
style="FONT-SIZE: 8.4pt"></SPAN></P></TD>
<TD
style="FONT-SIZE: 8.4pt; FONT-FAMILY: Arial; WHITE-SPACE: nowrap; COLOR: #373a3b; PADDING-LEFT: 20px; BORDER-LEFT: black 1px solid; PADDING-RIGHT: 20px"
vAlign=bottom>
<P
style="FONT-SIZE: 8.4pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><STRONG
style="COLOR: #373a3b">A </STRONG><SPAN
style="FONT-SIZE: 8.4pt">Utinjska 29A, 10000
Zagreb, Croatia<BR></SPAN></P>
<P
style="FONT-SIZE: 8.4pt; MARGIN-BOTTOM: 2px; FONT-FAMILY: Arial; MARGIN-TOP: 0px"><A
style="TEXT-DECORATION: none; COLOR: #373a3b"
href="http://www.infobip.com">www.infobip.com<SPAN
style="FONT-SIZE: 9pt"></SPAN></A></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></P>
<P
style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5pt; FONT-FAMILY: Arial; MARGIN-TOP: 0px; COLOR: #373a3b"> </P>
<P
style="FONT-SIZE: 10pt; MARGIN-BOTTOM: 5pt; FONT-FAMILY: Arial; MARGIN-TOP: 0px; COLOR: #373a3b"> </P><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> Aleksei Efimov <aleksej.efimov@oracle.com><br>
<b>Sent:</b> Wednesday, September 4, 2024 17:29<br>
<b>To:</b> Daniel FUCHS <daniel.fuchs@oracle.com>; Marko Bakšić <Marko.Baksic@infobip.com>; core-libs-dev <core-libs-dev@openjdk.org><br>
<b>Subject:</b> [EXTERNAL] Re: Possible bug in jdk.naming.dns. I need guidance on how get someone smarter to look at it.</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you, Marko - it's an excellent catch! Indeed, we have a bug in a code that updates the left timeout. And yes, we should use nanoTime for measuring elapsed time. I will work on a fix for both issues and will try to create a test for the left timeout update
scenario.</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
- Aleksei</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> core-libs-dev <core-libs-dev-retn@openjdk.org> on behalf of Daniel Fuchs <daniel.fuchs@oracle.com><br>
<b>Sent:</b> 04 September 2024 3:59 PM<br>
<b>To:</b> Marko Bakšić <Marko.Baksic@infobip.com>; core-libs-dev <core-libs-dev@openjdk.org><br>
<b>Subject:</b> Re: Possible bug in jdk.naming.dns. I need guidance on how get someone smarter to look at it.</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On 04/09/2024 15:02, Marko Bakšić wrote:<br>
> Thank you Daniel.<br>
> <br>
> The part that was suspicious to me is<br>
> <br>
> ```<br>
> int timeoutLeft = pktTimeout;<br>
> do {<br>
> ...<br>
> timeoutLeft = pktTimeout - ((int) (end - start));<br>
> } while (timeoutLeft > MIN_TIMEOUT);<br>
> ```<br>
> <br>
> Here, timeoutLeft is not iteratively decreased, but is always derived <br>
> from `pktTimeout`.<br>
> I can see a case where `timeoutLeft` never drops below `MIN_TIMEOUT` <br>
> (this is the part where I'm not sure if I'm missing some deeper knowledge).<br>
<br>
Indeed - good observation!<br>
<br>
-- daniel<br>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>