RFR: 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist [v4]

Severin Gehwolf sgehwolf at openjdk.java.net
Mon Sep 28 10:44:01 UTC 2020


On Mon, 28 Sep 2020 09:14:21 GMT, Volker Simonis <simonis at openjdk.org> wrote:

>> Hi,
>> 
>> can I please have a review (or an idea for a better fix) for this PR?
>> 
>> If a tool like [cpuset](https://github.com/lpechacek/cpuset) is used to manually create and manage
>> [cpusets](https://man7.org/linux/man-pages/man7/cpuset.7.html) the cgroups detections will be confused and crash in a
>> debug build or behave unexpectedly in a product build.  The problem is that the additionally mounted cpuset will be
>> interpreted as if it was belonging to Cgroup controller: $ grep cgroup /proc/self/mountinfo
>> 36 25 0:30 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:9 - tmpfs tmpfs ro,mode=755
>> 49 36 0:43 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:23 - cgroup cgroup rw,memory
>> 50 36 0:44 / /sys/fs/cgroup/rdma rw,nosuid,nodev,noexec,relatime shared:24 - cgroup cgroup rw,rdma
>> ...
>> 43 36 0:37 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,cpuset
>> 121 32 0:37 / /cpusets rw,relatime shared:69 - cgroup none rw,cpuset
>> The current fix solves this problem for manually created cpusets which don't have a "mount source" but this is yet
>> another heuristic. I'm open to better solutions for detecting cpusets which don't don't belong to a Cgroup.
>> Thanks,
>> Volker
>
> Volker Simonis has refreshed the contents of this pull request, and previous commits have been removed. The incremental
> views will show differences compared to the previous content of the PR. The pull request contains one new commit since
> the last revision:
>   8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist

Looks fine to me. Thanks for your patience!

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

Marked as reviewed by sgehwolf (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/295


More information about the hotspot-runtime-dev mailing list