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

[TESTBUG] java/lang/management/MemoryMXBean/LowMemoryTest2.sh fails with OutOfMemoryError running in CDS mode

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: core-svc
    • Labels:
    • Resolved In Build:
      b09

      Description

      The java/lang/management/MemoryMXBean/LowMemoryTest2.sh test fails with OutOfMemoryError running on JDK binary with existing CDS archive:

      Exception in thread "Thread-0" java.lang.OutOfMemoryError: Metaspace
      at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:877)
      at LowMemoryTest2$BoundlessLoaderThread.loadNext(LowMemoryTest2.java:139)
      at LowMemoryTest2$BoundlessLoaderThread.run(LowMemoryTest2.java:153)
      at java.base/java.lang.Thread.run(Thread.java:834)
      Exception in thread "main" java.lang.RuntimeException: Test failed - notification not received!
      at LowMemoryTest2.main(LowMemoryTest2.java:257)

      The test uses -XX:MaxMetaspaceSize=16m, which is probably too small with CDS enabled.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ccheung Calvin Cheung
                Reporter:
                jiangli Jiangli Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: