-
Couldn't load subscription status.
- Fork 145
8349988: Change cgroup version detection logic to not depend on /proc/cgroups #2390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…/cgroups 8347811: Container detection code for cgroups v2 should use cgroup.controllers Backport-of: 9c5ed23eac7470f56d498e9c4d3c51c2f80fd571
|
👋 Welcome back schernyshev! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issues from the original commit. |
|
|
|
/approval request This improves container detection in newer kernels such as 6.14 HWE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a reviewer. This looks good to me.
|
Is the new result for expected? If so, is there a bug filed for fixing that? |
Hi all,
This is a clean backport of JDK-8349988 to JDK 21. The only minor context conflict is in src/hotspot/share/prims/whitebox.hpp.
The change improves container detection with newer kernels such as 6.14 HWE (bug).
podman run -v $TEST_JDK:/opt/jdk --rm -ti --memory 200m --memory-swap 200m ubuntu:24.04 /opt/jdk/bin/java -XshowSettings:system --versionTests:
No regressions observed in
test/hotspot/jtreg/containers/,test/jdk/jdk/internal/platformDetails:
kernel 6.14 HWE Cgroup v2
kernel 6.14 HWE Cgroup v1
kernel 6.11 Cgroup v2
One test failed below: jdk/internal/platform/docker/TestDockerMemoryMetrics.java
The test fails intermittently, it is unrelated to this backport: the
failcounttest gets OOM-killed, likely because the total process allocation is bigger than-Xmxsize and the swapping isn't enabled. The test will be skipped when/if JDK-8343340 gets integrated. I noted that the test passes sometimes without JDK-8343340 though.kernel 6.11 Cgroup v1
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2390/head:pull/2390$ git checkout pull/2390Update a local copy of the PR:
$ git checkout pull/2390$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2390/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2390View PR using the GUI difftool:
$ git pr show -t 2390Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2390.diff
Using Webrev
Link to Webrev Comment