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

ArchivedKlassSubGraphInfoRecord is incomplete

    Details

    • Subcomponent:
    • Resolved In Build:
      b11

      Description

      When heapShared.cpp dumps a sub-graph of heap objects, it attempts to record all the classes of all the objects that are referenced by this sub-graph.

      However, if one of these objects have already been visited while a previous sub-graph was dumped, then this object's class is not recorded in the current sub-graph.

      The bug is in the return statement of the following block

      http://hg.openjdk.java.net/jdk/jdk/file/9720ad0a40b6/src/hotspot/share/memory/heapShared.cpp#l394

            oop archived = MetaspaceShared::find_archived_heap_object(obj);
            if (archived != NULL) {
              ...
              return;
            }

      At runtime, if the current sub-graph is restored before any other sub-graphs, we will end up with a live object in the Java heap with an uninitialized class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iklam Ioi Lam
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: