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

JTReg Test Failure: java/lang/invoke/PrivateInvokeTest.java #7071

Closed
M-Davies opened this issue Sep 13, 2019 · 3 comments
Closed

JTReg Test Failure: java/lang/invoke/PrivateInvokeTest.java #7071

M-Davies opened this issue Sep 13, 2019 · 3 comments

Comments

@M-Davies
Copy link

Failure link

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/6716544a3e1aab5520e36418b4378172e358fd2f/test/jdk/java/lang/invoke/PrivateInterfaceCall.java#L1 fails for JDK11 and JDK8 openj9 implementations (hotspot unaffected).

  • test category, openjdk
  • OS/architecture, openjdk_x86-64_linux, openjdk_x86-64_windows
09:46:27  openjdk version "11.0.5" 2019-10-15
09:46:27  OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+6-201909111831)
09:46:27  Eclipse OpenJ9 VM AdoptOpenJDK (build master-d65742671, JRE 11 Linux amd64-64-Bit Compressed References 20190911_331 (JIT enabled, AOT enabled)
09:46:27  OpenJ9   - d65742671
09:46:27  OMR      - 7e9584ea
09:46:27  JCL      - 8057a0754d based on jdk-11.0.5+6)

Optional info

  • intermittent failure (no):
  • New test:
  • Suspected incompatibility with openj9 due to the method name not being found by a static implementation

Failure output (captured from console output)

09:49:01  STDERR:
09:49:01  JavaTest Message: JUnit Failure: testFirst(test.java.lang.invoke.PrivateInvokeTest): java.lang.NoSuchMethodException
09:49:01  java.lang.Error: java.lang.NoSuchMethodException
09:49:01  	at test.java.lang.invoke.PrivateInvokeTest.<clinit>(PrivateInvokeTest.java:145)
09:49:01  	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
09:49:01  	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
09:49:01  	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
09:49:01  	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
09:49:01  	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:187)
09:49:01  	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:236)
09:49:01  	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
09:49:01  	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:233)
09:49:01  	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
09:49:01  	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
09:49:01  	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
09:49:01  	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
09:49:01  	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
09:49:01  	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
09:49:01  	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
09:49:01  	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
09:49:01  	at org.junit.runners.Suite.runChild(Suite.java:128)
09:49:01  	at org.junit.runners.Suite.runChild(Suite.java:24)
09:49:01  	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
09:49:01  	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
09:49:01  	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
09:49:01  	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
09:49:01  	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
09:49:01  	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
09:49:01  	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
09:49:01  	at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
09:49:01  	at org.junit.runner.JUnitCore.run(JUnitCore.java:127)
09:49:01  	at org.junit.runner.JUnitCore.runClasses(JUnitCore.java:76)
09:49:01  	at com.sun.javatest.regtest.agent.JUnitRunner.main(JUnitRunner.java:76)
09:49:01  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:49:01  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
09:49:01  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
09:49:01  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
09:49:01  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
09:49:01  	at java.base/java.lang.Thread.run(Thread.java:831)
09:49:01  Caused by: java.lang.NoSuchMethodException
09:49:01  	at java.base/java.lang.invoke.PrimitiveHandle.finishMethodInitialization(PrimitiveHandle.java:194)
09:49:01  	at java.base/java.lang.invoke.DirectHandle.<init>(DirectHandle.java:51)
09:49:01  	at java.base/java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:644)
09:49:01  	at test.java.lang.invoke.PrivateInvokeTest.<clinit>(PrivateInvokeTest.java:143)
09:49:01  	... 35 more
@pshipton pshipton added this to To do in JTReg failures via automation Sep 13, 2019
@JasonFengJ9
Copy link
Member

This is a RI implementation specific test.

Added following empty method:

	String debugString() {
		return "";
	}

The test hits another java.lang.NoSuchMethodError

Caused by: java.lang.NoSuchMethodError: java/lang/invoke/MethodHandle.linkToSpecial(Ljava/lang/Object;Ljava/lang/invoke/MemberName;)Ljava/lang/Object; (loaded from /team/jars/bootstrap/patch-jdk11-java.base.jar by <Bootstrap Loader>) called from class java.lang.invoke.PrimitiveHandle (loaded from jrt:/java.base by <Bootstrap Loader>).
	at java.base/java.lang.invoke.PrimitiveHandle.finishMethodInitialization(PrimitiveHandle.java:192)
	... 45 more

Added an empty method as following:

	static Object linkToSpecial(Object obj, MemberName mn) {
		return null;
	}

This test still failed JUnit Failure:

JavaTest Message: JUnit Failure: testInvokeDirect(test.java.lang.invoke.PrivateInvokeTest): expected:<hello from <PrivateInvokeTest#1037>> but was:<<PrivateInvokeTest#1037>>
java.lang.AssertionError: expected:<hello from <PrivateInvokeTest#1037>> but was:<<PrivateInvokeTest#1037>>

Apparently it tests RI internal implementation which OpenJ9 doesn't match.
I am going to exclude it.

@JasonFengJ9
Copy link
Member

Aha, it has been excluded a while ago under adoptium/aqa-tests#585.

@M-Davies if you agree, please close this issue.

@M-Davies
Copy link
Author

M-Davies commented Sep 17, 2019

@JasonFengJ9 I'm happy with that. I'll add it to the permanent excludes list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants