<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 03/11/2025 02:44, Danny Thomas
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAABjz10cEfmG5qqGHDDjseWzxxdzOXd6SWbB1d_Qws1qN-1sEQ@mail.gmail.com">
      
      <div dir="ltr">
        <div class="gmail_quote gmail_quote_container">
          <div dir="ltr">Hi folks,
            <div><br>
              We saw a clinit deadlock with Log4j 2 and virtual threads
              recently. It's common for libraries to use a mix of static
              and instance field loggers, so seems particularly
              vulnerable to this kind of deadlock at startup.<br>
              <br>
              I don't recall reading what you have planned for clinit
              pinning, so thought I'd pass on this potentially common
              real-world deadlock and ask what you have in mind for
              addressing this limitation.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    The changes to preempt when a virtual thread must wait for a class
    to be initialized (by another thread) have been in the loom repo for
    sometime. This addresses the common cases. Patricio has JDK-8369238
    [1] currently in review and should be in main line (and JDK 26 EA
    builds) soon.<br>
    <br>
    -Alan<br>
    <br>
    [1] <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8369238">https://bugs.openjdk.org/browse/JDK-8369238</a><br>
  </body>
</html>