Skip to content
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

8253714: [cgroups v2] Soft memory limit incorrectly using memory.high #381

Closed

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented Sep 28, 2020

Tests using --memory-reservation started to fail with newer crun cgroups v2-capable runtime. It turns out it was incorrectly setting memory.high in an early version and got fixed to set memory.low now instead. This change accounts for that.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8253714: [cgroups v2] Soft memory limit incorrectly using memory.high

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/381/head:pull/381
$ git checkout pull/381

@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 28, 2020

@bobvandette Could you please take a look? Thanks!

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 28, 2020

👋 Welcome back sgehwolf! 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.

@openjdk openjdk bot added the rfr label Sep 28, 2020
@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@jerboaa The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot-runtime core-libs labels Sep 28, 2020
@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 28, 2020

Note that due to JDK-8253727 not all tests are passing with newer crun runtime (0.8 was last working for me).

@mlbridge
Copy link

mlbridge bot commented Sep 28, 2020

Webrevs

@jerboaa jerboaa force-pushed the jdk-8253714-memory-soft-limit branch from 5d86d60 to 25d131d Compare Sep 28, 2020
@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 28, 2020

Note that due to JDK-8253727 not all tests are passing with newer crun runtime (0.8 was last working for me).

All cgroups v2 container tests pass with #384 and this one on crun 0.15.

@bobvandette
Copy link
Contributor

bobvandette commented Sep 28, 2020

@bobvandette Could you please take a look? Thanks!

I just verified that using --memory-reservation using my crun version 0.11.42 does result in memory.low being set to the reservation value.

adinn
adinn approved these changes Sep 29, 2020
Copy link
Contributor

@adinn adinn left a comment

Looks fine to me, especially if Bob says it's ok.

@openjdk
Copy link

openjdk bot commented Sep 29, 2020

@jerboaa 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 more details.

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

8253714: [cgroups v2] Soft memory limit incorrectly using memory.high

The early implementation of cgroups v2 support was done with
crun 0.8 and it contained a bug which set memory.high over
memory.low when --memory-reservation was being used as a CLI
option.

This bug has been fixed in later crun versions, starting with
crun 0.11. Use memory.low in OpenJDK as well.

Reviewed-by: bobv, adinn

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

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Sep 29, 2020
@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 29, 2020

Looks fine to me, especially if Bob says it's ok.

Thanks for the review, Andrew!

@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 29, 2020

/summary
The early implementation of cgroups v2 support was done with
crun 0.8 and it contained a bug which set memory.high over
memory.low when --memory-reservation was being used as a CLI
option.

This bug has been fixed in later crun versions, starting with
crun 0.11. Use memory.low in OpenJDK as well.

@openjdk
Copy link

openjdk bot commented Sep 29, 2020

@jerboaa Setting summary to:

The early implementation of cgroups v2 support was done with
crun 0.8 and it contained a bug which set memory.high over
memory.low when --memory-reservation was being used as a CLI
option.

This bug has been fixed in later crun versions, starting with
crun 0.11. Use memory.low in OpenJDK as well.

@jerboaa
Copy link
Contributor Author

jerboaa commented Sep 29, 2020

/integrate

@openjdk openjdk bot closed this Sep 29, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 29, 2020
@openjdk
Copy link

openjdk bot commented Sep 29, 2020

@jerboaa Since your change was applied there have been 21 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit ff6843c.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs hotspot-runtime integrated
3 participants