SIGSEGV in ConstantPool::print_value_on with -XX:CompileCommand=print

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: hotspot
    • Environment:

      TURIN>cat /etc/issue
       
      Welcome to SUSE Linux Enterprise Server 15 SP7  (x86_64) - Kernel \r (\l).
       

    • x86_64
    • other

      Test Case:
      TURIN>cat test_isnanfp32.java

      import java.util.stream.IntStream;
      import java.util.Arrays;

      public class test_isnanfp32 {
          public static void micro(boolean [] dst, float [] src) {
              for (int i = 0; i < dst.length; i++) {
                  dst[i] = Float.isNaN(src[i]);
              }
          }

          public static void main(String [] args) {
              float [] src = new float[4096];
              boolean [] dst = new boolean[4096];
              IntStream.range(0, src.length).forEach(i -> {
                     if (i % 10 == 0) {
                         src[i] = Float.NaN;
                     } else {
                         src[i] = (float)i;
                     }
                 }
              );

              for (int i = 0; i < 100000; i++) {
                  micro(dst, src);
              }

              long t1 = System.currentTimeMillis();
              for (int i = 0; i < 100000; i++) {
                  micro(dst, src);
              }
              long t2 = System.currentTimeMillis();
              IO.println("[time] " + (t2-t1) + " ms [res] " + Arrays.toString(Arrays.copyOfRange(dst, 0, 16)));
          }
      }


      CommandLine:
      java -XX:-TieredCompilation -XX:CompileCommand=Print,test_isnanfp32::micro -XX:CompileCommand=compileonly,test_isnanfp32::micro -cp . test_isnanfp32

      OS: SUSE Linux Enterprise Server 15 SP7 (x86_64)

      CompileCommand: print test_isnanfp32.micro bool print = true
      CompileCommand: compileonly test_isnanfp32.micro bool compileonly = true

      ============================= C2-compiled nmethod ==============================
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x0000152a2469f4ae, pid=346494, tid=346518
      #
      # JRE version: OpenJDK Runtime Environment (26.0) (slowdebug build 26-internal-adhoc.root.jdk)
      # Java VM: OpenJDK 64-Bit Server VM (slowdebug 26-internal-adhoc.root.jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xa9f4ae] ConstantPool::print_value_on(outputStream*) const+0xf8
      #
      # Core dump will be written. Default location: Determined by the following: "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %d" (alternatively, falling back to /home/javauser/jbhateja/code/java/auto-vec/core.346494)
      #
      # An error report file with more information is saved as:
      # /home/javauser/jbhateja/code/java/auto-vec/hs_err_pid346494.log
      #
      # Compiler replay data is saved as:
      # /home/javauser/jbhateja/code/java/auto-vec/replay_pid346494.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      Aborted (core dumped)

            Assignee:
            Unassigned
            Reporter:
            Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: