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

Initialization race for non-JavaThread PtrQueues

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b15
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      In Shenandoah testing we discovered an initialization race: A non-Java GC thread (we have observed it on the StringDedupThread) may be initialized concurrently while Java and GC are already up an running, but not (yet) participate in safepointing.

      BS::on_thread_attach() usually does propagate global GC state to thread-local GC state, in this case the SATB active flag.

      When doing this concurrently, while not participating in safepointing, this may propagate the wrong state, and subsequently lead to heap corruption (e.g. because we missed some SATB updates).

      This is related to JDK-8219613 because before that change, non-Java-threads would simply use a shared SATB queue instead.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kbarrett Kim Barrett
                Reporter:
                rkennke Roman Kennke
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: