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/ExplicitCastArgumentsTest.java #6856

Closed
M-Davies opened this issue Aug 27, 2019 · 2 comments
Closed

JTReg Test Failure: java/lang/invoke/ExplicitCastArgumentsTest.java #6856

M-Davies opened this issue Aug 27, 2019 · 2 comments

Comments

@M-Davies
Copy link

M-Davies commented Aug 27, 2019

Failure link

OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11-201908171810)
11:43:12  Eclipse OpenJ9 VM AdoptOpenJDK (build master-9d2933acc, JRE 11 Linux amd64-64-Bit Compressed References 20190817_311 (JIT enabled, AOT enabled)
11:43:12  OpenJ9   - 9d2933acc
11:43:12  OMR      - 6e99760b
11:43:12  JCL      - 965d0c0df3 based on jdk-11.0.4+11)

Optional info

Failure output (captured from console output)

STDERR:
11:44:56  java.lang.AssertionError: Unexpected exception was thrown while testing return value conversion: class java.lang.Boolean => boolean; parameter: null
11:44:56  	at ExplicitCastArgumentsTest.testConversion(ExplicitCastArgumentsTest.java:609)
11:44:56  	at ExplicitCastArgumentsTest.testNullRef2Prim(ExplicitCastArgumentsTest.java:124)
11:44:56  	at ExplicitCastArgumentsTest.main(ExplicitCastArgumentsTest.java:71)
11:44:56  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:44:56  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:44:56  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:44:56  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:44:56  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
11:44:56  	at java.base/java.lang.Thread.run(Thread.java:831)
11:44:56  Caused by: java.lang.NullPointerException
11:44:56  	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:521)
11:44:56  	at ExplicitCastArgumentsTest.testConversion(ExplicitCastArgumentsTest.java:563)
11:44:56  	... 8 more
11:44:56  
11:44:56  JavaTest Message: Test threw exception: java.lang.AssertionError
11:44:56  JavaTest Message: shutting down test
11:44:56  
11:44:56  STDOUT:
11:44:56  -Dseed=-8301395383398379035
11:44:56  -DtestLimit=2000
11:44:56  
11:44:56  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Unexpected exception was thrown while testing return value conversion: class java.lang.Boolean => boolean; parameter: null
@pshipton pshipton added this to To do in JTReg failures via automation Sep 6, 2019
@M-Davies
Copy link
Author

2nd fail on testPrim2Ref(). All other tests pass

java.lang.AssertionError: Unexpected exception was thrown while testing return value conversion: boolean => class java.lang.Number; parameter: true
	at ExplicitCastArgumentsTest.testConversion(ExplicitCastArgumentsTest.java:609)
	at ExplicitCastArgumentsTest.testPrim2Ref(ExplicitCastArgumentsTest.java:182)
	at ExplicitCastArgumentsTest.main(ExplicitCastArgumentsTest.java:73)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.invoke.WrongMethodTypeException
	at java.base/java.lang.invoke.ConvertHandle$FilterHelpers.getBoxingReturnFilter(ConvertHandle.java:241)
	at java.base/java.lang.invoke.ConvertHandle$FilterHelpers.getReturnFilter(ConvertHandle.java:154)
	at java.base/java.lang.invoke.MethodHandles.explicitCastArguments(MethodHandles.java:3015)
	at ExplicitCastArgumentsTest.testConversion(ExplicitCastArgumentsTest.java:559)
	... 8 more

@M-Davies
Copy link
Author

The test fails due to a difference in the openj9 implementation of Number and Boolean. NullPointerException when attempting to find the Boolean class and WrongMethodTypeException when trying to convert a Boolean to Number. Since both are calling the same target MethodHandle, this is likely a hotspot specific test, openj9 doesn't utilise the same classes as hotspot and would explain why the method handle can't find a couple of classes.

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

1 participant