RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v5]

Severin Gehwolf sgehwolf at openjdk.org
Mon Nov 25 09:47:16 UTC 2024


On Fri, 22 Nov 2024 15:08:18 GMT, Sergey Chernyshev <schernyshev at openjdk.org> wrote:

> > One thing to note is that the new test requires root privileges (AFAIK). We should skip the test if we are being run as root.
> 
> The test works just like other docker tests, root privileges are not required. In systems that can't run docker for any reason, it should be skipped.

The new tests directly write into the cgroup interface files (does away with relying on the container framework doing it). For example:


"echo '+memory' > /sys/fs/cgroup/memory/cgroup.subtree_control ; "


... relies on the user in the container image to be `root`. So depending on which base image is being used - by means of `-Djdk.test.docker.image.name=XXX -Djdk.test.docker.image.version=XX` - it might fail unexpectedly with permission errors.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21808#issuecomment-2497440576


More information about the core-libs-dev mailing list