JDK-8252049 : Native memory leak in ciMethodData ctor
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-08-19
  • Updated: 2021-09-14
  • Resolved: 2020-12-08
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 16
11.0.14-oracleFixed 16 b28Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
The attached example cause growing size of java process java process from ~1G to 16G during 12 hours.
Run: java -Xmx512M  Main

I haven't found any info in NMT detailed report.
The final size is:

 3651 opc       20   0   16.5g   9.1g  25744 S  4800  2.9  34789:50 java


Not reproduced with Xint so filing as a Compiler bug.
Comments
Fix Request (11u): Should get backported for parity with 11.0.14-oracle. Doesn't apply cleanly. Review: https://github.com/openjdk/jdk11u-dev/pull/327
10-09-2021

Okay, unfortunately the backport does not apply cleanly. I've filed a backport task, could you take care of it?
18-12-2020

> Does this affect JDK 11u? And if so, should we backport the fix? The bug was introduced by JDK-8035841 which went into 9 and was backported into 8u. So, to affects both latest 11u and 8u. IMO it makes sense to backport the fix.
17-12-2020

Does this affect JDK 11u? And if so, should we backport the fix?
16-12-2020

Changeset: 044616bd Author: Vladimir Ivanov <vlivanov@openjdk.org> Date: 2020-12-08 17:02:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/044616bd
08-12-2020

Seems related to this; Vlad did some analysis and it seems like VarHandle lambda forms are not cached, and recreated fresh every time.
17-11-2020