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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b103
    • Verification:
      Verified

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: