<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    Please review this fix for a G1GC crash occurring during concurrent
    marking.<br>
    <br>
    Bug: <a class="issue-link" data-issue-key="JDK-8187577"
      href="https://bugs.openjdk.java.net/browse/JDK-8187577"
      id="key-val" rel="4939883">JDK-8187577:</a> JVM crash during gc
    doing concurrent marking<br>
    Webrev: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~poonam/8187577/webrev.00/">http://cr.openjdk.java.net/~poonam/8187577/webrev.00/</a><br>
    <br>
    Problem:<br>
    A klass that has been considered unreachable by G1, can be looked up
    in the CLD/SD, and its _java_mirror or _class_loader 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 wrongly unload that klass.<br>
    <br>
    In this particular crash, while a G1 is doing concurrent marking and
    has prepared its list of unreachable classes, JVMTI on a Java thread
    traverses classes in the CLD and stores thread-local JNIHandles for
    the java_mirror of the loaded classes. G1 does not have knowledge of
    these thread-local JNIHandles, and in the remark phase it unloads
    classes as per its prior knowledge of unreachable classes. But when
    these JNIHandles are later scanned, it leads to a crash.<br>
    <br>
    Solution:<br>
    Inform G1's SATB that a klass has been resurrected and it should not
    be unloaded.<br>
    <br>
    Testing:<br>
    - Customer verification testing<br>
    - mach5 jdk-tier1-3, hs-tier1-2<br>
    <br>
    Thanks,<br>
    Poonam<br>
    <br>
    <br>
  </body>
</html>