shenandoah-dev Digest, Vol 100, Issue 40
Kemper, William
kemperw at amazon.com
Fri Jan 19 21:43:46 UTC 2024
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 https://github.com/openjdk/jdk17u-dev/blob/master/src/hotspot/share/runtime/safepoint.cpp#L250.
William
________________________________
From: Kirill A.Korinsky <kirill at korins.ky>
Sent: Friday, January 19, 2024 1:38:04 PM
To: Ramakrishna, Ramki
Cc: shenandoah-dev at openjdk.org; Kemper, William
Subject: RE: [EXTERNAL] shenandoah-dev Digest, Vol 100, Issue 40
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.
Hi Ramki,
On Fri, 19 Jan 2024 22:14:30 +0100,
Ramakrishna, Ramki wrote:
>
> > Until I've figured out how to reproduce it, I have no idea how to trace it on
> > production environment without perofrmance degradation and it's clearly that
> > both -Xlog:safepoint=trace and -XX:+SafepointALot aren't an option here :(
>
> Perhaps try `-XX:+SafepointTimeout` along with a suitably high value for the associated `-XX: SafepointTimeoutDelay=` value?
>
> Here are their respective defaults:
>
> product(bool, SafepointTimeout, false, \
> "Time out and warn or fail after SafepointTimeoutDelay " \
> "milliseconds if failed to reach safepoint") \
> \
>
> product(double, SafepointTimeoutDelay, 10000, \
> "Delay in milliseconds for option SafepointTimeout; " \
> "supports sub-millisecond resolution with fractional values.") \
> range(0, max_jlongDouble LP64_ONLY(/MICROUNITS)) \
I'm a bit lost here: how does it help in case of deadlock?
As far as I understand the vlaue should be high enough to not produce a lot of
logs, for example 500ms.
But, I don't understand how can it dump anything when the deadlock is had
happened, because all threads are blocked and simple wait.
>From another hand I have better idea. Let call some function on that state via
GDB, print_safepoint_timeout() or something else?
--
wbr, Kirill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/shenandoah-dev/attachments/20240119/7bd1b03b/attachment-0001.htm>
More information about the shenandoah-dev
mailing list