JDK-8141445 : Use of Solaris/SPARC M7 libadimalloc.so can generate unknown signal in hs_err file
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_11
  • CPU: sparc_64
  • Submitted: 2015-11-04
  • Updated: 2016-07-21
  • Resolved: 2015-11-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u102Fixed 9 b96Fixed
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.

Comments
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
04-11-2015

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.
04-11-2015

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
04-11-2015