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 Pull request is ready for review 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 hotspot-runtime-dev@openjdk.org core-libs core-libs-dev@openjdk.org 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 September 28, 2020 17:18
@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 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.

Copy link
Contributor

@adinn adinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  • d5be829: 8253770: Test tools/javac/parser/JavacParserTest.java fails on Windows after JDK-8253584
  • 6e5d4f3: 8253607: [mlvm] meth/func/jdi/breakpointOtherStratum: un-problemlist and add randomness keyword
  • 3ed960e: 8253640: Make MEMFLAGS an enum class
  • 86491a5: 8253584: Redunant errors for partial member selects
  • ebf443a: 8253590: java/foreign tests are still failing on x86_32 after foreign-memaccess integration
  • 431338b: 8212107: VMThread issues and cleanup
  • 6bddeb7: 8238761: Asynchronous handshakes
  • 6d19fe6: 8253763: ParallelObjectIterator should have virtual destructor
  • 55c90a1: 6514600: AbstractAction can throw NullPointerException when clone()d
  • b659132: 8252888: Collapse G1MMUTracker class hierarchy
  • ... and 11 more: https://git.openjdk.java.net/jdk/compare/ec9bee68660acd6abf0b4dd4023ae69514542256...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.

➡️ 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 Pull request is ready to be integrated 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 Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review 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:

  • d5be829: 8253770: Test tools/javac/parser/JavacParserTest.java fails on Windows after JDK-8253584
  • 6e5d4f3: 8253607: [mlvm] meth/func/jdi/breakpointOtherStratum: un-problemlist and add randomness keyword
  • 3ed960e: 8253640: Make MEMFLAGS an enum class
  • 86491a5: 8253584: Redunant errors for partial member selects
  • ebf443a: 8253590: java/foreign tests are still failing on x86_32 after foreign-memaccess integration
  • 431338b: 8212107: VMThread issues and cleanup
  • 6bddeb7: 8238761: Asynchronous handshakes
  • 6d19fe6: 8253763: ParallelObjectIterator should have virtual destructor
  • 55c90a1: 6514600: AbstractAction can throw NullPointerException when clone()d
  • b659132: 8252888: Collapse G1MMUTracker class hierarchy
  • ... and 11 more: https://git.openjdk.java.net/jdk/compare/ec9bee68660acd6abf0b4dd4023ae69514542256...master

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 core-libs-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants