-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 26
-
Component/s: hotspot
-
master
The JVM TI code has a common pattern to instantiate the MountUnmountDisabler:
MountUnmountDisabler disabler(thread);
where the 'thread' argument has the type: jthread.
One example:
JvmtiEnv::GetThreadState(jthread thread, jint* thread_state_ptr) {
JavaThread* current_thread = JavaThread::current();
MountUnmountDisabler disabler(thread);
Now, the MountUnmountDisabler class has two constructors:
MountUnmountDisabler(oop thread_oop); // disable transitions for one
MountUnmountDisabler(bool exclusive); // disable transitions for all
The common JVM TI pattern above is currently resolved to the second constructor where the jthread argument is converted to 'true'. It makes the instantiated MountUnmountDisabler to disable mount/unmount transitions for all virtual thread instead of the specific one. This problem was identified with a minor tracing.
So, all the above shows that the following overloaded constructor is currently missed:
MountUnmountDisabler(jthread thread);
It is a regression which was introduced in jdk 26 with the fix of:
JDK-8364343: Virtual Thread transition management needs to be independent of JVM TI
The fix replaced the constructor:
MountUnmountDisabler(jthread thread);
with:
MountUnmountDisabler(oop thread_oop);
MountUnmountDisabler disabler(thread);
where the 'thread' argument has the type: jthread.
One example:
JvmtiEnv::GetThreadState(jthread thread, jint* thread_state_ptr) {
JavaThread* current_thread = JavaThread::current();
MountUnmountDisabler disabler(thread);
Now, the MountUnmountDisabler class has two constructors:
MountUnmountDisabler(oop thread_oop); // disable transitions for one
MountUnmountDisabler(bool exclusive); // disable transitions for all
The common JVM TI pattern above is currently resolved to the second constructor where the jthread argument is converted to 'true'. It makes the instantiated MountUnmountDisabler to disable mount/unmount transitions for all virtual thread instead of the specific one. This problem was identified with a minor tracing.
So, all the above shows that the following overloaded constructor is currently missed:
MountUnmountDisabler(jthread thread);
It is a regression which was introduced in jdk 26 with the fix of:
The fix replaced the constructor:
MountUnmountDisabler(jthread thread);
with:
MountUnmountDisabler(oop thread_oop);
- caused by
-
JDK-8364343 Virtual Thread transition management needs to be independent of JVM TI
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/f5249db9
-
Review(jdk26)
openjdk/jdk/28968
-
Review(master)
openjdk/jdk/28965