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

Shenandoah: Fix racy update of update_watermark

    XMLWordPrintable

Details

    • gc
    • b23
    • generic
    • generic

    Backports

      Description

        We're observing an assert in ShenandoahHeapRegion:get_update_watermark():

        assert(bottom() <= watermark && watermark <= top(), "within bounds");

        The trouble there is that arraycopy routines will get there concurrently with evacuating threads that update update_watermark under lock, but the read-access is not under lock. The observing thread can observe the updates to top and update_watermark in wrong order and thus trip that assert. It happens reliably on aarch64 with the following test:

        CONF=fastdebug LANG=C LOG=info make run-test TEST=compiler/types/correctness/OffTest.java TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=aggressive"

        Attachments

          Issue Links

            Activity

              People

                rkennke Roman Kennke
                rkennke Roman Kennke
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: