JDK-8284458 : CodeHeapState::aggregate() leaks blob_name
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-04-06
  • Updated: 2022-04-29
  • Resolved: 2022-04-07
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 11 JDK 17 JDK 18 JDK 19
11.0.16Fixed 17.0.4Fixed 18.0.2Fixed 19 b18Fixed
Related Reports
Relates :  
Description
==878128== 8,324 bytes in 904 blocks are definitely lost in loss record 12,354 of 12,498
==878128==    at 0x484486F: malloc (vg_replace_malloc.c:381)
==878128==    by 0x5AE7745: malloc (os.cpp:656)
==878128==    by 0x5AE7745: malloc (os.cpp:632)
==878128==    by 0x5AE7745: malloc (os.cpp:629)
==878128==    by 0x5AE7745: os::strdup(char const*, MEMFLAGS) (os.cpp:584)
==878128==    by 0x546D311: CodeHeapState::aggregate(outputStream*, CodeHeap*, unsigned long) (codeHeapState.cpp:759)
==878128==    by 0x546659E: CodeCache::aggregate(outputStream*, unsigned long) (codeCache.cpp:1643)
==878128==    by 0x5494264: CompileBroker::print_heapinfo(outputStream*, char const*, unsigned long) (compileBroker.cpp:2856)
==878128==    by 0x554B831: DCmd::parse_and_execute(DCmdSource, outputStream*, char const*, char, JavaThread*) (diagnosticFramework.cpp:409)
==878128==    by 0x52E58BE: jcmd(AttachOperation*, outputStream*) (attachListener.cpp:203)
==878128==    by 0x52E64FC: attach_listener_thread_entry (attachListener.cpp:427)
==878128==    by 0x52E64FC: attach_listener_thread_entry(JavaThread*, JavaThread*) (attachListener.cpp:377)
==878128==    by 0x5D4AB1D: JavaThread::thread_main_inner() (thread.cpp:1291)
==878128==    by 0x5D5080F: Thread::call_run() (thread.cpp:356)
==878128==    by 0x5AF3017: thread_native_entry(Thread*) (os_linux.cpp:706)
==878128==    by 0x4927B19: start_thread (pthread_create.c:443)
==878128==    by 0x49AB8E3: clone (clone.S:100)

Comments
Fix Request (11u) I would like to backport this patch to 11u to fix a memory leak. The original patch does not apply cleanly, but patch is small, resolved manually.
28-04-2022

Fix Request (17u) I would like to backport this low risk patch to 17u to fix a memory leak. The original patch does not apply cleanly, but patch is small, resolved manually.
26-04-2022

Fix Request (18u) A clean and low risk backport to fix a memory leak.
25-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1046 Date: 2022-04-25 19:12:50 +0000
25-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/364 Date: 2022-04-25 19:10:34 +0000
25-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/110 Date: 2022-04-25 19:07:40 +0000
25-04-2022

ILW = memory leak in debug functionality; guaranteed leak; no workaround = LHH = P4
11-04-2022

Moved to hotspot/compiler.
11-04-2022

Changeset: d4a48843 Author: Zhengyu Gu <zgu@openjdk.org> Date: 2022-04-07 20:36:46 +0000 URL: https://git.openjdk.java.net/jdk/commit/d4a48843856e3d80a58d5a0a26dff6c4d349dca9
07-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8132 Date: 2022-04-06 23:30:13 +0000
06-04-2022