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

C2: masked vector MIN/MAX AVX512: SIGFPE / no valid evex tuple_table entry

XMLWordPrintable

    • b24
    • 18

      I found this with the Template Framework JDK-8344942.

      java --add-modules=jdk.incubator.vector -Xbatch -XX:UseAVX=3 Test.java

      Does not seem to reproduce with AVX2.

      Product: SIGFPE (probably the modulo on line 447 below).
      Debug: assert

      This is the relevant code snippet:

          440 default:
          441 assert(0, "no valid evex tuple_table entry");
          442 break;
          443 }
          444
          445 if (vector_len >= AVX_128bit && vector_len <= AVX_512bit) {
          446 int disp_factor = tuple_table[cur_tuple_type + mod_idx][vector_len];
          447 if ((disp % disp_factor) == 0) {


      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/oracle-work/jdk-fork0/open/src/hotspot/cpu/x86/assembler_x86.cpp:531), pid=2508584, tid=2508598
      # assert(0) failed: no valid evex tuple_table entry
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-LTS-2025-03-11-0926490.emanuel...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-LTS-2025-03-11-0926490.emanuel..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x64e453] Assembler::emit_compressed_disp_byte(int&)+0x163
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /oracle-work/jdk-fork0/build/linux-x64-debug/jdk/bin/core.2508584)
      #
      # An error report file with more information is saved as:
      # /oracle-work/jdk-fork0/build/linux-x64-debug/jdk/bin/hs_err_pid2508584.log
      #
      # Compiler replay data is saved as:
      # /oracle-work/jdk-fork0/build/linux-x64-debug/jdk/bin/replay_pid2508584.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      Aborted (core dumped)

      Current CompileTask:
      C2:11948 2199 b 4 Test::test (31 bytes)

      Stack: [0x0000786e04200000,0x0000786e04300000], sp=0x0000786e042fb4d0, free space=1005k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x64e453] Assembler::emit_compressed_disp_byte(int&)+0x163 (assembler_x86.cpp:531)
      V [libjvm.so+0x64f6fc] Assembler::emit_operand_helper(int, int, int, Address::ScaleFactor, int, RelocationHolder const&, int)+0x21c (assembler_x86.cpp:653)
      V [libjvm.so+0x64fe53] Assembler::emit_operand(XMMRegister, Address, int) [clone .constprop.0]+0x43 (assembler_x86.cpp:1326)
      V [libjvm.so+0x6bad9a] Assembler::evpminsw(XMMRegister, KRegister, XMMRegister, Address, bool, int)+0x1fa (assembler_x86.cpp:12251)
      V [libjvm.so+0x1442f38] MacroAssembler::evpmins(BasicType, XMMRegister, KRegister, XMMRegister, Address, bool, int)+0xb8 (macroAssembler_x86.cpp:9968)
      V [libjvm.so+0x8a5cc3] C2_MacroAssembler::evmasked_op(int, BasicType, KRegister, XMMRegister, XMMRegister, Address, bool, int)+0x283 (c2_MacroAssembler_x86.cpp:4972)
      V [libjvm.so+0x449a78] vminv_mem_maskedNode::emit(C2_MacroAssembler*, PhaseRegAlloc*) const+0x288 (x86.ad:10350)
      V [libjvm.so+0x161b95e] PhaseOutput::scratch_emit_size(Node const*)+0x49e (output.cpp:3385)
      V [libjvm.so+0x1613b22] PhaseOutput::shorten_branches(unsigned int*)+0x382 (output.cpp:539)
      V [libjvm.so+0x1625e36] PhaseOutput::Output()+0xa36 (output.cpp:339)
      V [libjvm.so+0xa7f124] Compile::Code_Gen()+0xa14 (compile.cpp:3081)
      V [libjvm.so+0xa8430f] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1fcf (compile.cpp:891)
      V [libjvm.so+0x8c3d00] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x440 (c2compiler.cpp:141)
      V [libjvm.so+0xa91cec] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xbfc (compileBroker.cpp:2331)
      V [libjvm.so+0xa92c28] CompileBroker::compiler_thread_loop()+0x598 (compileBroker.cpp:1975)
      V [libjvm.so+0xf7eb0f] JavaThread::thread_main_inner()+0x12f (javaThread.cpp:776)
      V [libjvm.so+0x1947b56] Thread::call_run()+0xb6 (thread.cpp:231)
      V [libjvm.so+0x15fa1b8] thread_native_entry(Thread*)+0x128 (os_linux.cpp:877)

        1. hs_err_pid2508584.log
          91 kB
        2. replay_pid2508584.log
          343 kB
        3. Test.java
          0.8 kB

            Unassigned Unassigned
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: