RFR: 8364314: java_lang_Thread::get_thread_status fails assert(base != nullptr) failed: Invalid base [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Wed Jul 30 23:56:55 UTC 2025
On Wed, 30 Jul 2025 17:15:55 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
> For the calls to `tlh.cv_internal_thread_to_JavaThread` in src/hotspot/share/prims/jvm.cpp, the new logic added by: [JDK-8361912](https://bugs.openjdk.org/browse/JDK-8361912) ThreadsListHandle::cv_internal_thread_to_JavaThread does not deal with a virtual thread's carrier thread
>
> will allow the carrier JavaThread to be returned to the caller. However, NONE of the callers in jvm.cpp use a JvmtiVTMSTransitionDisabler to prevent the virtual thread from being unmounted from the carrier thread. So at the time of the remainder of the logic in the JVM calls, the `JavaThread* receiver` may be a stale carrier thread that no longer has a virtual thread mounted.
>
> I don't know if this is an issue or not.
>
Those two methods should only be called for platform threads. `VirtualThread` class overrides `Thread.interrupt`, and `Thread.setPriority` ignores virtual threads. Maybe we should add an assert there after the JDK-8361912 changes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26544#issuecomment-3138157865
More information about the hotspot-runtime-dev
mailing list