RFR: 8278951: containers/cgroup/PlainRead.java fails on Ubuntu 21.10
Harold Seigel
hseigel at openjdk.java.net
Wed Jan 12 21:41:26 UTC 2022
On Wed, 12 Jan 2022 07:17:51 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> 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.
Changes look good.
Thanks! Harold
-------------
Marked as reviewed by hseigel (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7043
More information about the hotspot-runtime-dev
mailing list