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

8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10 #7043

Closed

Conversation

iklam
Copy link
Member

@iklam iklam commented Jan 12, 2022

When running on Ubuntu 21.10 (which has cgroupv2 enabled by default) but outside of a container, the VM was printing only this:

[0.114s][debug][os,container] 
   Open of file /sys/fs/cgroup/user.slice/user-529964.slice/session-1168.scope/cpu.weight failed,
   No such file or directory

After my fix, this is also printed to make the PlainRead.java test happy:

[0.114s][trace][os,container] Raw value for CPU Shares is: -2

Note that the GET_CONTAINER_INFO_CPTR and GET_CONTAINER_INFO_LINE macros still don't print the trace log when the requested file doesn't exist. I don't know whether I should change them or not. Since no tests seem to look for such a such a log message, I'll leave the code as-is for now.


Progress

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

Issue

  • JDK-8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7043/head:pull/7043
$ git checkout pull/7043

Update a local copy of the PR:
$ git checkout pull/7043
$ git pull https://git.openjdk.java.net/jdk pull/7043/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 7043

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7043.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 12, 2022

👋 Welcome back iklam! 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
Copy link

openjdk bot commented Jan 12, 2022

@iklam The following label will be automatically applied to this pull request:

  • hotspot-runtime

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

@openjdk openjdk bot added the hotspot-runtime label Jan 12, 2022
@iklam iklam marked this pull request as ready for review Jan 12, 2022
@openjdk openjdk bot added the rfr label Jan 12, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 12, 2022

Webrevs

Copy link
Member

@hseigel hseigel left a comment

Changes look good.
Thanks! Harold

@openjdk
Copy link

openjdk bot commented Jan 12, 2022

@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:

8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10

Reviewed-by: hseigel, 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 25 new commits pushed to the master branch:

  • b61a4af: 8259774: Deprecate -XX:FlightRecorderOptions:samplethreads
  • 6933934: 8278597: Remove outdated comments regarding RMISecurityManager in HotSpotAgent.java
  • 4851948: 8279903: Redundant modulo operation in ECDHKeyAgreement
  • 67e3d51: Merge
  • 5aecb37: 8206181: ExceptionInInitializerError: improve handling of exceptions in user-provided taglets
  • 86d0abb: 8279695: [TESTBUG] modify compiler/loopopts/TestSkeletonPredicateNegation.java to run on C1 also
  • 6d7db4b: 8279356: Method linking fails with guarantee(mh->adapter() != NULL) failed: Adapter blob must already exist!
  • 92307e5: 8278489: Preserve result in native wrapper with +UseHeavyMonitors
  • bbc1ddb: 8278267: ARM32: several vector test failures for ASHR
  • cb25029: 8279800: isAssignableFrom checks in AlgorithmParametersSpi.engineGetParameterSpec appear to be backwards
  • ... and 15 more: https://git.openjdk.java.net/jdk/compare/3aaa0982d8c1735208a331b0097a5aea4a1fef5a...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 label Jan 12, 2022
Copy link
Contributor

@jerboaa jerboaa left a comment

Looks fine to me.

Note: I first wondered whether we needed to handle a OSCONTAINER_ERROR value in CgroupV2Subsystem::cpu_shares() but we don't as in that case the function returns early (-2) and CgroupSubsystem::active_processor_count() handles negative values appropriately.

@iklam
Copy link
Member Author

iklam commented Jan 13, 2022

Hi @hseigel and @jerboaa thanks for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Jan 13, 2022

Going to push as commit 35172cd.
Since your change was applied there have been 30 commits pushed to the master branch:

  • 237f861: 8273143: Transition to _thread_in_vm when handling a polling page exception
  • 9209e6d: 8279877: Document IDEA IDE setup in docs/ide.md
  • 0a839b4: 8279801: EC KeyFactory and KeyPairGenerator do not have aliases for OID format
  • 6fcaa32: 8262442: (windows) Use all proxy configuration sources when java.net.useSystemProxies=true
  • c17a012: 8278961: Enable debug logging in java/net/DatagramSocket/SendDatagramToBadAddress.java
  • b61a4af: 8259774: Deprecate -XX:FlightRecorderOptions:samplethreads
  • 6933934: 8278597: Remove outdated comments regarding RMISecurityManager in HotSpotAgent.java
  • 4851948: 8279903: Redundant modulo operation in ECDHKeyAgreement
  • 67e3d51: Merge
  • 5aecb37: 8206181: ExceptionInInitializerError: improve handling of exceptions in user-provided taglets
  • ... and 20 more: https://git.openjdk.java.net/jdk/compare/3aaa0982d8c1735208a331b0097a5aea4a1fef5a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Jan 13, 2022
@openjdk openjdk bot closed this Jan 13, 2022
@openjdk openjdk bot removed ready rfr labels Jan 13, 2022
@openjdk
Copy link

openjdk bot commented Jan 13, 2022

@iklam Pushed as commit 35172cd.

💡 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
hotspot-runtime integrated
4 participants