[jdk11u-dev] RFR: 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy [v6]
Severin Gehwolf
sgehwolf at openjdk.java.net
Tue Mar 15 15:07:46 UTC 2022
On Thu, 10 Mar 2022 14:13:13 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixes
>
> src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java line 108:
>
>> 106: CgroupUtil.readFilePrivileged(Paths.get("/proc/self/cgroup"))) {
>> 107:
>> 108: lines.map(line -> line.split(":"))
>
> We are missing the patch of JDK-8272124 here. Old code was:
> https://github.com/openjdk/jdk11u-dev/blob/194b66f6a72437345c458e747e24beb46352537a/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/Metrics.java#L119..L122
>
> Best to use the JDK 17u commit as a base for this:
> See: https://github.com/openjdk/jdk17u/commit/f0028333d83c39b434c26f66a6a92e446e7047cd#diff-7d6f202c58b4205f19a9b6c657f4827e9ef132d7433a7bf906b5b640f9f7841fR197
>
> Looking at this again, we should bring in the test changes of JDK-8272124 too (as we are now bringing in those tests with the cgroups v2 backport). It helps to verify this fix is present as well.
This is still not fixed --^ We should bring in the test changes from https://github.com/openjdk/jdk/commit/4d6593ce0243457e7431a5990957a8f880e0a3fb as well (with this backport). That will cause the test to fail and we are good to find regressions related to this going forward.
> test/lib/jdk/test/lib/Utils.java line 784:
>
>> 782: Path dir = Paths.get(System.getProperty("user.dir", "."));
>> 783: return Files.createTempDirectory(dir, prefix, attrs);
>> 784: }
>
> This looks like a partial backport of https://bugs.openjdk.java.net/browse/JDK-8223396. It's a test-only change, cleanup. Perhaps worth bringing into jdk11u wholesale as a dep? Failing that, rework usages of `Utils.createTempDirectory()`?
Why has this been marked resolved? I still see this hunk in the current patch.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/863
More information about the jdk-updates-dev
mailing list