RFR: 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist [v3]
Volker Simonis
simonis at openjdk.java.net
Fri Sep 25 08:47:05 UTC 2020
> 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
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/295/files
- new: https://git.openjdk.java.net/jdk/pull/295/files/2949e5fd..7753bc5d
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=295&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=295&range=01-02
Stats: 20 lines in 2 files changed: 9 ins; 8 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/295.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/295/head:pull/295
PR: https://git.openjdk.java.net/jdk/pull/295
More information about the hotspot-runtime-dev
mailing list