-
Bug
-
Resolution: Fixed
-
P3
-
openjdk8u312, 11.0.12, 16
-
b11
-
x86_64
-
linux
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8272663 | 17.0.2 | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8272685 | 17.0.1 | Harold Seigel | P3 | Resolved | Fixed | b08 |
JDK-8273196 | 11.0.14-oracle | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8272787 | 11.0.13 | Severin Gehwolf | P3 | Resolved | Fixed | b05 |
JDK-8273088 | openjdk8u312 | Severin Gehwolf | P3 | Resolved | Fixed | b05 |
JDK-8302530 | 8u381 | Ivan Bereziuk | P3 | Resolved | Fixed | b01 |
Flatcar linux, Kubernetes, Java 16
A DESCRIPTION OF THE PROBLEM :
Cgroup initialization goes through two steps, first in finding the mount points from /proc/self/mountinfo, and then reading cgroup subsystem paths from /proc/self/cgroup. The latter file is a line based text file with 3 fields, split by colon.
This is currently parsed in the jdk with a bare split (https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java#L197). However, that split needs to have a limit of 2 set, so that the cgroupPath (the third element) may contain colon.
When the cgroupPath contains a colon, the extra portions of the path is silently thrown away. When the subsystem's path element is initialized (https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1SubsystemController.java#L45) it falls through, failing the prefix checks, and leaving path as null (perhaps an assertion should exist to ensure path is not null there). Finally, when any configuration file for the subsystem is attempted to be read, eg memory.is_hierarchy, Paths.get(path) is called and an NPE is thrown.
Additional investigation details can be found in https://github.com/kubernetes/kubernetes/issues/103944 and https://github.com/elastic/elasticsearch/issues/75767.
REGRESSION : Last worked in version 12
FREQUENCY : always
- backported by
-
JDK-8272663 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
-
JDK-8272685 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
-
JDK-8272787 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
-
JDK-8273088 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
-
JDK-8273196 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
-
JDK-8302530 Cgroup v1 initialization causes NullPointerException when cgroup path contains colon
- Resolved
- relates to
-
JDK-8286212 Cgroup v1 initialization causes NPE on some systems
- Open
- links to
-
Commit openjdk/jdk11u-dev/7c872ed3
-
Commit openjdk/jdk17u/f0028333
-
Commit openjdk/jdk/4d6593ce
-
Review openjdk/jdk11u-dev/292
-
Review openjdk/jdk17u/22
-
Review openjdk/jdk/5127