RFR: 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
Ioi Lam
iklam at openjdk.java.net
Wed Jan 12 07:54:49 UTC 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.
-------------
Commit messages:
- 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
Changes: https://git.openjdk.java.net/jdk/pull/7043/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7043&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8278951
Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod
Patch: https://git.openjdk.java.net/jdk/pull/7043.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7043/head:pull/7043
PR: https://git.openjdk.java.net/jdk/pull/7043
More information about the hotspot-runtime-dev
mailing list