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

[TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b19
    • CPU:
      ppc, aarch64

      Backports

        Description

        We observed test failures with NullPointerException when running the test with experimental ZGC on PPC64:
        java.lang.NullPointerException: Cannot invoke "compiler.gcbarriers.Node.next()" because "this.current" is null
        at compiler.gcbarriers.Runner.run(UnsafeIntrinsicsTest.java:226)

        It failed while "Testing Load with 4 thread and 133700 nodes".

        During "testWithSharedData", "mergeImplLoad" calls "setNext" to install newly created Nodes without any memory barrier. Note that the field "Node.next" is not volatile. The JMM does not require concurrent readers to observe any field updates which were done before inserting the new Nodes. So, it's legal that the concurrent reader sees "Node.next == null".

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mdoerr Martin Doerr
                Reporter:
                mdoerr Martin Doerr
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: