RFR: 8313395: LotsUnloadTest.java fails with OOME transiently with libgraal

Ioi Lam iklam at openjdk.org
Wed Jul 9 23:58:12 UTC 2025


It seems like when libgraal is used as the JIT, more heap space is allocated in the Java heap to support JIT compilation. This causes OOM in the test when the heap is very small.

The test allocates 1024 * 2 MB of heap objects but at any time keeps only 8 MB of them alive. The test expects class unloading would happen when the heap is filled with garbage. By increasing the heap size from 64MB to 256MB, we can still accomplish what the test wants to do but will be more friendly to libgraal.

The fact that libgraal uses more memory is still a concern, but that should be tested elsewhere, and is not the responsibility of this test.

-------------

Commit messages:
 - 8313395: LotsUnloadTest.java fails with OOME transiently with libgraal

Changes: https://git.openjdk.org/jdk/pull/26230/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26230&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313395
  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/26230.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26230/head:pull/26230

PR: https://git.openjdk.org/jdk/pull/26230


More information about the hotspot-runtime-dev mailing list