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

[Linux] Show source information when printing native stack traces in hs_err files

XMLWordPrintable

    • b12
    • linux

      As a follow-up to the implementation for Windows (JDK-8185712) to show source information (filename and line numbers) in the stack trace in the hs_err file of a VM crash, we should also provide this information in hs_err files for Linux. The Windows implementation provided the foundation to add support for other platforms (Decoder::get_source_info()).

      Stack trace from a crash on Windows:
      V [jvm.dll+0x4238fe] nmethodBucket::next_not_unloading+0x7e (dependencycontext.cpp:345)

      vs. same crash on Linux:
      V [libjvm.so+0x8f38d5] nmethodBucket::next_not_unloading()+0x45

      which makes it hard to exactly know which line caused the crash. The line information would improve the analysis of a VM crash.


      More information about the Windows version: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2017-August/024286.html


      A first version supports the following:
      - DWARF version 4 (emitted by GCC by default)
      - 32 and 64-bit Linux builds

      Not (yet) supported:
      - DWARF version 1
      - Partially supported only: DWARF version 2, 3
      - DWARF version 5 (still experimental in GCC 10 while being the default for GCC 11)

      Filed JDK-8287021 to add support for DWARF 5 while the other older versions (1-3) are most likely not gonna be supported in the future as they are too old (DWARF 4 is already 12 years old).

            chagedorn Christian Hagedorn
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: