JDK-8254001 : [Metrics] Enhance parsing of cgroup interface files for version detection
  • Type: Enhancement
  • Component: core-svc
  • Affected Version: 15,16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-10-05
  • Updated: 2022-12-16
  • Resolved: 2021-02-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 Other
11.0.16Fixed 17 b11Fixed openjdk8u372Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
With JDK-8245543 more sophisticated parsing of /proc/self/mountinfo will be necessary so as to not incorrectly instantiate a cgroups v2 object on a cgroups v1 system. With a little bit of extra tracking of controller info it should be possible to do away with reading /proc/self/mountinfo twice and pass the read info to where version specific objects are instantiated. With that the Java side would work similar to the hotspot side of the container code.
Comments
Fix request (8u) Please consider for 8u cgroups v2 support. It's not clean: some context issues around import lines and Files.writeString replacements. Thanks
15-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk8u-dev/pull/170 Date: 2022-11-14 10:51:48 +0000
14-11-2022

Adding fix request comment on behalf of Andrew Azores: Fix Request 11u: This patch is part of a series of improvements to CGroups support, in this case specifically v1/v2 detection. The patch did not apply cleanly because some other intermediary changes to the same file locations have not been backported. This was resolved by simply accepting the incoming change from the patch and replacing the prior implementations, which is the semantic intent of the patch. After this tier1 and container tests still pass. Patch reviewed by Severin Gehwolf
28-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1020 Date: 2022-04-07 15:34:54 +0000
27-04-2022

Changeset: a50725db Author: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2021-02-24 19:39:46 +0000 URL: https://git.openjdk.java.net/jdk/commit/a50725db
24-02-2021

Getting this in would enable writing a simple regression test for JDK-8257746 as well. Candidate patch for that: https://github.com/jerboaa/jdk/commit/4942b8c3bbb2df0c7181ddec3902ca4ee373e280
09-02-2021

Candidate patch: https://github.com/jerboaa/jdk/commit/e5c38ef7563e6de4b89553fd0d8a39f6635498c1
20-11-2020

JDK-8245543 didn't include this after all. Reopening.
09-10-2020

This will be fixed with JDK-8245543
06-10-2020