Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219414

SA: jhsdb jsnap throws UnmappedAddressException with core generated by gcore

    Details

    • Subcomponent:
    • Resolved In Build:
      b10
    • OS:
      linux

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ysuenaga Yasumasa Suenaga
                  Reporter:
                  ysuenaga Yasumasa Suenaga
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: