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

[CRaC] Internal error on old glibc with pre-set GLIBC_TUNABLES and CPUFeatures restriction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • repo-crac
    • repo-crac
    • hotspot
    • None
    • x86
    • linux

      When all of the following conditions are met:
      1. Build on old glibc (without `INCLUDE_CPU_FEATURE_ACTIVE`)
      2. Pre-set GLIBC_TUNABLES (such as `GLIBC_TUNABLES=glibc.pthread.rseq=0` which the fix for JDK-8349071 uses).
      3. Using `-XX:CPUFeatures=generic` or other CPU restriction.

      VM will crash with a message like this:
      ```
      Error occurred during initialization of VM
      internal error: GLIBC_TUNABLES=:glibc.cpu.hwcaps=,-AVX,-FMA,-AVX2,-BMI1,-BMI2,-ERMS,-LZCNT,-SSSE3,-POPCNT,-SSE4_1,-SSE4_2,-AVX512F,-AVX512CD,-AVX512BW,-AVX512DQ,-AVX512VL,-MOVBE,-XSAVE,-OSXSAVE,-HTT failed and HOTSPOT_GLIBC_TUNABLES_REEXEC is set
      ```

      Reproducer (to get old glibc use CentOS 7 or Ubuntu 18.04, for example):
      ```
      export GLIBC_TUNABLES=glibc.pthread.rseq=0
      JAVA_HOME=$PWD/build/linux-x86_64-server-release/jdk
      $JAVA_HOME/bin/java -XX:CPUFeatures=generic -XX:+ShowCPUFeatures -version
      ```

            tpushkin Timofei Pushkin
            tpushkin Timofei Pushkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: