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

Shenandoah: distribute mark-compact work exactly to minimize fragmentation

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b16

      Backports

        Description

        $ CONF=linux-x86_64-server-fastdebug make images run-test TEST=tools/jlink/JLinkTest.java TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC"
        ...

        Error: Java heap space
        java.lang.OutOfMemoryError: Java heap space
        at java.base/java.io.InputStream.readNBytes(InputStream.java:442)
        at java.base/java.io.InputStream.readAllBytes(InputStream.java:346)
        at jdk.jlink/jdk.tools.jlink.plugin.ResourcePoolEntry.contentBytes(ResourcePoolEntry.java:127)
        ...
        at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:63)
        at tests.JImageGenerator$JLinkTask.call(JImageGenerator.java:715)
        at tests.Helper.generateDefaultImage(Helper.java:257)
        at JLinkTest.main(JLinkTest.java:264)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)

        Looks like humongous allocation failure from which Full GC is not able to recover.

        Remarkably, the test passes with -XX:ParallelGCThreads=1, and no GC cycles happen with 1 parallel GC thread! Once you have 2 parallel GC threads, GC cycles start to happen and it reaches OOME.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: