Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass Code Blocks Requiring VM Access for the JIT Server #20901

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

luke-li-2003
Copy link
Contributor

Bypass the code that requires a VM read in constraintRecognizedMethod() under JITServer mode, to prevent an invalid class pointer being sent to the client and crashing the client.

Bypass the code that requires a VM read in constraintRecognizedMethod()
under JITServer mode, to prevent an invalid class pointer being
sent to the client and crashing the client.

Signed-off-by: Luke Li <[email protected]>
@luke-li-2003
Copy link
Contributor Author

Addresses #20800

@luke-li-2003
Copy link
Contributor Author

@mpirvu

Copy link
Contributor

@mpirvu mpirvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
In the future we may be able to do more.
J9VMJAVALANGINVOKEMETHODHANDLE checks a particular entry in J9JavaVM->jclConstantPool[]. The entry is supposed to be a j9class. If the entry is 0, the code resolves the class and populates the field. Once the entry is populated it keeps the same value.
A possible enhancement is: create a new frontend query. At the server, if the desired entry (cached) is NULL, send a message to the client and cache the received j9class pointer.

@mpirvu
Copy link
Contributor

mpirvu commented Jan 9, 2025

jenkins test sanity,sanity.system plinuxjit,xlinuxjit,zlinuxjit,alinux64jit jdk8,jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 10, 2025

jenkins test sanity.system plinuxjit jdk8

@mpirvu
Copy link
Contributor

mpirvu commented Jan 10, 2025

zlinux has one failure:

