RFR: 8318757: 8318757 VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor
Axel Boldt-Christmas
aboldtch at openjdk.org
Mon Nov 6 12:53:13 UTC 2023
On Mon, 6 Nov 2023 09:46:11 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> A safepointed monitor deflation pass can run interleaved with a paused async monitor deflation pass. The code is not written to handle that situation and asserts when it finds a DEFLATER_MARKER in the owner field. @pchilano also found other issues with having to monitor deflation passes interleaved. More info below ...
Looks good, just had a few thoughts / comments.
src/hotspot/share/runtime/synchronizer.hpp line 135:
> 133:
> 134: // Iterate owned ObjectMonitors
> 135: static void monitors_iterate(MonitorClosure* closure);
Should the preconditions described in the implementation be documented in the header as well. Or at least have a note along the lines of `See ObjectSynchronizer::monitors_iterate_filtered for details on the contract for using this.`
src/hotspot/share/runtime/vmOperations.cpp line 398:
> 396: // to take more then a few milliseconds.
> 397: size_t monitors_count = ObjectSynchronizer::in_use_list_count();
> 398: if (monitors_count > 100000) {
Maybe use a named constant.
test/hotspot/jtreg/runtime/Monitor/ConcurrentDeflation.java line 41:
> 39:
> 40: public class ConcurrentDeflation {
> 41: public static final int TOTAL_RUN_TIME = 10 * 1000;
Given that this test always runs for at least 10 seconds, maybe it should be excluded from tier1. See `test/hotspot/jtreg/TEST.groups`.
Unsure what the praxis is here.
-------------
Marked as reviewed by aboldtch (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16519#pullrequestreview-1714840232
PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1383278380
PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1383132222
PR Review Comment: https://git.openjdk.org/jdk/pull/16519#discussion_r1383270353
More information about the hotspot-dev
mailing list