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

C1 LinearScan asserts when compiling two back-to-back CompareAndSwapLongs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • hotspot
    • None
    • b103
    • Verified

      In VarHandles, we have more through Unsafe tests that are currently present in Hotspot. One of these tests asserts in LinearScan like this:

      # Internal Error (/opt/jprt/T/P1/125327.sandoz/s/hotspot/src/share/vm/c1/c1_LinearScan.cpp:5597), pid=17455, tid=17463
      # assert(false) failed: cannot spill interval that is used in first instruction (possible reason: no register found)

      The problem seems to triggered on i586 only, not on x86_64. I have self-built several JDK 9 builds, and every build seems to fail; the oldest one I tried is jdk9-b80 -- others fail to compile with recent toolchains. Note that public JDK 9 EA builds, including 9b92 work fine, because asserts are stripped from there. It is unknown if the assert signifies a real trouble gone unnoticed in product bits. In product bits, LinearScan bails out, and skips C1 compile of the method:

       compilation bailout: LinearScan: no register found
          494 205 1 UnsafeTwoCASLong::testAccess (27 bytes) COMPILE SKIPPED: LinearScan: no register found (retry at different tier)

      The minimized offending test:
       http://cr.openjdk.java.net/~shade/8143930/UnsafeTwoCASLong.java

            roland Roland Westrelin
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: