JDK-8267045 : serviceability/sa/TestJmapCoreMetaspace.java failing after enabling ZGC testing
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 17
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2021-05-12
  • Updated: 2021-06-05
  • Resolved: 2021-06-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17Resolved
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8267047 :  
Description
JDK-8266531 fixed some SA GC issues, and a number of tests were removed from the ZGC problem list as a result. TestJmapCoreMetaspace.java now fails as a result. There appear to be two issues. One is directly ZGC related, but the other appears to be a timeout, likely the same issue as JDK-8265350, but may be a bit more common with ZGC.
Comments
The cause of this failure is that SA does not handle relocated objects. It is fixed in JDK-8266957. JDK-8266957 is now under the review: https://github.com/openjdk/jdk/pull/4057
19-05-2021

I cannot reproduce the problem on my Linux x64, but I saw similar call stack in TestJmapCore.
13-05-2021

java.lang.NullPointerException: Cannot invoke "sun.jvm.hotspot.debugger.Address.asLongValue()" because "this.entry" is null at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZPageTableEntry.relocating(ZPageTableEntry.java:46) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZPageTable.is_relocating(ZPageTable.java:66) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZHeap.is_relocating(ZHeap.java:80) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZBarrier.relocate(ZBarrier.java:45) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZBarrier.relocate_or_remap(ZBarrier.java:71) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZBarrier.weak_load_barrier_on_oop_slow_path(ZBarrier.java:36) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZBarrier.weak_barrier(ZBarrier.java:83) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZCollectedHeap.oop_load_barrier(ZCollectedHeap.java:88) at jdk.hotspot.agent/sun.jvm.hotspot.gc.z.ZCollectedHeap.oop_load_in_native(ZCollectedHeap.java:110) at jdk.hotspot.agent/sun.jvm.hotspot.oops.VMOopHandle.resolve(VMOopHandle.java:60) at jdk.hotspot.agent/sun.jvm.hotspot.oops.Klass.getJavaMirror(Klass.java:114) at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter$5.visit(HeapHprofBinWriter.java:1140) at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderData.classesDo(ClassLoaderData.java:114) at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderDataGraph.classesDo(ClassLoaderDataGraph.java:84) at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeClasses(HeapHprofBinWriter.java:1137) at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:460) at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.writeHeapHprofBin(JMap.java:216) at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.run(JMap.java:103) at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278) at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241) at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134) at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.main(JMap.java:202) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJMAP(SALauncher.java:341) at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:499) java.io.EOFException at java.base/java.io.DataInputStream.readFully(DataInputStream.java:203) at java.base/java.io.DataInputStream.readFully(DataInputStream.java:172) at jdk.test.lib.hprof.parser.HprofReader.read(HprofReader.java:228) at jdk.test.lib.hprof.parser.Reader.readFile(Reader.java:95) at jdk.test.lib.hprof.HprofParser.parse(HprofParser.java:85) at jdk.test.lib.hprof.HprofParser.parse(HprofParser.java:54) at TestJmapCore.test(TestJmapCore.java:106) at TestJmapCore.main(TestJmapCore.java:70) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298) at java.base/java.lang.Thread.run(Thread.java:831) JavaTest Message: Test threw exception: java.io.EOFException JavaTest Message: shutting down test
12-05-2021