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 Failure: java/lang/ref/CleanerTest.java #7205

Closed
M-Davies opened this issue Sep 24, 2019 · 5 comments
Closed

JTReg Failure: java/lang/ref/CleanerTest.java #7205

M-Davies opened this issue Sep 24, 2019 · 5 comments

Comments

@M-Davies
Copy link

M-Davies commented Sep 24, 2019

Failure link

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/502ab02dbda2e8b021cffedc3f52e25246cdeec1/test/jdk/java/lang/ref/CleanerTest.java#L1 fails for JDK11-openj9.

  • test category, openjdk
  • OS/architecture, x86_windows/linux/mac
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+7-201909161809)
Eclipse OpenJ9 VM AdoptOpenJDK (build master-c4d0e5132, JRE 11 Linux amd64-64-Bit Compressed References 20190916_334 (JIT enabled, AOT enabled)
OpenJ9   - c4d0e5132
OMR      - 265676ac
JCL      - 2d77cb2d93 based on jdk-11.0.5+7)

Optional info

Failure output (captured from console output)

An error occurred while instantiating class CleanerTest: sun/hotspot/WhiteBox.registerNatives()V
	at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:394)
	at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
	at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:118)
	at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
	at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
	at org.testng.TestRunner.initMethods(TestRunner.java:415)
	at org.testng.TestRunner.init(TestRunner.java:241)
	at org.testng.TestRunner.init(TestRunner.java:211)
	at org.testng.TestRunner.<init>(TestRunner.java:158)
	at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:546)
	at org.testng.SuiteRunner.init(SuiteRunner.java:159)
	at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
	at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
	at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
	at org.testng.TestNG.run(TestNG.java:1018)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
	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:831)
Caused by: java.lang.UnsatisfiedLinkError: sun/hotspot/WhiteBox.registerNatives()V
	at sun.hotspot.WhiteBox.<clinit>(WhiteBox.java:66)
	at CleanerTest.<clinit>(CleanerTest.java:76)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
	at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
	... 23 more
@pshipton
Copy link
Member

Seems like a problem with the test setup, that the required native library isn't available.

@M-Davies
Copy link
Author

Fails with the same error in JDK13-openj9. @build sun.hotspot.WhiteBox is declared at compilation. Is there an alternative to sun/hotspot/WhiteBox that openj9 uses?

@pshipton
Copy link
Member

There is no sun/hotspot/WhiteBox equivalent for OpenJ9. If it's a native library built with Hotspot to support testing, that would explain why it doesn't exist for OpenJ9.

@M-Davies
Copy link
Author

M-Davies commented Sep 25, 2019

It seems strange that this test would have been included in openj9 in the first place. Whitebox is indeed a testing API designed for the Hotspot VM so it seems odd that this wasn't flagged up as a permanent exclude earlier.
https://wiki.openjdk.java.net/display/HotSpot/The+WhiteBox+testing+API

No matter. Thanks for the reply @pshipton 👍

@smlambert
Copy link
Contributor

smlambert commented Sep 25, 2019

adoptium/aqa-tests#585 was an original (Very Quick not Scrutinized) pass at permanent excludes... so just to be clear, this test was excluded previously. Now the set in 585 is going through the scrutiny it deserves, now that we have spare bodies to do so.

JTReg failures automation moved this from To do to Done Sep 25, 2019
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