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

Unreachable classes are not deleted after the end of Conc Mark Cycle

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Introduced In Version:
      9

      Description

      According JDK-8049421 G1 is able to unload unreachable classes at the remark pause.
      I attached a test which shows that unreachable classes are unload only after full gc, but not after ConcMarkCycle.

      The test does the following:
      1, compiles SimpleClassLoader which loads classes with specified name <prefix>, other classes are loaded by parent Class Loader
      2. compiles ChildClassLoader which extends SimpleClassLoader
      3. compiles <prefix>BaseClass and (<prefix>TestClass extends <prefix>BaseClass)
      4. loads <prefix>TestClass using ChildClassLoader
      5. forgets all links to classes and both classloaders
      6. in case of full gc unreachable classes and ChildClassLoader are unloaded.
      7. in case of ConcMarkCycle unreachable classes and ChildClassLoader are not unloaded.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kzhaldyb Kirill Zhaldybin (Inactive)
                Reporter:
                kzhaldyb Kirill Zhaldybin (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: