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

[MVT] C2 crashes with SIGSEGV in ValueTypeNode::is_loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • repo-valhalla
    • repo-valhalla
    • hotspot
    • x86
    • linux

      Hotspot has intermittent crash on assigning 2-fields value type into array.
      Rate of crashes: ~25 crashes from 100 executions.
      At the same moment, similar tests with 1-field value class and 8-fields value class did not crash (checked on ~300 executions).
      Example of hs_err file is attached.

      Code:
          public Object bc_value() {
              ValueI2[] values = new ValueI2[SIZE];
              for (int i = 0, k = 0; i < values.length; i++, k += 2) {
                  values[i] = ValueI2.of(k, k + 1);
              }
              return values;
          }

      where ValueI2 is:

      public __ByValue final class ValueI2 {
          public final int re;
          public final int im;

          public ValueI2() {
              this.re = 0;
              this.im = 0;
          }

          public int re() {
              return re;
          }

          public int im() {
              return im;
          }

          public ValueI2 add(ValueI2 v) {
              return of(this.re() + v.re(), this.im() + v.im());
          }

          public ValueI2 mul(ValueI2 v) {
              int tre = this.re();
              int tim = this.im();
              int vre = v.re();
              int vim = v.im();
              return of(tre * vre - tim*vim, tre*vim + vre*tim);
          }

          __ValueFactory public static ValueI2 of(int re, int im) {
              ValueI2 v = __MakeDefault ValueI2();
              v.re = re;
              v.im = im;
              return v;
          }

      How to reproduce:
      1. get benchmarks.jar file (attached) or build it from sources (sources are available at http://cr.openjdk.java.net/~skuksenko/valhalla/benchmarks/src.zip )

      2. execute:
      java -noverify -XX:+EnableMVT -jar benchmarks.jar arrayfill.FillI2.bc_value -f 1

      Note: crash doesn't depend on turning tiered compilation on/off

        1. benchmarks.jar
          3.36 MB
        2. hs_err_pid16143.log
          68 kB
        3. replay_pid16143.log
          132 kB

            thartmann Tobias Hartmann
            skuksenko Sergey Kuksenko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: