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

Failing JTReg: test/jdk/java/lang/ref/NullQueue.java #7251

Closed
M-Davies opened this issue Sep 26, 2019 · 8 comments
Closed

Failing JTReg: test/jdk/java/lang/ref/NullQueue.java #7251

M-Davies opened this issue Sep 26, 2019 · 8 comments

Comments

@M-Davies
Copy link

Failure link

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/502ab02dbda2e8b021cffedc3f52e25246cdeec1/test/jdk/java/lang/ref/NullQueue.java#L1 fails for JDK8/11-openj9 (test can't be found for JDK13 and hotspot is unaffected)

  • test category, openjdk
  • OS/architecture, openjdk_x86-64_linux, openjdk_x86-64_windows
16:30:13  openjdk version "11.0.5" 2019-10-15
16:30:13  OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+8-201909260313)
16:30:13  Eclipse OpenJ9 VM AdoptOpenJDK (build master-61255304e, JRE 11 Linux amd64-64-Bit Compressed References 20190926_340 (JIT enabled, AOT enabled)
16:30:13  OpenJ9   - 61255304e
16:30:13  OMR      - c30a4776
16:30:13  JCL      - 502ab02dbd based on jdk-11.0.5+8)

Optional info

Current Thread: GC Slave
Current Thread: Concurrent Mark Helper
Current Thread: IProfiler
Current Thread: JIT-SamplerThread
Current Thread: JIT Diagnostic Compilation Thread-7 Suspended
Current Thread: JIT Compilation Thread-6 Suspended
Current Thread: JIT Compilation Thread-5 Suspended
Current Thread: JIT Compilation Thread-4 Suspended
Current Thread: JIT Compilation Thread-3 Suspended
Current Thread: JIT Compilation Thread-2 Suspended
Current Thread: JIT Compilation Thread-1 Suspended
Current Thread: JIT Compilation Thread-0
Current Thread: Attach API wait loop
Current Thread: main
Current Thread: MainThread
Current Thread: Common-Cleaner

Failure output (captured from console output)

16:33:44  STDERR:
16:33:44  java.lang.Exception: Couldn't find Reference-handler thread
16:33:44  	at NullQueue.main(NullQueue.java:64)
16:33:44  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:33:44  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
16:33:44  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
16:33:44  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
16:33:44  	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
16:33:44  	at java.base/java.lang.Thread.run(Thread.java:831)

Rerun test: https://ci.adoptopenjdk.net/job/Grinder/parambuild/?JDK_VERSION=11&JDK_IMPL=openj9&BUILD_LIST=openjdk&JenkinsFile=openjdk_x86-64_linux&CUSTOM_TARGET=test/jdk/java/lang/ref/NullQueue.java&TARGET=jdk_custom_0

openjdk_test_output (1).tar.gz

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

Likely Hotspot specific.

@M-Davies
Copy link
Author

Thanks for replying to this @pshipton! Just to dot the I's and cross the T's, how did you come to this conclusion?

@M-Davies
Copy link
Author

FYI, /test/jdk/java/lang/ref/OOMEInReferenceHandler.java fails in the same way.

09:47:34  STDERR:
09:47:34  java.lang.IllegalStateException: Couldn't find Reference Handler thread.
09:47:34  	at OOMEInReferenceHandler.main(OOMEInReferenceHandler.java:78)
09:47:34  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
09:47:34  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
09:47:34  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
09:47:34  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
09:47:34  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
09:47:34  	at java.base/java.lang.Thread.run(Thread.java:831)

@pshipton
Copy link
Member

OpenJ9 is an independent implementation. It seems the "Reference Handler" thread is related to the Hotspot implementation of java.lang.ref.Reference, and OpenJ9 has it's own implementation that doesn't use a thread with this name.

@M-Davies
Copy link
Author

M-Davies commented Sep 30, 2019

Since the test is looking for a specific thread and to avoid making the code specific to one implementation, I will perm exclude this and OOMEInReferenceHandler.java from openj9 testing.

@M-Davies
Copy link
Author

https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/b44d19c4cbca42541aef5132f21870c1b924a68c/test/jdk/java/lang/ref/ReachabilityFenceTest.java#L1 is also using the hotspot implementation. Will perm exclude this too

10:00:25  STDERR:
10:00:25  java.lang.IllegalStateException: The object had been finalized without a fence, even though we don't expect it.
10:00:25  	at ReachabilityFenceTest.main(ReachabilityFenceTest.java:83)
10:00:25  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:00:25  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
10:00:25  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:00:25  	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
10:00:25  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
10:00:25  	at java.base/java.lang.Thread.run(Thread.java:831)

@pshipton
Copy link
Member

@M-Davies how do we know ReachabilityFenceTest is also Hotspot specific? I can't tell from the stack trace.

@M-Davies
Copy link
Author

It's using a Hotspot implementation of getBoolean() to find a specific variable. It returns false when it cannot find it and throws an error later in the test when an if statement checks if it exists

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