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

Shenandoah: Don't race with conc-weak-in-progress flag in weak-LRB

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b28
    • CPU:
      generic
    • OS:
      generic

      Description

      The weak-LRB code is currently subject to a race. Consider this sequence of events between a Java thread and GC threads:
      During conc-weak-root-in-progress:
      - Java: Load referent out of Reference, it is unreachable but not-yet-cleared
      - GC: Clears referent
      - GC: Concurrently turn off conc-weak-root-in-progress
      - Java: Checks conc-weak-root-in-progress, sees that it's false, continues to use/evac it -> successfully resurrected unreachable object. This must not happen.

      AFAICT, this also affects conc-class-unloading and weak-roots.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zgu Zhengyu Gu
              Reporter:
              rkennke Roman Kennke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: