JDK-8316661 : CompilerThread leaks CodeBlob memory when dynamically stopping compiler thread in non-product
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,21,22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-09-21
  • Updated: 2023-12-29
  • Resolved: 2023-09-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21.0.3-oracleFixed 22 b17Fixed
Related Reports
Relates :  
Description
CodeBlob::flush() is not called when a compiler thread is stopped due to dynamic compiler thread policy (and during shutdown of the compiler runtime).

This leaks memory (asm_strings and dbg_strings allocated memory) in non-product builds.

Comments
Fix request [21u] I backport this for parity with 21.0.3-oracle. Medium risk. Simple change in C2, but without test. Clean backport. SAP nightly testing passed.
28-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/99 Date: 2023-12-26 13:08:35 +0000
26-12-2023

Changeset: edcc559f Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2023-09-27 15:14:57 +0000 URL: https://git.openjdk.org/jdk/commit/edcc559f09364da3692862e1f3d0636aa8eec1d4
27-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15858 Date: 2023-09-21 11:18:36 +0000
21-09-2023

Yes. I un-confused the title a bit.
21-09-2023

[~tschatzl], I assume this is about the CompilerThread::_buffer_blob, right? ILW = Memory leak when compiler thread is stopped (release build is not affected), in debug builds when compiler threads are stopped, -XX:-UseDynamicNumberOfCompilerThreads = MMM = P3
21-09-2023