-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b26
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288434 | 17.0.5-oracle | Ioi Lam | P3 | Resolved | Fixed | b01 |
JDK-8288102 | 17.0.5 | Severin Gehwolf | P3 | Resolved | Fixed | b01 |
JDK-8298595 | 11.0.19-oracle | Calvin Cheung | P3 | Resolved | Fixed | b01 |
JDK-8292966 | 11.0.17 | Severin Gehwolf | P3 | Resolved | Fixed | b05 |
JDK-8301372 | openjdk8u372 | Severin Gehwolf | P3 | Resolved | Fixed | b02 |
JDK-8302729 | 8u381 | Ivan Bereziuk | P3 | Resolved | Fixed | b01 |
Example:
$ cat /proc/self/cgroup
0::/foobar
11:freezer:/cg1
The cgroup path would end up being '/cg1' instead of '/foobar'. This can be fairly easy to reproduce with this patch:
diff --git a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp
index 1346cf8915f..7b93e0d5721 100644
--- a/src/hotspot/os/linux/cgroupSubsystem_linux.cpp
+++ b/src/hotspot/os/linux/cgroupSubsystem_linux.cpp
@@ -261,6 +261,8 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
}
if (is_cgroupsV2) {
for (int i = 0; i < CG_INFO_LENGTH; i++) {
+ assert(hierarchy_id == cg_infos[i]._hierarchy_id, "/proc/cgroups (%d) and /proc/self/cgroup (%d) hierarchy mismatch",
+ cg_infos[i]._hierarchy_id, hierarchy_id);
cg_infos[i]._cgroup_path = os::strdup(cgroup_path);
}
}
And running on a fastdebug build:
$ make LOG=debug test TEST="jtreg:test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java"
It asserts with:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/cgroupSubsystem_linux.cpp:264
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/disk/openjdk/upstream-sources/git/jdk-jdk/src/hotspot/os/linux/cgroupSubsystem_linux.cpp:264), pid=134644, tid=134666
# assert(hierarchy_id == cg_infos[i]._hierarchy_id) failed: /proc/cgroups (0) and /proc/self/cgroup (11) hierarchy mismatch
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.sgehwolf.jdk-jdk)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.sgehwolf.jdk-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x95a67c] CgroupSubsystemFactory::determine_type(CgroupInfo*, char const*, char const*, char const*, unsigned char*)+0xd4c
- backported by
-
JDK-8288102 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
-
JDK-8288434 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
-
JDK-8292966 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
-
JDK-8298595 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
-
JDK-8301372 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
-
JDK-8302729 Fix of JDK-8287107 (unused cgv1 freezer controller) was incomplete
- Resolved
- relates to
-
JDK-8287107 CgroupSubsystemFactory.setCgroupV2Path asserts with freezer controller
- Resolved
- links to
-
Commit openjdk/jdk8u-dev/563f7b5d
-
Commit openjdk/jdk11u-dev/90a64188
-
Commit openjdk/jdk17u-dev/7023eef9
-
Commit openjdk/jdk/8d28734e
-
Review openjdk/jdk8u-dev/219
-
Review openjdk/jdk11u-dev/1345
-
Review openjdk/jdk17u-dev/444
-
Review openjdk/jdk/9001