jdk11u-dev icon indicating copy to clipboard operation
jdk11u-dev copied to clipboard

8347129: cpuset cgroups controller is required for no good reason

Open antonvoznia opened this issue 3 weeks ago • 8 comments
trafficstars

Hi all,

Clean backport of JDK-8347129

Ran test locally on Fedora 43 arm, under test/hotspot/jtreg/containers/

Without the fix:

containers/cgroup/CgroupSubsystemFactory.java  Passed. Execution successful
containers/cgroup/PlainRead.java               Passed. Execution successful
containers/docker/DockerBasicTest.java         Passed. Execution successful
containers/docker/ShareTmpDir.java             Passed. Execution successful
containers/docker/TestCPUAwareness.java        Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'active_processor_count.*1' missing from stdout/stderr
containers/docker/TestCPUSets.java             Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: assertTrue: expected true, was false
containers/docker/TestJFREvents.java           Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'totalSize = 209715200' missing from stdout/stderr
containers/docker/TestJFRNetworkEvents.java    Passed. Execution successful
containers/docker/TestJcmdWithSideCar.java     Passed. Execution successful
containers/docker/TestMemoryAwareness.java     Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Memory Limit is:.*104857600' missing from stdout/stderr
containers/docker/TestMemoryWithCgroupV1.java  Passed. Execution successful
containers/docker/TestMisc.java                Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'CheckContainerized: Running inside a container' missing from stdout/stderr
containers/docker/TestPids.java                Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: assertTrue: expected true, was false

With the fix:

containers/cgroup/CgroupSubsystemFactory.java  Passed. Execution successful
containers/cgroup/PlainRead.java               Passed. Execution successful
containers/docker/DockerBasicTest.java         Passed. Execution successful
containers/docker/ShareTmpDir.java             Passed. Execution successful
containers/docker/TestCPUAwareness.java        Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]
containers/docker/TestCPUSets.java             Passed. Execution successful
containers/docker/TestJFREvents.java           Passed. Execution successful
containers/docker/TestJFRNetworkEvents.java    Passed. Execution successful
containers/docker/TestJcmdWithSideCar.java     Passed. Execution successful
containers/docker/TestMemoryAwareness.java     Passed. Execution successful
containers/docker/TestMemoryWithCgroupV1.java  Passed. Execution successful
containers/docker/TestMisc.java                Passed. Execution successful
containers/docker/TestPids.java                Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Limit value 9366 is not accepted as unlimited, log line was [0.036s][trace][os,container] Maximum number of tasks is: 9366

Test containers/docker/TestCPUAwareness.java fails because of JDK-8282684. I also encountered this issue In JDK17.

Test containers/docker/TestPids.java fails in JDK21 and JDK17 as well where the fix persists already.

GHA Sanity Checks passed


Progress

  • [x] Change must not contain extraneous whitespace
  • [x] Commit message must refer to an issue
  • [ ] JDK-8347129 needs maintainer approval

Warning

 ⚠️ Found leading lowercase letter in issue title for 8347129: cpuset cgroups controller is required for no good reason

Issue

  • JDK-8347129: cpuset cgroups controller is required for no good reason (Bug - P3 - Requested)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/3109/head:pull/3109
$ git checkout pull/3109

Update a local copy of the PR:
$ git checkout pull/3109
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/3109/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3109

View PR using the GUI difftool:
$ git pr show -t 3109

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/3109.diff

Using Webrev

Link to Webrev Comment

antonvoznia avatar Oct 31 '25 15:10 antonvoznia

:wave: Welcome back antonvoznia! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Oct 31 '25 15:10 bridgekeeper[bot]

@antonvoznia This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8347129: cpuset cgroups controller is required for no good reason

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 12 new commits pushed to the master branch:

  • 912a12be6407be18a27df70d9954cfdf3e5f009c: 8357657: [11u][windows] cannot stat '/jdk.crypto.ec/*': No such file or directory
  • 2eaffb06d518efcac3fa20b0644b8beddb01aed7: 8264524: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails due to swapping not working
  • c3be801561125d7abe7edb6c9595b123420f71ce: 8295301: Problem list TrayIcon tests that fail on Ubuntu 22.04
  • ... and 9 more: https://git.openjdk.org/jdk11u-dev/compare/94dfb3e3d22a064a83c533ab7d7504b432fad02f...master

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 /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

openjdk[bot] avatar Oct 31 '25 15:10 openjdk[bot]

This backport pull request has now been updated with issue from the original commit.

openjdk[bot] avatar Oct 31 '25 15:10 openjdk[bot]

This backport pull request has now been updated with issue from the original commit.

openjdk[bot] avatar Oct 31 '25 15:10 openjdk[bot]

⚠️ @antonvoznia This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

openjdk[bot] avatar Oct 31 '25 15:10 openjdk[bot]

/approval request Clean backport, tested locally and with GHA Sanity Checks. Few tests failed, but it's not related to the backport.

antonvoznia avatar Oct 31 '25 15:10 antonvoznia

@antonvoznia 8347129: The approval request has been created successfully.

openjdk[bot] avatar Oct 31 '25 15:10 openjdk[bot]

Webrevs

mlbridge[bot] avatar Oct 31 '25 15:10 mlbridge[bot]

:warning: @antonvoznia the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout JDK-8347129-container-detection-fixes
$ git commit --author='Preferred Full Name <[email protected]>' --allow-empty -m 'Update full name'
$ git push

openjdk[bot] avatar Nov 11 '25 11:11 openjdk[bot]

Test containers/docker/TestCPUAwareness.java fails because of JDK-8282684.

I'm pretty sure the test fails because of JDK-8370492 on F43. JDK-8282684 is the reason why it doesn't show up for JDK 17+ (i.e. isn't tested there, but the issue exists).

jerboaa avatar Nov 11 '25 11:11 jerboaa

@jerboaa thank you for the note.

In my case the test failed TestCPUAwareness.java because of "java.lang.RuntimeException: 'active_processor_count.*1' missing from stdout/stderr "

The test expects one active processor count, but the actual value is two: [0.002s][trace][os,container] CgroupSubsystem::active_processor_count (cached): 2

Does the cpushare affect the active processor count number?

antonvoznia avatar Nov 13 '25 11:11 antonvoznia

Does the cpushare affect the active processor count number?

For JDK 17 and below it does, yes. It's using -XX:+UseContainerCpuShares.

jerboaa avatar Nov 13 '25 14:11 jerboaa

@jerboaa I see, thanks

antonvoznia avatar Nov 13 '25 14:11 antonvoznia

/integrate

antonvoznia avatar Nov 13 '25 14:11 antonvoznia

@antonvoznia Your change (at version c29a6caed30cd7c2ccca1266982b8fa3917975e3) is now ready to be sponsored by a Committer.

openjdk[bot] avatar Nov 13 '25 14:11 openjdk[bot]

/sponsor

phohensee avatar Nov 13 '25 22:11 phohensee

Going to push as commit 9b9babc0d926d522da379b8b60f56d336a7974de. Since your change was applied there have been 12 commits pushed to the master branch:

  • 912a12be6407be18a27df70d9954cfdf3e5f009c: 8357657: [11u][windows] cannot stat '/jdk.crypto.ec/*': No such file or directory
  • 2eaffb06d518efcac3fa20b0644b8beddb01aed7: 8264524: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails due to swapping not working
  • c3be801561125d7abe7edb6c9595b123420f71ce: 8295301: Problem list TrayIcon tests that fail on Ubuntu 22.04
  • ... and 9 more: https://git.openjdk.org/jdk11u-dev/compare/94dfb3e3d22a064a83c533ab7d7504b432fad02f...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Nov 13 '25 22:11 openjdk[bot]

@phohensee @antonvoznia Pushed as commit 9b9babc0d926d522da379b8b60f56d336a7974de.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar Nov 13 '25 22:11 openjdk[bot]