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

Shenandoah: explicit GC request should wait for a complete GC cycle

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b20

      Backports

        Description

        One of the tests that fails intermittently in Shenandoah testing is DirectBufferAllocTest. It allocates lots of DBBs and checks that JDK machinery is able to recover.

        $ ./build/linux-x86_64-server-fastdebug/images/jdk/bin/java -cp ./test/jdk/java/nio/Buffer/ -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:MaxDirectMemorySize=128m DirectBufferAllocTest
        <fails with OOME occasionally>

        The underlying code is calling System.gc() when native memory storage is depleted, which will block until GC is over. But, there is a wrinkle in Shenandoah control code: if that request comes too late, it can unblock when *current* GC cycle is over, which would not free enough memory. Then, OOME would fire.

          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: