JDK-8229345 : Memory leak due to vtable stubs not being shared on SPARC
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8u221,11,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2019-08-09
  • Updated: 2020-06-01
  • Resolved: 2019-08-16
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 13 JDK 14 JDK 8 Other
11.0.7-oracleFixed 13.0.4Fixed 14 b11Fixed 8u251Fixed openjdk8u252,port-stage-aarch32-8Fixed
Related Reports
Duplicate :  
Description
The code cache can be occupied by vtable stubs on SPARC. 
Since the vtable stubs are not deallocated[1], and not shared/reused in Solaris[2], 
it could get increased continuously and memory leaking is not negligible. 

One of the potential scenarios are continuous creation of class loaders. 
It causes excessive allocation and deallocation of nmethods. If call patterns are megamorphic, those nmethods will allocate corresponding vtable stubs for megamorphic inline cache transitions. While the nmethods are recycled, their vtable stubs are not 

It is reproducible in the JDK 14 and 11. 

[1] https://java.se.oracle.com/source/xref/jdk8u-cpu/hotspot/src/share/vm/code/vtableStubs.hpp#106 
[2] https://java.se.oracle.com/source/xref/jdk8u-cpu/hotspot/src/cpu/sparc/vm/globals_sparc.hpp#41 
Comments
Fix request (13u): The original patch applies cleanly, sanity check with tier1 tests.
26-05-2020

Fix request (11u) I would like to downport this for parity with 11.0.7-oracle. This removes a flag, but the flag is debug, so there are no compatibility issues. I had to do trivial resolves due to context http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-December/002285.html
23-12-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/0a8407a78a2f User: eosterlund Date: 2019-08-16 15:39:45 +0000
16-08-2019