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

Shenandoah evacuation workers may deadlock

    XMLWordPrintable

Details

    • gc
    • b19
    • generic
    • generic

    Backports

      Description

        We've observed a situation where the JVM was deadlocked by Shenandoah's evacuation workers. This may happen if a safepoint begins during concurrent evacuation _and_ a GC worker thread experiences an out of memory error during the evacuation.

        This situation occurs because some of the workers have set the cancelled state to `NOT_CANCELLED` and then yielded to the suspendible thread set because a safepoint is starting. Other workers who then experience an OOM during evacuation attempt to transition the heap from `CANCELLABLE` to `CANCELLED` in a CAS loop that will never succeed (because the cancelled state is `NOT_CANCELLED`). These workers are unable to join the suspendible thread set, so the threads which have yielded are unable to resume and reset the heap to `CANCELLABLE`. The VM thread cannot enter the safepoint and eventually all of the mutator threads block when they are unable to allocate.

        Attachments

          Issue Links

            Activity

              People

                wkemper William Kemper
                wkemper William Kemper
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: