Running into OpenJDK 11 JIT C2 native memory leak JDK-8292260
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openjdk-lts (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
We have many apps but I believe one app more or less does more work and it was crashing on OpenJDK 11 on Ubuntu Bionic. We are using version 11.0.16+
We have perf reports, Java map files, heaps from jemalloc, Java Native Memory Profiling (i.e. NMP) summary diffs, and SVGs from jemalloc (i.e. jeprof).
We've been able to reliably reproduce this isse. Once we start sending data, the app very quickly consumes all RAM. I would say a gigabyte in about 3.5 seconds. We actually increased RAM to get to the bottom of it. We have several apps not all of them run into the same issue but not all of them work with the data the same way.
NMP summary diff shows Compiler, perf shows C2Compiler, and I'm a system administrator but DevOps and Dev see it as the C2 JIT.
Since there isn't a fix in Ubuntu OpenJDK-LTS 11 we used Adoptium 11.0.16.1 and so far have not been able to replicate the issue.
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
openjdk-11-jdk: 8-0ubuntu1~ 18.04 8-0ubuntu1~ 18.04
Installed: 11.0.16+
Candidate: 11.0.16+
3) What you expected to happen
No leak and for Java app to process data with minimal native memory consumption.
4) What happened instead
Native memory leak to the point OOM killer acts on it. Java heap and metaspace memory are within reasonable ranges as we also used VisualVM to analyze it. This is where we had to use jemalloc and perf.