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

Use of Solaris/SPARC M7 libadimalloc.so can generate unknown signal in hs_err file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Environment:

      Solaris/SPARC M7 platform running 11.3 or later.

    • Subcomponent:
    • Resolved In Build:
      b96
    • CPU:
      sparc_64
    • OS:
      solaris_11

      Backports

        Description

        If the libadimalloc.so Solaris/SPARC M7 library is preloaded and a malloc'ed buffer is used after it is freed the libadmalloc.so library will generate a SIGSEGV with an unknown si_code. The libadimalloc.so library can generate three new si_codes that are currently not recognized:

        3 - "SEGV_ACCADI" "ADI not enabled for mapped object."
        4 - "SEGV_ACCDERR" "ADI disrupting exception."
        5 - "SEGV_ACCPERR" "ADI precise exception."

        These error codes need to be recognized by the JVM signal handling code and appropriate descriptions need to be printed in the hs_err file when these new si_codes are encountered.

          Activity

          Hide
          gthornbr Gerald Thornbrugh added a comment -
          The defines for the new libadimalloc.so library signals need to be added to src/os/posix/vm/os_posix.cpp. The will look something like this:

          #if defined(__sparc) && defined(SOLARIS)
           // define Solaris Sparc M7 ADI SEGV signals
           #if !defined(SEGV_ACCADI)
           #define SEGV_ACCADI 3
           #endif
               { SIGSEGV, SEGV_ACCADI, "SEGV_ACCADI", "ADI not enabled for mapped object." },
           #if !defined(SEGV_ACCDERR)
           #define SEGV_ACCDERR 4
           #endif
               { SIGSEGV, SEGV_ACCDERR, "SEGV_ACCDERR", "ADI disrupting exception." },
           #if !defined(SEGV_ACCPERR)
           #define SEGV_ACCPERR 5
           #endif
               { SIGSEGV, SEGV_ACCPERR, "SEGV_ACCPERR", "ADI precise exception." },
           #endif
          Show
          gthornbr Gerald Thornbrugh added a comment - The defines for the new libadimalloc.so library signals need to be added to src/os/posix/vm/os_posix.cpp. The will look something like this: #if defined(__sparc) && defined(SOLARIS)  // define Solaris Sparc M7 ADI SEGV signals  #if !defined(SEGV_ACCADI)  #define SEGV_ACCADI 3  #endif      { SIGSEGV, SEGV_ACCADI, "SEGV_ACCADI", "ADI not enabled for mapped object." },  #if !defined(SEGV_ACCDERR)  #define SEGV_ACCDERR 4  #endif      { SIGSEGV, SEGV_ACCDERR, "SEGV_ACCDERR", "ADI disrupting exception." },  #if !defined(SEGV_ACCPERR)  #define SEGV_ACCPERR 5  #endif      { SIGSEGV, SEGV_ACCPERR, "SEGV_ACCPERR", "ADI precise exception." },  #endif
          Hide
          gthornbr Gerald Thornbrugh added a comment -
          A jtreg test will need to be added to do the following:

          Preload the libadimalloc.so library if it exists. If the library does not exists the test passes.

          Start a Java/JNI program to cause a libadimalloc.so SIGSEGV to be generated.

          Verify that the Java/JNI program caused a core.

          Search the hs_err file to verify that the correct SIGSEGV and si_code caused the core.

          If the correct si_code was found, pass the test. If anything else occurred during the test, fail the test.
          Show
          gthornbr Gerald Thornbrugh added a comment - A jtreg test will need to be added to do the following: Preload the libadimalloc.so library if it exists. If the library does not exists the test passes. Start a Java/JNI program to cause a libadimalloc.so SIGSEGV to be generated. Verify that the Java/JNI program caused a core. Search the hs_err file to verify that the correct SIGSEGV and si_code caused the core. If the correct si_code was found, pass the test. If anything else occurred during the test, fail the test.
          Hide
          gthornbr Gerald Thornbrugh added a comment -
          hs_err SIGSEGV information before fix:

          # SIGSEGV (0xb) at pc=0xfffffffec2500b14, pid=17478, tid=2
          siginfo: si_signo: 11 (SIGSEGV), si_code: 5 (unknown), si_addr: 0xfffffffec5231208
          SIGSEGV: [libjvm.so+0x1079398], sa_mask[0]=11111111011111111111110111111111, sa_flags=SA_RESTART|SA_SIGINFO

          hs_err SIGSEGV information after fix:

          # SIGSEGV (0xb) at pc=0xfffffffe64800b14, pid=17486, tid=0x0000000000000002
          siginfo: si_signo: 11 (SIGSEGV), si_code: 5 (SEGV_ACCPERR), si_addr: 0xfffffffe6b712388
          SIGSEGV: [libjvm.so+0x10d98c0], sa_mask[0]=11111111011111111111110111111111, sa_flags=SA_RESTART|SA_SIGINFO
          Show
          gthornbr Gerald Thornbrugh added a comment - hs_err SIGSEGV information before fix: # SIGSEGV (0xb) at pc=0xfffffffec2500b14, pid=17478, tid=2 siginfo: si_signo: 11 (SIGSEGV), si_code: 5 (unknown), si_addr: 0xfffffffec5231208 SIGSEGV: [libjvm.so+0x1079398], sa_mask[0]=11111111011111111111110111111111, sa_flags=SA_RESTART|SA_SIGINFO hs_err SIGSEGV information after fix: # SIGSEGV (0xb) at pc=0xfffffffe64800b14, pid=17486, tid=0x0000000000000002 siginfo: si_signo: 11 (SIGSEGV), si_code: 5 (SEGV_ACCPERR), si_addr: 0xfffffffe6b712388 SIGSEGV: [libjvm.so+0x10d98c0], sa_mask[0]=11111111011111111111110111111111, sa_flags=SA_RESTART|SA_SIGINFO
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/eb0e2e67755b
          User: dcubed
          Date: 2015-11-19 00:14:14 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/eb0e2e67755b User: dcubed Date: 2015-11-19 00:14:14 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/eb0e2e67755b
          User: lana
          Date: 2015-12-10 00:26:59 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/eb0e2e67755b User: lana Date: 2015-12-10 00:26:59 +0000

            People

            • Assignee:
              gthornbr Gerald Thornbrugh
              Reporter:
              gthornbr Gerald Thornbrugh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: