-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 17.0.15, 24, 25
-
Component/s: hotspot
-
b18
-
generic
-
linux
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
|---|---|---|---|---|---|---|
| JDK-8371005 | 21.0.10 | Sergey Chernyshev | P3 | Resolved | Fixed | b01 |
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#deprecated-v1-core-features
"""
/proc/cgroups is meaningless for v2. Use “cgroup.controllers” or “cgroup.stat” files at the root instead
"""
The OpenJDK container detection code still uses the deprecated feature '/proc/cgroups' and should migrate to '/sys/fs/cgroup/cgroup.subtree_control' instead for cg v2 in order to detect enabled controllers.
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#controlling-controllers mentions that the 'cgroup.controllers' file lists all available controllers for a hierarchy. However, for the purposes of the JVM we are interested in *enabled* controllers for the hierarchy. In the JVM case the hierarchy is /sys/fs/cgroup. *Enabled* controllers for a hierarchy are listed in '/sys/fs/cgroup/cgroup.subtree_control' with the same format than 'cgroup.controllers' file.
- backported by
-
JDK-8371005 Container detection code for cgroups v2 should use cgroup.controllers
-
- Resolved
-
- duplicates
-
JDK-8349527 cgroups v2 support cannot be inferred from /proc/cgroups in Linux 6.12
-
- Closed
-
- relates to
-
JDK-8359817 backport cgroup.controllers fix to JDK 21, 17 and possibly older JDKs?
-
- Open
-
-
JDK-8346874 Linux kernel version 6.12 and newer breaks JVM container support
-
- Closed
-
-
JDK-8355033 [Metrics] Container detection code for cgroups v2 should use cgroup.controllers
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk21u-dev/dd842c44
-
Commit(master)
openjdk/jdk/9c5ed23e
-
Review(master)
openjdk/jdk21u-dev/2390
-
Review(master)
openjdk/jdk/23811