RFR: 8325437: Safepoint polling in monitor deflation can cause massive logs
Stefan Karlsson
stefank at openjdk.org
Wed Feb 7 15:40:17 UTC 2024
If `-Xlog:monitorinflation=debug` is used and `ObjectSynchronizer::chk_in_use_entry` is called while monitor deflation is safepoint polled/blocked, we have deflated monitors in the in-use list and we 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 turns off this warning.
-------------
Commit messages:
- 8325437: Safepoint polling in monitor deflation can cause massive logs
Changes: https://git.openjdk.org/jdk/pull/17752/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17752&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325437
Stats: 4 lines in 1 file changed: 1 ins; 2 del; 1 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