RFR: 8366659: ObjectMonitor::wait() can deadlock with a suspension request [v9]
Anton Artemov
aartemov at openjdk.org
Tue Nov 18 13:03:37 UTC 2025
On Tue, 18 Nov 2025 00:48:11 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8366659: Addressed reviewer's comments.
>
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorWait/SuspendWithObjectMonitorWait.java line 52:
>
>> 50: * @compile SuspendWithObjectMonitorWait.java
>> 51: * @run main/othervm/native -agentlib:SuspendWithObjectMonitorWait SuspendWithObjectMonitorWait 3
>> 52: */
>
> Q: I'm not that happy with adding this complexity into one single test. It is usually not easy to deal with such big and multi-mode tests. Would it make sense to split `doWork1`, `doWork2` and `doWork3` tests into independent tests `SuspendWithObjectMonitorWait{1|2|3}.java` sharing some parts, e.g. .cpp file, `SuspendWithObjectMonitorWaitWorker.java` class etc.? Then the only duplication will be the `main()` method.
Actually I agree, it has become way too long. I refactored it into 3 smaller tests.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2538107049
More information about the serviceability-dev
mailing list