openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

JDK26+ modifies JVM_VirtualThread method names

Open JasonFengJ9 opened this issue 1 month ago • 6 comments

JDK26+ modifies JVM_VirtualThread method names

This is to adopt upstream update https://github.com/ibmruntimes/openj9-openjdk-jdk26/commit/55ee6e0a61021175514ed65d0b51db82f5eb9eb9.

Required by

  • https://github.com/ibmruntimes/openj9-openjdk-jdk26/pull/2

Signed-off-by: Jason Feng [email protected]

JasonFengJ9 avatar Dec 05 '25 20:12 JasonFengJ9

jenkins test sanity all jdk26 depends https://github.com/ibmruntimes/openj9-openjdk-jdk26/pull/2

pshipton avatar Dec 05 '25 21:12 pshipton

https://openj9-jenkins.osuosl.org/job/Test_openjdk26_j9_sanity.functional_aarch64_linux_Personal_testList_0/1/consoleFull 20:10:39 Type=Segmentation error vmState=0x00040000 20:10:42 Jep425Tests_testVirtualThread_1_FAILED

Looking into it.

JasonFengJ9 avatar Dec 08 '25 12:12 JasonFengJ9

jenkins test sanity alinux64 jdk26 depends https://github.com/ibmruntimes/openj9-openjdk-jdk26/pull/2

tajila avatar Dec 09 '25 15:12 tajila

jenkins compile all jdknext depends https://github.com/ibmruntimes/openj9-openjdk-jdk/pull/1143

pshipton avatar Dec 09 '25 21:12 pshipton

It seems the testing is taking too long to run because there are a number of tests timing out, so there is something else wrong.

pshipton avatar Dec 09 '25 23:12 pshipton

The failure seems related to the VT state: https://github.com/eclipse-openj9/openj9/blob/af93ef3fc8d4782ecbca1de9f4cf414ab324bf1e/test/functional/Java21andUp/src/org/openj9/test/jep425/VirtualThreadTests.java#L146

Exception in thread "main" java.lang.AssertionError: expected [WAITING] but found [RUNNABLE]
	at org.testng.Assert.fail(Assert.java:96)

The test expects current VT in WAITING state after https://github.com/eclipse-openj9/openj9/blob/af93ef3fc8d4782ecbca1de9f4cf414ab324bf1e/test/functional/Java21andUp/src/org/openj9/test/jep425/VirtualThreadTests.java#L137 However it is RUNNABLE even after https://github.com/eclipse-openj9/openj9/blob/af93ef3fc8d4782ecbca1de9f4cf414ab324bf1e/test/functional/Java21andUp/src/org/openj9/test/jep425/VirtualThreadTests.java#L145

@babsingh any insight what could prevent VT entering WAITING state?

JasonFengJ9 avatar Dec 10 '25 21:12 JasonFengJ9

any insight what could prevent VT entering WAITING state?

More information is needed. Try the following:

  • Check the VT state in DDR. Confirm whether it successfully mounts and begins executing the run method, eventually reaching LockSupport.park.
  • Test with the RI and compare behaviour. This will help validate whether the issue is in the test itself or specific to our implementation.

babsingh avatar Dec 11 '25 16:12 babsingh

Test with the RI and compare behaviour. This will help validate whether the issue is in the test itself or specific to our implementation.

Verified that OpenJ9 Semeru 25 and RI HotSpot 26 entered WAITING state successfully in this specific testcase test_synchronizedBlockFromVirtualthread(), it doesn't seem a test issue.

Check the VT state in DDR. Confirm whether it successfully mounts and begins executing the run method, eventually reaching LockSupport.park.

Added some System.out.println() around https://github.com/eclipse-openj9/openj9/blob/af93ef3fc8d4782ecbca1de9f4cf414ab324bf1e/test/functional/Java21andUp/src/org/openj9/test/jep425/VirtualThreadTests.java#L137 The println() right before LockSupport.park() was executed, but not the one immediately afterwards. It seems LockSupport.park() was hit correctly. I am adding more logs in hope to identify the VT state changes.

JasonFengJ9 avatar Dec 11 '25 21:12 JasonFengJ9