<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi - thank you for sharing this. I've opened a ticket in the bug tracker for this: <a href="https://bugs.openjdk.org/browse/JDK-8324225" class="x_OWAAutoLink" id="LPlnk951341">https://bugs.openjdk.org/browse/JDK-8324225</a></p>
<p><br>
</p>
<p>It would be really helpful if you are able to share a portable reproducer for this. It would also be helpful to know why the VMThread thinks the Shenandoah worker thread is still running. If you could run an instance of your application with `-Xlog:safepoint=trace`
 it would shed some light on things (please test this in a non-production environment, I'm not sure what sort of log volume this will produce for your application). We will also work on a reproducer by running our tests with `-XX:+SafepointALot` .</p>
<p><br>
</p>
<p>William</p>
<p></p>
<div></div>
<br>
<p></p>
</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> shenandoah-dev <shenandoah-dev-retn@openjdk.org> on behalf of Kirill A.Korinsky <kirill@korins.ky><br>
<b>Sent:</b> Friday, January 19, 2024 9:14:49 AM<br>
<b>To:</b> shenandoah-dev@openjdk.org<br>
<b>Subject:</b> [EXTERNAL] Deadlock on OpenJDK 17</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.<br>
<br>
<br>
<br>
Greetings,<br>
<br>
I'd like to share with you that seems like a deadlock inside Shenandoah.<br>
<br>
The deadlock means that JVM goes into state similar ot stop of the worls,<br>
it doesn't response to jstack or jmap with error like:<br>
<br>
  Unable to open socket file /proc/XXX/root/tmp/.java_pidYYY<br>
<br>
It runs inside docker container and I have gc verbose log to stdout,<br>
that allows me to capture the last message before it's frozen:<br>
<br>
  [2024-01-19T16:23:09.871+0000][info][gc] Trigger: Metadata GC Threshold<br>
  [2024-01-19T16:23:09.876+0000][info][gc] GC(2) Concurrent reset 5.054ms<br>
  [2024-01-19T16:23:09.876+0000][info][gc] GC(2) Pause Init Mark (unload classes) 0.045ms<br>
  [2024-01-19T16:23:09.889+0000][info][gc] GC(2) Concurrent marking roots 12.535ms<br>
  [2024-01-19T16:23:10.425+0000][info][gc] GC(2) Concurrent marking (unload classes) 535.868ms<br>
  [2024-01-19T16:23:10.425+0000][info][gc] GC(2) Pause Final Mark (unload classes) 0.156ms<br>
  [2024-01-19T16:23:10.492+0000][info][gc] GC(2) Concurrent thread roots 66.065ms<br>
  [2024-01-19T16:23:10.513+0000][info][gc] GC(2) Concurrent weak references 21.074ms<br>
<br>
The error had happened on Fedora 39's java-17-openjdk-17.0.9.0.9-3.fc39.x86_64<br>
<br>
As a proof that it is a deadlock I'd like to share output of all threads from<br>
gdb's point of which I gets as thread apply all bt<br>
<br>
JVM runs with options:<br>
  -XX:+UseShenandoahGC -XX:+AlwaysPreTouch -XX:-UseBiasedLocking -XX:+DisableExplicitGC -XX:+UnlockExperimentalVMOptions -XX:+UseTransparentHugePages<br>
<br>
--<br>
wbr, Kirill<br>
</div>
</span></font>
</body>
</html>