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

8292083: Detected container memory limit may exceed physical machine memory #180

Closed
wants to merge 3 commits into from

Conversation

jmtd
Copy link
Contributor

@jmtd jmtd commented Nov 16, 2022

This is a backport of 8292083 for jdk8u-dev cgroups v2 support. It's not clean: context issues, replace the use of some log_debug and log_trace, and an adjustment to Asserts class location for hotspot tests.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8292083: Detected container memory limit may exceed physical machine memory

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 180

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

Using diff file

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

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 16, 2022

👋 Welcome back jdowland! A progress list of the required criteria for merging this PR into pr/179 will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@jmtd
Copy link
Contributor Author

jmtd commented Nov 16, 2022

The test builds and runs for me, and currently fails on my cgroup v2 system with

JavaTest Message: Test threw exception: java.lang.RuntimeException: 'OperatingSystemMXBean.getTotalSwapSpaceSize: [0-9]+' missing from stdout/stderr 

the relevant log line is reporting a negative value

OperatingSystemMXBean.getTotalSwapSpaceSize: -52428800

I will investigate further

@openjdk openjdk bot changed the title Backport f694f8a7671002559e7d23fdb65d5e9c768f9c03 8292083: Detected container memory limit may exceed physical machine memory Nov 16, 2022
@openjdk
Copy link

openjdk bot commented Nov 16, 2022

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Nov 16, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2022

Webrevs

@jerboaa
Copy link
Contributor

jerboaa commented Nov 16, 2022

-52428800

I cannot reproduce on my cg v2 system. Is this a system with swapaccount=0?

@jmtd
Copy link
Contributor Author

jmtd commented Nov 16, 2022

The test runs in a oraclelinux:7.6 container which has glibc 2.17, versus my build machine which has 2.33, so I can't run it as-is. I'd previously aliased the name oraclelinux:7.6 to something with a matching ABI (an Ubuntu image iirc) which explains the discrepancy here.

I'd made a mental note in the past to raise the issue of what was a reasonable baseline libc ABI for jdk8u-dev, and look at backports that change the base image for the tests (I don't think 11u or newer are using oraclelinux:7.6 but ICBW)

If you can run the test and it passes, I'm satisfied :)

@jmtd
Copy link
Contributor Author

jmtd commented Nov 16, 2022

…and running CheckOperatingSystemMXBean locally (not through jtreg, not in the oraclelinux:7.6 container) I see a reasonable value

OperatingSystemMXBean.getTotalSwapSpaceSize: 1023406080

@jerboaa
Copy link
Contributor

jerboaa commented Nov 16, 2022

The test runs in a oraclelinux:7.6 container which has glibc 2.17, versus my build machine which has 2.33, so I can't run it as-is. I'd previously aliased the name oraclelinux:7.6 to something with a matching ABI (an Ubuntu image iirc) which explains the discrepancy here.

Ugh. I'd recommend running tests with -Djdk.test.docker.image.name=<base-image> and -Djdk.test.docker.image.version=<image-version> that matches the JDK build you've done. For example on F37 I use -Djdk.test.docker.image.name=fedora -Djdk.test.docker.image.version=37

I'm surprised this works for you at all ;-)

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Aside: @jmtd Could you please ensure the SystemMetrics fix for macosx of #177 gets into the depending PRs so that we get better GHA results. Thanks!

@jmtd jmtd force-pushed the 8292083-jdk8u-dev branch from f9404e3 to 86c67cf Compare November 18, 2022 10:01
@jmtd
Copy link
Contributor Author

jmtd commented Nov 18, 2022

Aside: @jmtd Could you please ensure the SystemMetrics fix for macosx of #177 gets into the depending PRs so that we get better GHA results. Thanks!

Sure, I've rebased PR's 178, 179 and 180. I think the GitHub view will look askew until the PR/xx branches are updated (by openjdk-bot?)

@openjdk-notifier
Copy link

@jmtd Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 16, 2022

@jmtd This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@jmtd jmtd force-pushed the 8292083-jdk8u-dev branch from 86c67cf to d2a41ed Compare December 19, 2022 11:13
@jmtd jmtd changed the base branch from pr/179 to master December 19, 2022 11:13
@openjdk
Copy link

openjdk bot commented Dec 19, 2022

@jmtd Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk
Copy link

openjdk bot commented Dec 19, 2022

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

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

8292083: Detected container memory limit may exceed physical machine memory

Reviewed-by: sgehwolf

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Dec 19, 2022
Copy link
Contributor

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

@jmtd
Copy link
Contributor Author

jmtd commented Dec 19, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Dec 19, 2022

Going to push as commit b4ef3d3.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 78cdc41: 8234484: Add ability to configure third port for remote JMX

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 19, 2022
@openjdk openjdk bot closed this Dec 19, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 19, 2022
@openjdk
Copy link

openjdk bot commented Dec 19, 2022

@jmtd Pushed as commit b4ef3d3.

💡 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
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

None yet

2 participants