-
Notifications
You must be signed in to change notification settings - Fork 151
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
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 |
|
@sercher This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 53 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
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 |
fitzsim
left a comment
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? |
No it's not new. If failed with kernel 6.11 cgroup v2 before the patch too. The limit was simply undetected in 6.14 HWE.
Looks like it's tracked under JDK-8356277 |
Thanks! |
I suggest to configure your system to increase the max pids so the test passes. |
|
/approve yes |
|
@jerboaa |
|
Thank you Severin. The test passes with the increased max pids. |
|
/integrate |
|
/sponsor |
|
Going to push as commit dd842c4.
Your commit was automatically rebased without conflicts. |
|
@phohensee @sercher Pushed as commit dd842c4. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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.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