You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid triggering the assertion, the stub needs to be empty.
As for the implementation, this method notifies JVMTI to disable JVMTI suspend operations for a VirtualThread by toggling a field on/off. The intent is to ignore JVMTI suspend operations when a VirtualThread is performing certain synchronized blocks related to its carrier thread.
If it doesn't exist, then let JVM_VirtualThreadDisableSuspend stay emtpy.
If the bug exists in OpenJ9, then implement JVM_VirtualThreadDisableSuspend using the above description after verifying if the JVMTI operations are skipped or delayed (wait) until the VirtualThread completes the synchronized block.
The text was updated successfully, but these errors were encountered:
Enable JVM_VirtualThreadDisableSuspend in JDK22. A PR has been
opened to move it to JDK22 in the RI. Eventually, we will see this
method in JDK22.
The above method is invoked in the VirtualThread class. So, the
assertion in the stub will trigger and cause failures in the builds.
Leaving the stub empty should be fine. See eclipse-openj9#18671 for more details.
Related:
- eclipse-openj9#18671
- eclipse-openj9#18667
- eclipse-openj9#18663
Signed-off-by: Babneet Singh <[email protected]>
Repro8311218.java has been added as SuspendWithInterruptLock.java in the openj9-openjdk-jdk22 extension repo. I have been unable to reproduce the bug after running the SuspendWithInterruptLock test 200 times. I plan to leave JVM_VirtualThreadDisableSuspend empty (no implementation needed) since the bug doesn't exist in OpenJ9.
A stub was added for
JVM_VirtualThreadDisableSuspend
(JDK23 only) in #18667.As per https://bugs.openjdk.org/browse/JDK-8311218,
JVM_VirtualThreadDisableSuspend
will eventually be ported to JDK22.Also, the assertion in the stub will be triggered because
notifyJvmtiDisableSuspend -> JVM_VirtualThreadDisableSuspend
is used inVirtualThread
methods such asunpark
,interrupt
,getAndClearInterrupt
,threadState
, andtoString
: https://github.com/ibmruntimes/openj9-openjdk-jdk/blob/openj9/src/java.base/share/classes/java/lang/VirtualThread.javaTo avoid triggering the assertion, the stub needs to be empty.
As for the implementation, this method notifies JVMTI to disable
JVMTI suspend
operations for aVirtualThread
by toggling a field on/off. The intent is to ignoreJVMTI suspend
operations when aVirtualThread
is performing certain synchronized blocks related to its carrier thread.Next steps
Repro8311218.java
) from https://bugs.openjdk.org/browse/JDK-8311218.JVM_VirtualThreadDisableSuspend
stay emtpy.JVM_VirtualThreadDisableSuspend
using the above description after verifying if the JVMTI operations areskipped
ordelayed (wait)
until theVirtualThread
completes the synchronized block.The text was updated successfully, but these errors were encountered: