-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8292206: TestCgroupMetrics.java fails as getMemoryUsage() is lower than expected #11734
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
8292206: TestCgroupMetrics.java fails as getMemoryUsage() is lower than expected #11734
Conversation
|
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
Note: theoretically other test scenarios can also fail for the same reason, but we've never seen them fail in our CI pipeline https://github.com/openjdk/jdk/blob/ba942c24e8894f4422870fb53253f5946dc4f0d1/test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java (see lines L250-L254)
|
dholmes-ora
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.
Removing this seems reasonable. Thanks for the explanation.
|
@iklam 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 63 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. ➡️ To integrate this PR with the above commit message to the |
I disagree. It seems useful in the docker/container case as there are APIs in the JDK reporting those metrics and it wouldn't be tested otherwise. Note that this test is also being used by
That's what the above mentioned |
…tside of container
Thanks for your review. I've disabled the |
jerboaa
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.
Looks good, thanks!
|
Thanks @jerboaa and @dholmes-ora for the review. Tested with tier5 container tests in our CI. /integrate |
|
Going to push as commit 6ccee83.
Your commit was automatically rebased without conflicts. |
The
testMemoryUsage()test scenario queries the total memory usage of all processes of the current Linux user, including other concurrently running jtreg test cases. Even if the current process allocates 256MB of ram, it's possible for other dying processes to release much more than that amount. Therefore, it's not possible to guarantee thatMetrics.getMemoryUsage()would return a higher number.I am removing this test scenario for now as I don't see it providing any actual value.
If we want to have more in-depth functional tests for the
Metrics.getMemoryXXX()APIs, we need to do it inside a container in a more controlled setting.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11734/head:pull/11734$ git checkout pull/11734Update a local copy of the PR:
$ git checkout pull/11734$ git pull https://git.openjdk.org/jdk pull/11734/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11734View PR using the GUI difftool:
$ git pr show -t 11734Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11734.diff