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

C2 compilation hits assert(!phase->exceeding_node_budget()) failed: sanity

    XMLWordPrintable

Details

    • x86_64
    • linux_ubuntu

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Arch: x86_64
      OS: Ubuntu 20.04

      Java:
      - openjdk version "11.0.17-internal" 2022-10-18
      - OpenJDK Runtime Environment (fastdebug build 11.0.17-internal+0-adhoc.congli.jdk11u-dev)
      - OpenJDK 64-Bit Server VM (fastdebug build 11.0.17-internal+0-adhoc.congli.jdk11u-dev, mixed mode)

      Release:
      ```
      IMPLEMENTOR="N/A"
      JAVA_VERSION="11.0.17"
      JAVA_VERSION_DATE="2022-10-18"
      LIBC="gnu"
      MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.vm.ci jdk.management jdk.unsupported jdk.internal.vm.compiler jdk.aot jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.ldap jdk.naming.rmi jdk.net jdk.pack jdk.rmic jdk.scripting.nashorn jdk.scripting.nashorn.shell jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom jdk.zipfs"
      OS_ARCH="x86_64"
      OS_NAME="Linux"
      SOURCE=".:git:74daa996b521"
      ```

      Javac: javac 11.0.17-internal


      A DESCRIPTION OF THE PROBLEM :
      This is a JIT compiler bug triggering a assertion failure in the C2 compiler

      # Internal Error (/zdata/congli/hotspot-build-env/jdk11u-dev/src/hotspot/share/opto/loopTransform.cpp:1054), pid=2655048, tid=2655060
      # assert(!phase->exceeding_node_budget()) failed: sanity

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. javac T.java
      2. java -Xmx1G -XX:-BackgroundCompilation -XX:-PrintWarnings --illegal-access=deny T

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      NO crash
      ACTUAL -
      Crashed

      ---------- BEGIN SOURCE ----------
      class T {
        volatile long l;
        boolean w;
        void u() {
          int a = 7,
              b = 13866,
              c = 14,
              d = 6,
              e = 38,
              f = 51536,
              g = 3,
              h = 29222,
              m = 34817,
              n = 140,
              q[] = new int[256];
          float f1 = 81.926F;
          byte y = 4, x[] = new byte[256];
          double d2 = 1.15728;
          short s = 2458;
          long r[] = new long[256];
          while (++a < 158) {
            b ^= (int) l;
            switch (a * 5) {
              case 65:
                g <<= e;
              case 221:
                s += 28056;
              case 285:
                f1 -= d;
              case 265:
                l -= d;
              case 240:
              case 172:
                f1 = l;
              case 140:
              case 188:
                l <<= l;
              case 253:
              case 176:
                e += a;
              case 207:
                e >>= c;
              case 49:
                q[a] = g;
              case 180:
                l = l;
              case 282:
                y >>= f;
              case 41:
                r[a] = h;
              case 306:
                l += a;
              case 317:
                g += d;
              case 299:
                h = b;
              case 137:
                h |= 3;
              case 164:
                x = x;
              case 227:
              case 246:
                d += a;
              case 60:
                break;
              case 277:
                e *= 28234;
              case 2:
                if (w) break;
              case 130:
                w = w;
              case 38:
                break;
              case 24:
                d <<= l;
              case 81:
                b = d;
              case 42:
                a <<= d;
              case 78:
                h <<= 231;
              case 313:
                d += g;
              case 118:
                b /= b;
              case 217:
                e += a;
              case 48:
                d += a;
              case 214:
                h <<= e;
              case 73:
                l += a;
              case 281:
              case 229:
                b += d;
              case 192:
              case 237:
                a <<= g;
              case 85:
                f1 = 26493;
              case 121:
                y += a;
              case 153:
                l += d2;
              case 309:
                q = q;
              case 155:
                h >>= l;
              case 270:
                m = c;
              case 275:
                y = (byte) f1;
              case 57:
                f1 += 2;
              case 144:
                h <<= h;
              case 122:
                m |= 19792;
              case 12:
                m += a;
              case 104:
                r = r;
              case 247:
                e += b;
              case 243:
                break;
              case 260:
                a = (int) l;
              case 319:
                return;
              case 250:
                n += l;
              case 300:
                l = f;
              case 74:
                l += d2;
              case 199:
                l = n;
              case 86:
                n -= l;
              case 75:
                a %= l;
              case 114:
                d <<= n;
              case 105:
                b = (int) l;
              case 179:
              default:
                e += l;
            }
          }
        }
        public static void main(String[] g) {
          T t = new T();
          for (;;) t.u();
        }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: