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

PhaseCFG::insert_anti_dependences can fail to raise LCAs and to add necessary anti-dependence edges

XMLWordPrintable

    • master

      # Failure analysis

      When searching for load anti-dependences in GCM, the memory state for the load is sometimes represented not only by the memory node input of the load, but also other memory nodes. Because PhaseCFG::insert_anti_dependences searches for anti-dependences only from the load's memory input, it is, therefore, possible to sometimes overlook anti-dependences. The result is that loads are potentially scheduled too late, after stores that redefine the memory states of the loads.

      Consider the attached ideal graph [1,2]. 64 membar_release is a critical anti-dependence. We search for anti-dependences from the load's direct memory input, 107 Phi. The search stops immediately at Phis, and thus ends at 106 Phi. This is not sufficient to find 64 membar_release.

      Also, consider another example [3,4]. Here, the required anti-dependence is 75 Phi (or, rather, the last block on the path between 76 Phi and 75 Phi = B9). We search for anti-dependences from 18 MachProj, and therefore stop at 76 Phi and 77 Phi. This is not sufficient to raise the LCA as required.

      [1] failure-graph-1.png
      [2] failure-blocks-1.png
      [3] failure-graph-2.png
      [4] failure-blocks-2.png

      # Original description

      Nothing to go on, the problem seems to be the r11 test

      ----------System.err:(15/908)----------
      java.lang.RuntimeException: assertEquals expected: 1 but was: 2
      at jdk.test.lib.Asserts.fail(Asserts.java:691)
      at jdk.test.lib.Asserts.assertEquals(Asserts.java:204)
      at jdk.test.lib.Asserts.assertEquals(Asserts.java:191)
      at applications.javafuzzer.JavaFuzzerRunner.reportResults(JavaFuzzerRunner.java:232)
      at applications.javafuzzer.JavaFuzzerRunner.runWithConfigurations(JavaFuzzerRunner.java:253)
      at applications.javafuzzer.JavaFuzzerRunner.main(JavaFuzzerRunner.java:275)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
      at java.base/java.lang.Thread.run(Thread.java:1575)


      r11- 300: 186 passed, 0 crashes, 1 fails, 0 hangs, 0 incorrect tests, 113 Reference Java failures

      Saving result: fails 288
          Failed!
      Test r11-288 FAILED
      r11-288 (239 lines) [177 passed, 0 crashes, 1 fails, 0 hangs, 0 incorrect tests, 110 Reference Java failures] - 96%/300

        1. failure-blocks-1.png
          failure-blocks-1.png
          48 kB
        2. failure-blocks-2.png
          failure-blocks-2.png
          46 kB
        3. failure-graph-1.png
          failure-graph-1.png
          22 kB
        4. failure-graph-2.png
          failure-graph-2.png
          19 kB
        5. Test.java
          0.7 kB
        6. Test2.java
          9 kB
        7. TestNew.java
          0.9 kB
        8. TestNoPeeling.java
          2 kB

            dlunden Daniel Lunden
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: