<div dir="ltr">Probably an executor, just want to make sure we are aligned :) </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 22 Jul 2024 at 12:11, Yuval Lombard <<a href="mailto:yuval.l@securithings.com">yuval.l@securithings.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Alan,<br><br>Thanks, sorry for the confusion, we also saw this odd release, and got read of it, it was just a side note btw, because I realized I did not attach how I have created my scheduler, so I elaborated on this as well.<br><br>Just to make sure by SPTE what exactly do you mean?<br><br>We are running into some difficulties now after upgrading to the latest EA based on jdk24 where most of our utilized framework's libs are not supporting it yet (Spring, and Spring-Boot)<br>So if there is an older available EA build based on jdk23 that may be addressing one of the possible issues that may got us into this locking state, we will be happy to test it.<br>Otherwise it will require some work from our end in order to try to package our app<br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 22 Jul 2024 at 10:46, Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com" target="_blank">Alan.Bateman@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
  <div>
    On 22/07/2024 07:09, Yuval Lombard wrote:<br>
    <blockquote type="cite">
      
      <div dir="ltr">Hi Alan,<br>
        <br>
        Thanks for the clarifications!<br>
        OK regarding the pooling of the VT, now I understand what robert
        meant about the partial code example.<br>
        <br>
        The scheduler is created in this way:<br>
        <span style="padding:0px 2px"><span style="padding:0px 2px"><span style="color:rgb(0,0,0);font-family:Consolas;font-size:10pt;white-space:pre-wrap">ScheduledExecutorService <span style="color:rgb(106,62,62)">scheduler = </span></span></span><span style="color:rgb(0,0,0);font-family:Consolas;font-size:10pt;white-space:pre-wrap">Executors.<span style="font-style:italic">newScheduledThreadPool</span>(1)
</span></span><br>
        <div>then as the code example shows after it is granted with a
          permit to execute a task, it delegates it to the VT by
          starting it this way:<br>
          <span style="padding:0px 2px"><span style="color:rgb(0,0,0);font-family:Consolas;font-size:10pt;white-space:pre-wrap">Thread.<span style="font-style:italic">ofVirtual</span>().start(() -> { ... }</span></span><br>
        </div>
      </div>
    </blockquote>
    <br>
    I read Robert's mail as a comment on the code fragment in your first
    mail. The finally block in that code fragment releases a permit
    unconditionally whereas I assume you only want to release if
    acquired in that thread.<br>
    <br>
    My comment is about thread dump you attached. Look at threads #73,
    #77 and #83 as examples. The stack traces suggests a SPTE using
    virtual threads as worker threads. It's nothing to do with the issue
    we are discussing here, just a comment that on a something
    surprising that you might want to look into.<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><span style="padding:0px 2px"><span style="color:rgb(0,0,0);font-family:Consolas;font-size:10pt;white-space:pre-wrap">
</span></span></div>
        <div>I upgrade the jdk to the latest EA and test it again, and
          get back to you in any case with the relevant thread dumps.<br>
        </div>
      </div>
      <br>
    </blockquote>
    Thanks. As I mentioned, I think this is related to preemption when
    cancelling a timer after Object.wait(millis). We may have to publish
    a new EA build.<br>
    <br>
    -Alan<br>
  </div>

</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial">Kind regards,<b style="font-size:13.3333px;color:rgb(0,176,240);font-family:Ebrima"><br><br>Yuval Lombard</b><br></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><font color="#3b3838" face="Ebrima"><span style="font-size:12px"><b>Lead Software Engineer</b></span></font></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-size:9pt;font-family:Ebrima;color:rgb(59,56,56)">+972.50.548.0111</span><span style="font-size:9pt;font-family:Ebrima;color:rgb(64,64,64)"><u></u><u></u></span></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><font color="#0000ff" face="Ebrima"><span style="font-size:12px"><a href="mailto:yuval.l@securithings.com" style="color:rgb(17,85,204)" target="_blank">yuval.l@securithings.com</a></span></font></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><img src="cid:ii_l13cyhga0" alt="logo_black.png" width="200" height="47"></p></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial">Kind regards,<b style="font-size:13.3333px;color:rgb(0,176,240);font-family:Ebrima"><br><br>Yuval Lombard</b><br></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><font color="#3b3838" face="Ebrima"><span style="font-size:12px"><b>Lead Software Engineer</b></span></font></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><span style="font-size:9pt;font-family:Ebrima;color:rgb(59,56,56)">+972.50.548.0111</span><span style="font-size:9pt;font-family:Ebrima;color:rgb(64,64,64)"><u></u><u></u></span></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><font color="#0000ff" face="Ebrima"><span style="font-size:12px"><a href="mailto:yuval.l@securithings.com" style="color:rgb(17,85,204)" target="_blank">yuval.l@securithings.com</a></span></font></p><p class="MsoNormal" style="color:rgb(34,34,34);font-size:small;background-image:initial;background-position:initial;background-repeat:initial"><img src="cid:ii_l13cyhga0" alt="logo_black.png" width="200" height="47"></p></div></div></div></div>