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

Add missing VarHandle signature restore for JITServer #8410

Merged

Conversation

harryyu1994
Copy link
Contributor

@harryyu1994 harryyu1994 commented Jan 24, 2020

After creating the resolvedMethod in TR_ResolvedJ9JITServerMethod::getResolvedPossiblyPrivateVirtualMethod,
we forgot to restore the method signature for VarHandle access methods.

Fixes: #8370

Signed-off-by: Harry Yu harryyu1994@gmail.com

After creating the resolvedMethod in TR_ResolvedJ9JITServerMethod::getResolvedPossiblyPrivateVirtualMethod,
we forgot to restore method signatures for VarHandle access methods.

Fixes: eclipse-openj9#8370

Signed-off-by: Harry Yu <harryyu1994@gmail.com>
@mpirvu mpirvu added the comp:jitserver Artifacts related to JIT-as-a-Service project label Jan 27, 2020
@mpirvu mpirvu added this to In progress in JIT as a Service via automation Jan 27, 2020
@mpirvu mpirvu self-assigned this Jan 27, 2020
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.

Good find! I understand now why it was missed in the first place: what we get from the cache is not a resolvedMethod, but the information to create a new resolvedMethod, so after this new resolveMethod is created we still need to adjust its signature.
LGTM

@mpirvu
Copy link
Contributor

mpirvu commented Jan 27, 2020

Jenkins test sanity xlinuxjit jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 27, 2020

Infra failure, so I am going to trigger the test again

@mpirvu
Copy link
Contributor

mpirvu commented Jan 27, 2020

Jenkins test sanity xlinuxjit jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 27, 2020

Another infra failure:

Creating placeholder flownodes because failed loading originals.
java.io.IOException: Tried to load head FlowNodes for execution Owner[Pipeline_Build_Test_JDK11_x86-64_linux_jit/31:Pipeline_Build_Test_JDK11_x86-64_linux_jit #31] but FlowNode was not found in storage for head id:FlowNodeId 1:106
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.initializeStorage(CpsFlowExecution.java:679)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:716)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.getExecution(WorkflowRun.java:665)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onLoad(WorkflowRun.java:529)
	at hudson.model.RunMap.retrieve(RunMap.java:225)
	at hudson.model.RunMap.retrieve(RunMap.java:57)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:501)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:483)
	at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:381)
	at hudson.model.RunMap.getById(RunMap.java:205)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.run(WorkflowRun.java:902)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.get(WorkflowRun.java:913)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:65)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$1.computeNext(FlowExecutionList.java:57)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
	at org.jenkinsci.plugins.workflow.flow.FlowExecutionList$ItemListenerImpl.onLoaded(FlowExecutionList.java:178)
	at jenkins.model.Jenkins.<init>(Jenkins.java:1022)
	at hudson.model.Hudson.<init>(Hudson.java:85)
	at hudson.model.Hudson.<init>(Hudson.java:81)
	at hudson.WebAppMain$3.run(WebAppMain.java:233)

@mpirvu
Copy link
Contributor

mpirvu commented Jan 27, 2020

Jenkins test sanity xlinuxjit jdk11

1 similar comment
@mpirvu
Copy link
Contributor

mpirvu commented Jan 28, 2020

Jenkins test sanity xlinuxjit jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 28, 2020

Yet another infra failure

java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
	at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
	at java.io.ObjectInputStream.<init>(Unknown Source)
	at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
	at hudson.remoting.Command.readFrom(Command.java:140)
	at hudson.remoting.Command.readFrom(Command.java:126)
	at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36)
	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to ub16x64j98
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
		at hudson.remoting.Request.call(Request.java:202)
		at hudson.remoting.Channel.call(Channel.java:956)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
		at sun.reflect.GeneratedMethodAccessor810.invoke(Unknown Source)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
		at java.lang.reflect.Method.invoke(Unknown Source)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
		at com.sun.proxy.$Proxy102.execute(Unknown Source)
		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$$Lambda$318.00000000D000B840.run(Unknown Source)
		at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
		at java.util.concurrent.FutureTask.run(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
		at java.lang.Thread.run(Unknown Source)
Caused: hudson.remoting.RequestAbortedException
	at hudson.remoting.Request.abort(Request.java:340)
	at hudson.remoting.Channel.terminate(Channel.java:1040)
	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:94)
Finished: FAILURE

@mpirvu
Copy link
Contributor

mpirvu commented Jan 28, 2020

Jenkins test sanity plinuxjit jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 29, 2020

Tests on Power Java11 have passed. The one failure is actually a test problem in that the test expects a certain output and the message from JITServer is unexpected for it.

