Details

    • Subcomponent:
      gc
    • Verification:
      Verified

      Backports

        Description

        A klass that has been considered unreachable by the concurrent marking of G1, can be looked up in the `ClassLoaderData/SystemDictionary`, and its `_java_mirror` or `_class_loader` fields can be stored in a root or any other reachable object making it alive again. Whenever a klass is resurrected in this manner, the SATB part of G1 needs to be notified about this, otherwise, the concurrent marking remark phase will erroneously unload that klass.

        In this particular crash, while G1 was doing concurrent marking and had prepared its list of unreachable classes, JVMTI on a Java thread could traverse classes in the CLD and store thread-local JNIHandles for the java_mirror of the loaded classes. G1 did not have knowledge of these thread-local JNIHandles, and in the remark phase, it unloaded classes per its prior knowledge of unreachable classes. When these JNIHandles were later scanned, it lead to a crash.

        This fix for JDK-8187577 informs G1's SATB that a klass has been resurrected and should not be unloaded.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  poonam Poonam Bajaj Parhar
                  Reporter:
                  scfitch Stephen Fitch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: