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

8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers #183

Closed
wants to merge 1 commit into from

Conversation

jerboaa
Copy link
Contributor

@jerboaa jerboaa commented Aug 3, 2021

Please review this backport of JDK-8269851 to OpenJDK 11u. That code stream is affected by the same bug and should get fixed in the same way as it got fixed with JDK-8265836 for system CPU load, but for process CPU load.

The patch only differs minimally from the JDK 18 patch, but doesn't apply clean due to the following reason. This version uses getSystemCpuLoad() and getSystemCpuLoad0() instead of getCpuLoad() and getCpuLoad0().

Testing: Manually using the reproducer code from the bug and tier1 on Linux x86_64.

Thoughts?


Progress

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

Issue

  • JDK-8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/183/head:pull/183
$ git checkout pull/183

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 183

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/183.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 3, 2021

👋 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 changed the title Backport 25f00d787cf56f6cdca6949115d04e7d8e675554 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers Aug 3, 2021
@openjdk
Copy link

openjdk bot commented Aug 3, 2021

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 Aug 3, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 3, 2021

Webrevs

Copy link
Contributor

@RealCLanger RealCLanger left a comment

Choose a reason for hiding this comment

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

LGTM. As JDK17 is LTS, it should be backported there, too.

@openjdk
Copy link

openjdk bot commented Aug 3, 2021

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

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

8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers

Reviewed-by: clanger

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

  • 815d3e1: 8267625: AARCH64: typo in LIR_Assembler::emit_profile_type
  • 4da3fb8: 8268261: C2: assert(n != __null) failed: Bad immediate dominator info.

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 Pull request is ready to be integrated label Aug 3, 2021
@jerboaa
Copy link
Contributor Author

jerboaa commented Aug 4, 2021

Thanks for the review. Yes, I'll try to get it into JDK 17 too.

@jerboaa
Copy link
Contributor Author

jerboaa commented Aug 5, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Aug 5, 2021

Going to push as commit 52a32a7.
Since your change was applied there have been 13 commits pushed to the master branch:

  • 1223b58: 8212040: Compilation error due to wrong usage of NSPrintJobDispositionValue in mac10.12
  • b878e3f: 8263432: javac may report an invalid package/class clash on case insensitive filesystems
  • f2240cc: 8221988: add possibility to build with Visual Studio 2019
  • 87e300b: 8220445: Support for side by side MSVC Toolset versions
  • d05effd: 8270893: IndexOutOfBoundsException while reading large TIFF file
  • d900e31: 8211055: Provide print to a file (PDF) feature even when printer was not connected
  • 7751352: 8230808: Remove Access::equals()
  • 35fcac6: 8168304: Make all of DependencyContext_test available in product mode
  • cf2cf25: 8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted
  • 0c783b0: 8257497: Update keytool to create AKID from the SKID of the issuing certificate as specified by RFC 5280
  • ... and 3 more: https://git.openjdk.java.net/jdk11u-dev/compare/05c76978a6954897500c3dc8ac6aeca0f23e57cd...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 5, 2021
@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 Aug 5, 2021
@openjdk
Copy link

openjdk bot commented Aug 5, 2021

@jerboaa Pushed as commit 52a32a7.

💡 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.

2 participants