===============================================
Running test cmdLineTester_getPid_0 ...
===============================================
cmdLineTester_getPid_0 Start Time: Tue Jan 28 19:27:04 2020 Epoch Time (ms): 1580257624688
variation: NoOptions
JVM_OPTIONS: -XX:+UseJITServer -Xcompressedrefs 
JITServer is currently a technology preview. Its use is not yet supported
*** Starting test suite: getPid test ***
Testing: Compare RuntimeMXBean.getPid() with getting PID from system
Test start time: 2020/01/28 19:27:05 Eastern Standard Time
Running command: perl /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_ppc64le_linux_jit_Personal/openjdk-tests/TKG/../../jvmtest/functional/cmdLineTests/runtimemxbeanTests/getPidTest.pl "/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_ppc64le_linux_jit_Personal/openjdkbinary/j2sdk-image/bin/java" -XX:+UseJITServer -Xcompressedrefs  -cp /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_ppc64le_linux_jit_Personal/openjdk-tests/TKG/../../jvmtest/functional/cmdLineTests/runtimemxbeanTests/runtimemxbeanTests.jar GetPid
Time spent starting: 61 milliseconds
Time spent executing: 74 milliseconds
Test result: FAILED
Output from test:
 [OUT] FAIL: RuntimeMXBean.getPID() returned JITServer is currently a technology preview. Its use is not yet supported
 [OUT]  instead of 24155
 [ERR] Argument "JITServer is currently a technology preview. Its use is ..." isn't numeric in numeric eq (==) at /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_ppc64le_linux_jit_Personal/openjdk-tests/TKG/../../jvmtest/functional/cmdLineTests/runtimemxbeanTests/getPidTest.pl line 58, <GEN1> line 1.
>> Success condition was not found: [Output match: PASS]
>> Failure condition was found: [Output match: FAIL]

@mpirvu
Copy link
Contributor

mpirvu commented Jan 29, 2020

Jenkins test sanity xlinuxjit jdk11

@mpirvu
Copy link
Contributor

mpirvu commented Jan 29, 2020

On x86 we have two failures: one is cmdLineTester_getPid_0 which we expect to fail as explained above. The second one is J9vmTest_2

+++ j9vm.test.jni.CriticalRegionTest: +++
command: /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_jit_Personal/openjdkbinary/j2sdk-image/bin/java -XX:+UseJITServer -Xcompressedrefs -Xgcpolicy:metronome -Xcompressedrefs  -Xdump -Xms64m -Xmx64m    -classpath /home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_jit_Personal/openjdk-tests/TKG/../../jvmtest/functional/VM_Test/VM_Test.jar:/home/jenkins/workspace/Test_openjdk11_j9_sanity.functional_x86-64_linux_jit_Personal/openjdk-tests/TKG/../TKG/lib/asm-all.jar  j9vm.test.jni.CriticalRegionTest 

JITServer is currently a technology preview. Its use is not yet supported
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Class; incompatible with java.util.concurrent.ConcurrentHashMap$Node
	at java.base/java.util.concurrent.ConcurrentHashMap.tabAt(ConcurrentHashMap.java:760)
	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:938)
	at java.base/java.lang.invoke.ThunkTable.get(MethodHandle.java:1710)
	at java.base/java.lang.invoke.FoldHandle.computeThunks(FoldHandle.java:69)
	at java.base/java.lang.invoke.MethodHandle.<init>(MethodHandle.java:235)
	at java.base/java.lang.invoke.FoldHandle.<init>(FoldHandle.java:33)
	at java.base/java.lang.invoke.FoldNonvoidHandle.<init>(FoldHandle.java:104)
	at java.base/java.lang.invoke.FoldHandle.get(FoldHandle.java:55)
	at java.base/java.lang.invoke.MethodHandles.foldArgumentsCommon(MethodHandles.java:2718)
	at java.base/java.lang.invoke.MethodHandles.foldArguments(MethodHandles.java:2589)
	at java.base/java.lang.invoke.MethodHandle.resolveInvokeDynamic(MethodHandle.java:1120)
	at j9vm.test.jni.CriticalRegionTest.testAcquireAndSleep(CriticalRegionTest.java:756)
	at j9vm.test.jni.CriticalRegionTest.runBlockingTests(CriticalRegionTest.java:733)
	at j9vm.test.jni.CriticalRegionTest.main(CriticalRegionTest.java:191)
no-zero exit value: 1
*** Test FAILED *** (j9vm.test.jni.CriticalRegionTest)

I think we've seen this test fail before.

@mpirvu mpirvu merged commit 8e87741 into eclipse-openj9:master Jan 29, 2020
JIT as a Service automation moved this from In progress to Done Jan 29, 2020
@harryyu1994 harryyu1994 deleted the fixJITServerResolvedMethod branch April 17, 2020 18:09
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
Development

Successfully merging this pull request may close these issues.

NPE when compiling ConcurrentLinkedQueue.offer with JITServer and Java11
2 participants