G1 concurrent class unloading is disabled during high class loading activity

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 12, 13
    • Component/s: 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. good.txt
          7 kB
        2. bad.txt
          10 kB

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

              Created:
              Updated:
              Resolved: