RFR: 8369482: JVMTI + Loom: JDK-8368159 introduced safepoint poll in disallowed state [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Fri Oct 10 06:29:40 UTC 2025
> [JDK-8368159](https://bugs.openjdk.org/browse/JDK-8368159) added `JvmtiExport::has_frame_pops(JavaThread* thread)`
> which calls `JvmtiExport::get_jvmti_thread_state();` which may safepoint.
>
> Example stack trace:
>
> V [libjvm.dylib+0x125f888] VMError::report(outputStream*, bool)+0x1b68 (javaThread.cpp:375)
> V [libjvm.dylib+0x1263184] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c
> V [libjvm.dylib+0x5de268] print_error_for_unit_test(char const*, char const*, char*)+0x0
> V [libjvm.dylib+0x9427ec] JavaThread::check_for_valid_safepoint_state()+0x120
> V [libjvm.dylib+0xe7e4e4] Mutex::lock(Thread*)+0x48
> V [libjvm.dylib+0xbbb198] JvmtiThreadState::state_for(JavaThread*, Handle)+0x200
> V [libjvm.dylib+0xc462ec] JvmtiEventControllerPrivate::thread_started(JavaThread*)+0x1a0
> V [libjvm.dylib+0xc493a4] JvmtiExport::get_jvmti_thread_state(JavaThread*, bool)+0xc0
> V [libjvm.dylib+0xc5078c] JvmtiExport::has_frame_pops(JavaThread*)+0x24
> V [libjvm.dylib+0x59c398] freeze_epilog(JavaThread*, ContinuationWrapper&, freeze_result)+0xf8
> V [libjvm.dylib+0x59b6e8] Config<(oop_kind)0, CardTableBarrierSet>::freeze(JavaThread*, long*)+0x6f4
> V [libjvm.dylib+0x59a4d4] int freeze<Config<(oop_kind)0, CardTableBarrierSet>>(JavaThread*, long*)+0x108
>
>
> I suggest we do double checked on `JvmtiExport::can_post_frame_pop()` and move the `ContinuationWrapper::SafepointOp` scope.
Axel Boldt-Christmas has updated the pull request incrementally with two additional commits since the last revision:
- sspitsyn patch
- Revert "8369482: JVMTI + Loom: JDK-8368159 introduced safepoint poll in disallowed state"
This reverts commit e133d9b73125ea907111a2a869ed824aca9bfa3d.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27716/files
- new: https://git.openjdk.org/jdk/pull/27716/files/e133d9b7..4ec7ce98
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27716&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27716&range=00-01
Stats: 10 lines in 2 files changed: 0 ins; 4 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/27716.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27716/head:pull/27716
PR: https://git.openjdk.org/jdk/pull/27716
More information about the hotspot-dev
mailing list