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

G1 allocates EDEN region after CDS has executed GC

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      During the development for JDK-8244778, I encountered this assert:

      http://hg.openjdk.java.net/jdk/jdk/file/ca1687338afe/src/hotspot/share/gc/g1/g1HeapVerifier.cpp#l337

      assert(!cl.has_unexpected_holes(), "all holes should have been caused by humongous regions");

      During -Xshare:dump, we would force a GC,

      http://hg.openjdk.java.net/jdk/jdk/file/ca1687338afe/src/hotspot/share/memory/metaspaceShared.cpp#l1870

      Usually this will clear the EDEN region, leaving the top of the heap unused. Here's the log from java -Xshare:dump -Xlog:gc*=info,gc+region=trace,gc+alloc+region=debug

      (see attached good.txt)
      [4.742s][info ][cds ] Dumping symbol table ...
      [4.812s][info ][gc,region,cds ] HeapRegion 0x00000003d2000000 OLD
      [4.812s][info ][gc,region,cds ] HeapRegion 0x00000003d2800000 FREE
      [4.812s][info ][gc,region,cds ] HeapRegion 0x00000003d3000000 FREE
      [4.812s][info ][gc,region,cds ] HeapRegion 0x00000003d3800000 FREE
      [4.812s][info ][cds ] Dumping objects to closed archive heap region ...


      However, when the bug happens, we see an EDEN region at the top of the heap, which CDS doesn't want to see:

      (see attached bad.txt)
      [1.370s][info ][cds ] Dumping symbol table ...
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080000000 OLD
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080100000 OLD
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080200000 FREE
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080300000 FREE
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080400000 FREE
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080500000 FREE
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080600000 FREE
      [1.387s][info ][gc,region,cds ] HeapRegion 0x0000000080700000 EDEN hole **** unexpected ****
      [1.387s][warning][gc,verify ] All free regions should be at the top end of the heap, but we found holes. This is probably caused by (unmovable) humongous allocations, and may lead to fragmentation while writing archive heap memory regions.
      [1.388s][info ][cds ] Dumping objects to closed archive heap region ...

        Attachments

        1. bad.txt
          40 kB
        2. good.txt
          35 kB
        3. hs_err.txt
          42 kB

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: