RFR: 8325437: Safepoint polling in monitor deflation can cause massive logs
Aleksey Shipilev
shade at openjdk.org
Thu Feb 8 17:34:02 UTC 2024
On Wed, 7 Feb 2024 15:35:16 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> If `-Xlog:monitorinflation=debug` is used and `ObjectSynchronizer::chk_in_use_entry` is called while monitor deflation is safepoint polled/blocked, we can have deflated monitors on the in-use list and we can get a huge number of lines stating:
>
> [10.570s][debug][monitorinflation] WARNING: monitor=0x00007fa1004f8480: in-use monitor is deflated.
>
>
> This comes from the following code:
>
> void ObjectSynchronizer::chk_in_use_entry(ObjectMonitor* n, outputStream* out,
> int* error_cnt_p) {
> if (n->owner_is_DEFLATER_MARKER()) {
> // This should not happen, but if it does, it is not fatal.
> out->print_cr("WARNING: monitor=" INTPTR_FORMAT ": in-use monitor is "
> "deflated.", p2i(n));
> return;
> }
>
>
> There are tentative plans to rewrite the monitor deflation to unlink deflated monitors from the in-use list *before* the safepoint polls, but I'd like to suggest that we make an interim patch that deletes this warning.
Ouch. Looks good!
Maybe you want to merge from latest master to get clean GHA run. It should contain the GHA fix: https://github.com/openjdk/jdk/commit/3c91b59ef9c992718d73f2fc9fa50ad2ead78208
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17752#pullrequestreview-1870848101
PR Comment: https://git.openjdk.org/jdk/pull/17752#issuecomment-1934615601
More information about the hotspot-runtime-dev
mailing list