Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10193

QueryPdxDataDUnitTest accesses Unsafe field that does not exist on JDK 17

    XMLWordPrintableJSON

Details

    Description

      The QueryPdxDataDUnitTest class setup method uses the net.openhft.compiler library's CachedCompiler to dynamically build several java classes in child VMs. The CacheCompiler class's static initializer attempts to access the override field of the system's Unsafe instance. On JDK 17, the attempt throws NoSuchFieldException.

      Stack trace:

      org.apache.geode.test.dunit.RMIException: While invoking org.apache.geode.management.QueryPdxDataDUnitTest$$Lambda$489/0x00000008010cd4b8.run in VM 3 running on Host heavy-lifter-03dd4ef3-5b5a-50e9-a355-9c3a43ac89c7.c.apachegeode-ci.internal with 4 VMs
      	at org.apache.geode.test.dunit.VM.executeMethodOnObject(VM.java:631)
      	at org.apache.geode.test.dunit.VM.invoke(VM.java:448)
      	at org.apache.geode.test.junit.rules.VMProvider.invoke(VMProvider.java:96)
      	at org.apache.geode.management.QueryPdxDataDUnitTest.beforeClass(QueryPdxDataDUnitTest.java:81)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:568)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
      	at org.apache.geode.test.dunit.rules.ClusterStartupRule$1.evaluate(ClusterStartupRule.java:139)
      	at org.apache.geode.test.junit.rules.DescribedExternalResource$1.evaluate(DescribedExternalResource.java:40)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42)
      	at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
      	at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
      	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
      	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
      	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
      	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
      	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
      	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:568)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
      	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
      	at jdk.proxy1.$Proxy2.stop(Unknown Source)
      	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:568)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
      	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
      	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
      	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
      	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
      	at java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.AssertionError: java.lang.NoSuchFieldException: override
      	at net.openhft.compiler.CompilerUtils.<clinit>(CompilerUtils.java:64)
      	at org.apache.geode.management.QueryPdxDataDUnitTest.buildClass(QueryPdxDataDUnitTest.java:108)
      	at org.apache.geode.management.QueryPdxDataDUnitTest.lambda$beforeClass$bb17a952$1(QueryPdxDataDUnitTest.java:86)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:568)
      	at org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
      	at org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:568)
      	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
      	at sun.rmi.transport.Transport$1.run(Transport.java:200)
      	at sun.rmi.transport.Transport$1.run(Transport.java:197)
      	at java.security.AccessController.doPrivileged(AccessController.java:712)
      	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
      	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
      	at java.security.AccessController.doPrivileged(AccessController.java:399)
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	... 1 more
      Caused by: java.lang.NoSuchFieldException: override
      	at java.lang.Class.getDeclaredField(Class.java:2610)
      	at net.openhft.compiler.CompilerUtils.<clinit>(CompilerUtils.java:60)
      	... 25 more
      

      Attachments

        Issue Links

          Activity

            People

              demery Dale Emery
              demery Dale Emery
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: