Details
-
Bug
-
Resolution: Fixed
-
P4
-
11, 12, 13
-
b10
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8227210 | 11.0.12-oracle | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8224208 | 11.0.4 | Yasumasa Suenaga | P4 | Resolved | Fixed | b04 |
Description
I tried to get PerfCounter values via `jhsdb jsnap` from core image which is generated by `gcore` (provided by GDB), but I encountered UnmappedAddressException as below:
```
$ jhsdb jsnap --exe $JAVA_HOME/bin/java --core core.24958
Attaching to core core.24958 from executable /usr/local/jdk-11.0.1/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 11.0.1+13
Exception in thread "main" sun.jvm.hotspot.debugger.UnmappedAddressException: 7f29f5a26007
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.getByte(PageCache.java:84)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readJByte(DebuggerBase.java:261)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.LinuxAddress.getJByteAt(LinuxAddress.java:96)
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicField.getJByte(BasicField.java:119)
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicJByteField.getValue(BasicJByteField.java:48)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.PerfDataPrologue.accessible(PerfDataPrologue.java:84)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JSnap.run(JSnap.java:49)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JSnap.main(JSnap.java:87)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSNAP(SALauncher.java:397)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:465)
```
It is caused by `generate-core-file` on GDB regards `coredump_filter` on procfs.
https://sourceware.org/gdb/onlinedocs/gdb/Core-File-Generation.html
JDK-8200613 introduced `DumpPrivateMappingsInCore` for CDS. I want to introduce `DumpSharedMappingsInCore` for shared memory mapping.
```
$ jhsdb jsnap --exe $JAVA_HOME/bin/java --core core.24958
Attaching to core core.24958 from executable /usr/local/jdk-11.0.1/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 11.0.1+13
Exception in thread "main" sun.jvm.hotspot.debugger.UnmappedAddressException: 7f29f5a26007
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.PageCache.getByte(PageCache.java:84)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.DebuggerBase.readJByte(DebuggerBase.java:261)
at jdk.hotspot.agent/sun.jvm.hotspot.debugger.linux.LinuxAddress.getJByteAt(LinuxAddress.java:96)
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicField.getJByte(BasicField.java:119)
at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicJByteField.getValue(BasicJByteField.java:48)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.PerfDataPrologue.accessible(PerfDataPrologue.java:84)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JSnap.run(JSnap.java:49)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JSnap.main(JSnap.java:87)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSNAP(SALauncher.java:397)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:465)
```
It is caused by `generate-core-file` on GDB regards `coredump_filter` on procfs.
https://sourceware.org/gdb/onlinedocs/gdb/Core-File-Generation.html
Attachments
Issue Links
- backported by
-
JDK-8224208 SA: jhsdb jsnap throws UnmappedAddressException with core generated by gcore
- Resolved
-
JDK-8227210 SA: jhsdb jsnap throws UnmappedAddressException with core generated by gcore
- Resolved
- relates to
-
JDK-8219574 Minimal VM build failure after JDK-8219414
- Resolved