JDK-8331560 : Refactor Hotspot container detection code so that subsystem delegates to controllers
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2024-05-02
  • Updated: 2025-05-07
  • Resolved: 2024-07-02
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 24
24 b05Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
JDK-8302744 prepares the Hotspot container detection code to allow for certain refactoring. In particular it allows for moving the actual implementing code to different classes.

In order to reduce technical dept and to unify checking for overflow values (JDK-8292083) as well as be able to walk the cgroup hierarchy code on init, but then have them frozen after for the rest of JVM runtime, we should refactor the code so that controller delegation is possible.

This would enable bug fixes like JDK-8322420 to become more uniform - fix JDK-8322420 and JDK-8217338 in a more uniform way. Especially since the cpu controller would likely need a similar treatment than the memory controller needs for JDK-8322420.

Another added benefit is that it would allow for better testing of the code with gtest.
Comments
Fix request (21u) - but only for the October release I'd like to port JDK-8331560 to 21u as discussed in: [21u] Backport intention of 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected https://mail.openjdk.org/pipermail/jdk-updates-dev/2025-March/042592.html This is a PR 4 of 6 in this series, it has a patch dependency on PR of JDK-8261242. This backport is clean.
17-04-2025

A pull request was submitted for review. Branch: pr/1661 URL: https://git.openjdk.org/jdk21u-dev/pull/1662 Date: 2025-04-16 10:42:40 +0000
16-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1651 Date: 2025-04-15 13:17:30 +0000
15-04-2025

Changeset: 153b12b9 Author: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2024-07-02 15:38:54 +0000 URL: https://git.openjdk.org/jdk/commit/153b12b9df87fdf8122cae3bf7f13078f55f7101
02-07-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19085 Date: 2024-05-03 12:24:02 +0000
06-05-2024