Regression in JDK15/16: CGroup v2 support

Bob Vandette bob.vandette at oracle.com
Wed Sep 2 14:47:05 UTC 2020


I wouldn’t expect the Metrics APIs to have a problem.  It looks for
the file system type in the correct position.

CgroupV1Subsystem.java

        try (Stream<String> lines =
                CgroupUtil.readFilePrivileged(Paths.get("/proc/self/mountinfo"))) {

            lines.filter(line -> line.contains(" - cgroup “))

CgroupV2Subsystem.java

        try (Stream<String> lines =
                CgroupUtil.readFilePrivileged(Paths.get("/proc/self/mountinfo"))) {

            String l = lines.filter(line -> line.contains(" - cgroup2 “))

Bob.

> On Sep 2, 2020, at 5:44 AM, Severin Gehwolf <sgehwolf at redhat.com> wrote:
> 
> Hi Bruno,
> 
> On Tue, 2020-09-01 at 23:23 +1000, David Holmes wrote:
>> That was the JI number. It is now:
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8252359
> 
> I've done some investigation on this bug with Bob.
> 
> Could you please check whether the Java API via Metrics.java is
> affected? My tests seem to indidcate not, but it would be good if you
> could confirm. Easiest way to verify is by running:
> 
> $ java -XshowSettings:system -version
> 
> in a container with memory/cpu limits on your setup.
> 
> Thanks,
> Severin
> 



More information about the hotspot-runtime-dev mailing list