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

Illegal instruction exception on JDK 12 due to incorrect CPU feature bits

XMLWordPrintable

    • b24
    • 12
    • b33
    • x86

        The VNNI optimizations patch (JDK-8214751) inadvertently sets the VPCLMULQDQ cpu feature bit even on platforms where VPCLMULQDQ is not available.
        When the java.util.zip CRC32 update intrinsics kick in, it then uses the VPCLMULQDQ instruction which results in illegal instruction exception as below:
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGILL (0x4) at pc=0x00007f1324b7b9bc, pid=81841, tid=81842
        #
        # JRE version: OpenJDK Runtime Environment (12.0+32) (build 12+32)
        # Java VM: OpenJDK 64-Bit Server VM (12+32, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # v ~StubRoutines::updateBytesCRC32
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        #

        The following line in vm_version_x86.hpp is the cause :
        #define CPU_VNNI ((uint64_t)UCONST64(0x16000000000)) 
        The above mask ends up setting three bits instead of a single bit, one of which happens to be the VPCLMULQDQ bit.

              sviswanathan Sandhya Viswanathan
              sviswanathan Sandhya Viswanathan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: