Integrated: 8311177: Switching to interpreter only mode in carrier thread can lead to crashes
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Jun 5 21:49:56 UTC 2024
On Tue, 28 May 2024 22:24:53 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
> Please, review the following `interp-only` issue related to carrier threads.
> There are 3 problems fixed here:
> - The `EnterInterpOnlyModeClosure::do_threads` is taking the `JvmtiThreadState` with the `jt->jvmti_thread_state()` which is incorrect when we have a deal with a carrier thread. The target state is known at the point when the `HandshakeClosure` is set, so the fix is to pass it as a constructor parameter.
> - The `state->is_pending_interp_only_mode())` was processed at mounts only but it has to be processed for unmounts as well.
> - The test `test/hotspot/jtreg/serviceability/jvmti/vthread/MethodExitTest/libMethodExitTest.cpp` has a wrong assumption that there can't be `MethodExit` event on the carrier thread when the function `breakpoint_hit1` is being executed. However, it can happen if the virtual thread gets unmounted.
>
> The fix also includes new test case `vthread/CarrierThreadEventNotification` developed by Patricio.
>
> Testing:
> - Ran new test case locally
> - Ran mach5 tiers 1-6
This pull request has now been integrated.
Changeset: 60ea17e8
Author: Serguei Spitsyn <sspitsyn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/60ea17e8482936a6acbc442bb1be199e01008072
Stats: 251 lines in 9 files changed: 229 ins; 12 del; 10 mod
8311177: Switching to interpreter only mode in carrier thread can lead to crashes
Reviewed-by: pchilanomate, amenkov
-------------
PR: https://git.openjdk.org/jdk/pull/19438
More information about the serviceability-dev
mailing list