22:13:19  ===============================================
22:13:19  Running test JLM_Tests_class_SE80_1 ...
22:13:19  ===============================================
22:13:19  JLM_Tests_class_SE80_1 Start Time: Thu Jan  9 22:13:19 2025 Epoch Time (ms): 1736478799480
22:13:19  variation: -XX:+HeapManagementMXBeanCompatibility
22:13:19  JVM_OPTIONS: -XX:+UseJITServer -XX:+HeapManagementMXBeanCompatibility 
...
22:13:22  PASSED: testGetClassName
22:13:22  PASSED: testGetIdentityHashCode
22:13:22  PASSED: testLockInfo
22:13:22  PASSED: testToString
22:13:22  PASSED: testClassLoadingBeanRegisteredWithServer
22:13:22  PASSED: testClassLoadingMXBeanProxy
22:13:22  PASSED: testCompilationBeanRegisteredWithServer
22:13:22  PASSED: testCompilationMXBeanProxy
22:13:22  PASSED: testExtMemoryMXBeanProxyNotificationEmitter
22:13:22  PASSED: testExtMemoryMXBeanProxyNotificationEmitterRemoveListeners
22:13:22  PASSED: testExtOperatingSystemMXBeanProxyDoesRemoveListeners
22:13:22  PASSED: testExtOperatingSystemMXBeanProxyEmitsNotifications
22:13:22  PASSED: testExtOperatingSystemMXBeanProxyIsNotificationEmitter
22:13:22  PASSED: testFailingMemoryManagerMXBeanProxy
22:13:22  PASSED: testGarbageCollectorMXBeanProxy
22:13:22  PASSED: testGarbageCollectorMXBeanProxyWithMemoryManagerMXBeanInterface
22:13:22  PASSED: testGetAllPlatformMXBeanInterfacesExtensionInterfaces
22:13:22  PASSED: testGetAllPlatformMXBeanInterfacesStandardInterfaces
22:13:22  PASSED: testGetClassLoadingMXBean
22:13:22  PASSED: testGetCompilationMXBean
22:13:22  PASSED: testGetGarbageCollectorMXBeans
22:13:22  PASSED: testGetMemoryMXBean
22:13:22  PASSED: testGetMemoryManagerMXBeans
22:13:22  PASSED: testGetMemoryPoolMXBeans
22:13:22  PASSED: testGetOperatingSystemMXBean
22:13:22  PASSED: testGetPlatformMBeanServer
22:13:22  PASSED: testGetPlatformMXBeans
22:13:22  PASSED: testGetRuntimeMXBean
22:13:22  PASSED: testGetThreadMXBean
22:13:22  PASSED: testMemoryBeanRegisteredWithServer
22:13:22  PASSED: testMemoryMXBeanProxy
22:13:22  PASSED: testMemoryMXBeanProxyNotificationEmitter
22:13:22  PASSED: testMemoryMXBeanProxyNotificationEmitterGetInfo
22:13:22  PASSED: testMemoryMXBeanProxyNotificationEmitterRemoveListeners
22:13:22  PASSED: testMemoryManagerMXBeanProxy
22:13:22  PASSED: testMemoryPoolMXBeanProxy
22:13:22  PASSED: testOperatingSystemBeanRegisteredWithServer
22:13:22  PASSED: testOperatingSystemMXBeanProxy
22:13:22  PASSED: testRuntimeBeanRegisteredWithServer
22:13:22  PASSED: testRuntimeMXBeanProxy
22:13:22  PASSED: testThreadBeanRegisteredWithServer
22:13:22  PASSED: testManagementPermissionString
22:13:22  PASSED: testManagementPermissionStringString
22:13:22  PASSED: testFrom
22:13:22  PASSED: testGetCount
22:13:22  PASSED: testGetMemoryUsage
22:13:22  PASSED: testGetPoolName
22:13:22  PASSED: testConstructionFailsForBadInputs
22:13:22  PASSED: testFrom
22:13:22  PASSED: testFromWithBadInput
22:13:22  PASSED: testGetCommitted
22:13:22  PASSED: testGetInit
22:13:22  PASSED: testGetMax
22:13:22  PASSED: testGetUsed
22:13:22  PASSED: testToString
22:13:22  PASSED: testFrom
22:13:22  PASSED: testFrom_WithBadData
22:13:22  PASSED: testFrom_WithCDContainingNullStackFrame
22:13:22  PASSED: testFrom_WithNullData
22:13:22  PASSED: testGetClassName
22:13:22  PASSED: testGetIdentityHashCode
22:13:22  PASSED: testGetLockedStackDepth
22:13:22  PASSED: testGetLockedStackFrame
22:13:22  PASSED: testMonitorInfo
22:13:22  PASSED: testToString
22:13:22  FAILED: testThreadMXBeanProxy
22:13:22  java.lang.AssertionError: expected:<"main" Id=1 RUNNABLE
22:13:22  > but was:<"main" Id=1 RUNNABLE
22:13:22  >
22:13:22  	at org.testng.AssertJUnit.fail(AssertJUnit.java:59)
22:13:22  	at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364)
22:13:22  	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80)
22:13:22  	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:88)
22:13:22  	at org.openj9.test.java.lang.management.TestManagementFactory.testThreadMXBeanProxy(TestManagementFactory.java:1335)
22:13:22  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
22:13:22  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
22:13:22  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
22:13:22  	at java.lang.reflect.Method.invoke(Method.java:503)
22:13:22  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
22:13:22  	at org.testng.internal.Invoker.invokeMethod(Invoker.java:580)
22:13:22  	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
22:13:22  	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
22:13:22  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
22:13:22  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
22:13:22  	at org.testng.TestRunner.privateRun(TestRunner.java:648)
22:13:22  	at org.testng.TestRunner.run(TestRunner.java:505)
22:13:22  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
22:13:22  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
22:13:22  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
22:13:22  	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
22:13:22  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
22:13:22  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
22:13:22  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
22:13:22  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
22:13:22  	at org.testng.TestNG.runSuites(TestNG.java:1049)
22:13:22  	at org.testng.TestNG.run(TestNG.java:1017)
22:13:22  	at org.testng.TestNG.privateMain(TestNG.java:1354)
22:13:22  	at org.testng.TestNG.main(TestNG.java:1323)

@mpirvu
Copy link
Contributor

mpirvu commented Jan 10, 2025

plinux had an infra failure:

22:35:43  ERROR: Error cloning remote repo 'origin'
22:35:43  hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- https://github.com/adoptium/aqa-tests.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
22:35:43  stdout: 
22:35:43  stderr: fatal: unable to access 'https://github.com/adoptium/aqa-tests.git/': Could not resolve host: github.com

@mpirvu
Copy link
Contributor

mpirvu commented Jan 10, 2025

Since the crashes that were previously seen have disappeared, this PR is ready to be merged.

@mpirvu mpirvu self-assigned this Jan 10, 2025
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Jan 10, 2025
@mpirvu mpirvu merged commit e851174 into eclipse-openj9:master Jan 10, 2025
32 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jitserver Artifacts related to JIT-as-a-Service project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants