RFR: 8286870: Memory leak with RepeatCompilation

Tobias Hartmann thartmann at openjdk.java.net
Wed May 18 09:47:54 UTC 2022


On Tue, 17 May 2022 11:50:38 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> While using `RepeatCompilation` in combination with replay compilation and stress options to reproduce an intermittent issue, I noticed that it does not free the compiler thread arena after each compilation, leading to a (temporary) memory leak and out of memory errors. For example, each compilation of [JDK-8280696](https://bugs.openjdk.java.net/browse/JDK-8280696) allocates an additional 1218 kB.
> 
> The fix is to simply add a `ResourceMark` in the loop.
> 
> Thanks,
> Tobias

Thanks for the review, Vladimir. The github failures seem unrelated and due to missing Loom support on 32-bit:


testEnablePreview (--enable-preview)

#  Internal Error (stubGenerator_x86_32.cpp:3877), pid=33952, tid=33955
#  Error: Unimplemented()

Which is this stub:

  RuntimeStub* generate_cont_doYield() {
    if (!Continuations::enabled()) return nullptr;
    Unimplemented();
    return nullptr;
  }

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

PR: https://git.openjdk.java.net/jdk/pull/8744


More information about the hotspot-compiler-dev mailing list