RFR: 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
Volker Simonis
simonis at openjdk.java.net
Wed Sep 23 09:18:47 UTC 2020
On Wed, 23 Sep 2020 08:59:37 GMT, Volker Simonis <simonis at openjdk.org> wrote:
>> Did you run container tests with this?
>
>> Did you run container tests with this?
>
> Yes. It took me some time to find out that I have to set `-Djdk.test.docker.image.name=ubuntu` and
> `-Djdk.test.docker.image.version=18.04` on Ubuntu in order to run them :)
> For release builds they all pass with and without the change (except `TestJFRWithJMX.java` which always fails, but I
> don' t think that's related to this issue). Fast- and slowdebug builds don't even start without the fix and pass all
> the tests with it (again except `TestJFRWithJMX.java`).
> _Mailing list message from [Bob Vandette](mailto:bob.vandette at oracle.com) on
> [hotspot-runtime-dev](mailto:hotspot-runtime-dev at openjdk.java.net):_
> Yuk. I just fixed a bug which caused us to use the mount source for the cgroup type. Not fixing
> that bug would have hidden your problem.
>
Sorry, but I don't understand. which bug are you speaking of and has it been fixed in the jdk already?
> Are there any hints in /proc/self/cgroup or /proc/self/mounts that we could use to eliminate this manual mount?
>
Not that I'm aware of. I couldn't find any.
> I?d be tempted to eliminate mountinfo entries that are 1) duplicate controllers and 2) not in ?/sys/fs/cgroup? mount
> point.
It's not easy to remove the right duplicate :)
Checking for `/sys/fs/cgroup` as mount point is probably safer although that path is also just a convention as far as I
know.
So what about the following solution:
- record the mount point for `memory`, `cpu` and `cpuacct`
- when hitting `cpuset` and its mountpoint is different from the recorded one ignore it. If there's no recorded mount
prefix ignore the entry if its mount prefix is not `/sys/fs/cgroup`.
I think this is the best we can do if we don't want to parse `mountinfo` two times.
What do you think?
> Bob.
-------------
PR: https://git.openjdk.java.net/jdk/pull/295
More information about the hotspot-runtime-dev
mailing list