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/Enum/ConstantDirectoryOptimalCapacity.java #6660

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

Comments

@M-Davies
Copy link

M-Davies commented Aug 2, 2019

Failure link

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/b44d19c4cbca42541aef5132f21870c1b924a68c/test/jdk/java/lang/Enum/ConstantDirectoryOptimalCapacity.java

Consistent Failure on JDK11-openj9 for x86_linux, windows and osx (test passes on hotspot). Failure is due to a NoSuchFieldException when searching for a fieldname within a class

Optional info

Test fails in https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/openj9/test/jdk/lib/testlibrary/jdk/testlibrary/OptimalCapacity.java#L130 after the field is returned as null.

When looking up fieldname using lookupCachedField, the response is null. Perhaps enumConstantDirectory is not in the ReflectCache at the time of execution? Potentially unsuitable for OpenJ9?

Failure output

ConstantDirectoryOptimalCapacity
16:08:21  STDERR:
16:08:21  java.lang.RuntimeException: java.lang.NoSuchFieldException: enumConstantDirectory
16:08:21  	at jdk.testlibrary.OptimalCapacity.ofHashMap(OptimalCapacity.java:158)
16:08:21  	at ConstantDirectoryOptimalCapacity.test(ConstantDirectoryOptimalCapacity.java:72)
16:08:21  	at ConstantDirectoryOptimalCapacity.main(ConstantDirectoryOptimalCapacity.java:40)
16:08:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:08:21  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:08:21  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:08:21  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:08:21  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
16:08:21  	at java.base/java.lang.Thread.run(Thread.java:831)
16:08:21  Caused by: java.lang.NoSuchFieldException: enumConstantDirectory
16:08:21  	at java.base/java.lang.Class.getDeclaredField(Class.java:896)
16:08:21  	at jdk.testlibrary.OptimalCapacity.ofHashMap(OptimalCapacity.java:130)
16:08:21  	... 8 more
16:08:21  
16:08:21  JavaTest Message: Test threw exception: java.lang.RuntimeException
16:08:21  JavaTest Message: shutting down test
16:08:21  
16:08:21  
16:08:21  TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: java.lang.NoSuchFieldException: enumConstantDirectory
@M-Davies M-Davies changed the title JTReg Test Failure: JTReg Test Failure: java/lang/Enum/ConstantDirectoryOptimalCapacity.java Aug 2, 2019
@M-Davies
Copy link
Author

M-Davies commented Aug 2, 2019

^^ added test title

@M-Davies
Copy link
Author

Potentially unsuitable for OpenJ9?

@pdbain-ibm would you agree?

@pshipton pshipton added this to To do in JTReg failures via automation Aug 22, 2019
@pshipton
Copy link
Member

OpenJ9 doesn't have a field called enumConstantDirectory, the implementation is different.

@M-Davies
Copy link
Author

That was my thought too. I could only find reference to a Map property of Class.java
https://github.com/eclipse/openj9/blob/af939eef6337d1c420bf558735f67939ccb87854/jcl/src/java.base/share/classes/java/lang/Class.java#L3087

@M-Davies
Copy link
Author

M-Davies commented Sep 20, 2019

@pshipton https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/8bf2a8166185765e9c6ddbffb66d1adbee67fd16/test/jdk/java/lang/invoke/VarHandle/AccessMode/OptimalMapSize.java#L1 fails with a similar error. Will perm exclude this one too

09:38:06  STDERR:
09:38:06  java.lang.RuntimeException: java.lang.NoSuchFieldException: methodNameToAccessMode
09:38:06  	at jdk.test.lib.util.OptimalCapacity.ofHashMap(OptimalCapacity.java:158)
09:38:06  	at jdk.test.lib.util.OptimalCapacity.ofHashMap(OptimalCapacity.java:105)
09:38:06  	at OptimalMapSize.main(OptimalMapSize.java:41)
09:38:06  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:38:06  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
09:38:06  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
09:38:06  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
09:38:06  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
09:38:06  	at java.base/java.lang.Thread.run(Thread.java:831)

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

2 participants