RFR: 8325437: Safepoint polling in monitor deflation can cause massive logs [v2]
Stefan Karlsson
stefank at openjdk.org
Fri Feb 9 10:06:30 UTC 2024
> 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.
Stefan Karlsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge remote-tracking branch 'upstream/master' into 8325437_monitor_deflation_excessive_logging
- 8325437: Safepoint polling in monitor deflation can cause massive logs
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17752/files
- new: https://git.openjdk.org/jdk/pull/17752/files/c58cc6f8..2719c84a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17752&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17752&range=00-01
Stats: 3414 lines in 239 files changed: 2530 ins; 252 del; 632 mod
Patch: https://git.openjdk.org/jdk/pull/17752.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17752/head:pull/17752
PR: https://git.openjdk.org/jdk/pull/17752
More information about the hotspot-runtime-dev
mailing list