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

C2 Bailout "failed spill-split-recycle sanity check" reveals hidden issue with RA

XMLWordPrintable

      In src/hotspot/share/opto/chaitin.cpp PhaseChaitin::Register_Allocate
      we have the following bailout.

      C->record_method_not_compilable("failed spill-split-recycle sanity check");

      In my testing for JDK-8303951, I added an assert, and it did not fail anywhere but in the test
      test/hotspot/jtreg/compiler/regalloc/TestC2IntPressure.java

      This test was added in JDK-8268858 by [~jzhu].

      But that test is supposed to check that such a bailout does not happen, or at least it checks that we compile some method that used to lead to the bailout.

      Please investigate why this bailout is there, and why we hit it.
      Please add an assert before the bailout, if that is possible. I wanted to add it for JDK-8303951, but because of this issue here, I cannot yet do it.

      I reproduced it like this: add assert before bailout. Then I ran:

      ~/Documents/jtreg/bin/jtreg -va -s -jdk:/home/emanuel/Documents/fork3-jdk/build/linux-x64-slowdebug/jdk -javaoptions:"-server -Xcomp" -J-Djavatest.maxOutputSize=1000000 /home/emanuel/Documents/fork3-jdk/open/test/hotspot/jtreg/compiler/regalloc/TestC2IntPressure.java

      [~jzhu] ran it without the assert, and saw that there were multiple methods with this bailout.

      Update:
      I also got the assert hit with this test:
      jdk/internal/vm/Continuation/Fuzz.java#preserve-fp
      And extra flags: -Xcomp -XX:+CreateCoredumpOnCrash -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:+TieredCompilation

            jzhu Joshua Zhu
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: