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

G1 doesn't honor request to disable class unloading

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b138
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        Class unloading should be disabled by -XX:-ClassUnloading (or the equivalent -Xnoclassgc). However, G1 does not honor such requests correctly.

        When G1 performs a full GC, it does not conditionalize the marking phase of root processing based on the ClassUnloading option. Instead it always marks the roots as if class unloading is enabled. Unfortunately, later code does attempt to honor ClassUnloading, with resulting problems.

        When G1 performs a concurrent mark, it conditionalizes some of the work on the ClassUnloadingWithConcurrentMark option, which defaults to true. That feature is not disabled when ClassUnloading is requested disabled, so it is presently possible to have ClassUnloading false and ClassUnloadingWithConcurrentMark true. As a result, later processing that is disabled when ClassUnloading is disabled may go awry.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sjohanss Stefan Johansson
                  Reporter:
                  kbarrett Kim Barrett
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: