JDK-8296914 : serviceability/sa/TestJmapCore.java failed: OOME and UnmappedAddressException
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 20
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2022-11-13
  • Updated: 2022-11-14
  • Resolved: 2022-11-14
Related Reports
Duplicate :  
Description
crashOutputString = [Aborting due to java.lang.OutOfMemoryError: Java heap space
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/debug.cpp:368
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S79676/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6dceb8f9-fe95-49df-9efe-0162c27764e5/runs/3c32f5b9-7b02-4d75-a498-9ad1cc12fd15/workspace/open/src/hotspot/share/utilities/debug.cpp:368), pid=36115, tid=10499
#  fatal error: OutOfMemory encountered: Java heap space
#
# JRE version: Java(TM) SE Runtime Environment (20.0+24) (fastdebug build 20-ea+24-1715)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-ea+24-1715, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Core dump will be written. Default location: core.36115
#
# An error report file with more information is saved as:
# /System/Volumes/Data/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S146528/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/580fc6b8-ddea-453d-adfb-5f8793e2e458/runs/39707c39-49da-466b-b4d3-c8ed94915d73/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_serviceability/scratch/2/hs_err_pid36115.log
]
getCoreFileLocation found stringWithLocation = core.36115
Found core file core.36115, size = 4432mb
[2022-11-11T23:06:07.663430Z] Gathering output for process 36144
Attaching to core core.36115 from executable /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-20+24-1715/macosx-aarch64-debug.jdk/jdk-20/fastdebug/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 20-ea+24-1715

----------System.err:(41/3050)----------
sun.jvm.hotspot.debugger.UnmappedAddressException: 801000800
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.getLong(PageCache.java:100)
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readCInteger(DebuggerBase.java:356)
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:382)
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readAddress(BsdDebuggerLocal.java:421)
	at jdk.hotspot.agent/sun.jvm.hotspot.debugger.bsd.BsdAddress.getAddressAt(BsdAddress.java:73)
	at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:238)
	at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:104)
	at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:77)
	at jdk.hotspot.agent/sun.jvm.hotspot.oops.MetadataField.getValue(MetadataField.java:43)
	at jdk.hotspot.agent/sun.jvm.hotspot.oops.MetadataField.getValue(MetadataField.java:40)
	at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderData.getKlasses(ClassLoaderData.java:82)
	at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderData.classesDo(ClassLoaderData.java:101)
	at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderDataGraph.classesDo(ClassLoaderDataGraph.java:84)
	at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeSymbols(HeapHprofBinWriter.java:1207)
	at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:455)
	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:340)
	at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:500)

java.io.EOFException
	at java.base/java.io.DataInputStream.readInt(DataInputStream.java:386)
	at jdk.test.lib.hprof.parser.Reader.readFile(Reader.java:90)
	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:107)
	at TestJmapCore.main(TestJmapCore.java:70)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:1591)

Not clear which problem occurred first.
Comments
This is a dup of JDK-8270202.
14-11-2022

The OutOfMemory fatal error is intentional in order to produce a core dump. While trying to use the core dump to do a heap dump, the UnmappedAddressException was encountered. That is the real bug here. Since the heap dump failed to complete, while reading the heap dump the test got an EOFException, so that is expected given that the heap dump failed.
14-11-2022