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

G1 concurrent class unloading is disabled during high class loading activity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 12, 13
    • hotspot
    • gc

      In [~huntch]'s (internal) class loading/unloading stress test G1 starts failing to unload classes during concurrent cycles after a short while.

      Only Full GCs with a cause of "Metadata GC Threshold" when metaspace reaches MaxMetaspaceSize can clear out metaspace.

      If there is no MaxMetaspaceSize set it is expected that the metaspace will grow until the process is killed or there is a different reason for a full gc.

      After that G1 will never be able to clean out metaspace using concurrent cycles. (This may be because the test program does the same forever from that point on).

      Only reproduces with release builds. JDK11 does not show the issue - it cleans out metaspace regularly using concurrent cycles.

      The change that started this behavior to show up is JDK-8210155: Lock ClassLoaderDataGraph . It may not be directly responsible for that.

        1. bad.txt
          10 kB
        2. good.txt
          7 kB

            Unassigned Unassigned
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: