<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>It's not a true deadlock. The VMThread is in a busy loop checking if other threads have finished. The SafepointTimeout is checked during execution of the VMThread's busy/wait loop. See <a href="https://github.com/openjdk/jdk17u-dev/blob/master/src/hotspot/share/runtime/safepoint.cpp#L250" class="x_OWAAutoLink">https://github.com/openjdk/jdk17u-dev/blob/master/src/hotspot/share/runtime/safepoint.cpp#L250</a>.</p>
<p><br>
</p>
<p>William</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> Kirill A.Korinsky <kirill@korins.ky><br>
<b>Sent:</b> Friday, January 19, 2024 1:38:04 PM<br>
<b>To:</b> Ramakrishna, Ramki<br>
<b>Cc:</b> shenandoah-dev@openjdk.org; Kemper, William<br>
<b>Subject:</b> RE: [EXTERNAL] shenandoah-dev Digest, Vol 100, Issue 40</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>
Hi Ramki,<br>
<br>
On Fri, 19 Jan 2024 22:14:30 +0100,<br>
Ramakrishna, Ramki wrote:<br>
><br>
> > Until I've figured out how to reproduce it, I have no idea how to trace it on<br>
> > production environment without perofrmance degradation and it's clearly that<br>
> > both -Xlog:safepoint=trace and -XX:+SafepointALot aren't an option here :(<br>
><br>
> Perhaps try `-XX:+SafepointTimeout` along with a suitably high value for the associated `-XX: SafepointTimeoutDelay=` value?<br>
><br>
> Here are their respective defaults:<br>
><br>
> product(bool, SafepointTimeout, false, \<br>
> "Time out and warn or fail after SafepointTimeoutDelay " \<br>
> "milliseconds if failed to reach safepoint") \<br>
> \<br>
><br>
> product(double, SafepointTimeoutDelay, 10000, \<br>
> "Delay in milliseconds for option SafepointTimeout; " \<br>
> "supports sub-millisecond resolution with fractional values.") \<br>
> range(0, max_jlongDouble LP64_ONLY(/MICROUNITS)) \<br>
<br>
<br>
I'm a bit lost here: how does it help in case of deadlock?<br>
<br>
As far as I understand the vlaue should be high enough to not produce a lot of<br>
logs, for example 500ms.<br>
<br>
But, I don't understand how can it dump anything when the deadlock is had<br>
happened, because all threads are blocked and simple wait.<br>
<br>
>From another hand I have better idea. Let call some function on that state via<br>
GDB, print_safepoint_timeout() or something else?<br>
<br>
--<br>
wbr, Kirill<br>
</div>
</span></font>
</body>
</html>