[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8286212: Cgroup v1 initialization causes NPE on some systems [v3]
From:       Severin Gehwolf <sgehwolf () openjdk ! org>
Date:       2022-07-19 14:22:08
Message-ID: grcB53MECidwDisL8X5U8trdNJVnJeRfZdYwhuBkhwg=.ae494d6f-7a37-4be0-ac62-361a1cac23dd () github ! com
[Download RAW message or body]

On Wed, 18 May 2022 18:14:52 GMT, Severin Gehwolf <sgehwolf@openjdk.org> wrote:

> > Please review this change to the cgroup v1 subsystem which makes it more \
> > resilient on some of the stranger systems. Unfortunately, I wasn't able to \
> > re-create a similar system as the reporter. The idea of using the longest \
> > substring match for the cgroupv1 file paths was based on the fact that on systemd \
> > systems processes run in separate scopes and the maven forked test runner might \
> > exhibit this property. For that it makes sense to use the common ancestor path. \
> > Nothing changes in the common cases where the `cgroup_path` matches `_root` and \
> > when the `_root` is `/` (container the former, host system the latter). 
> > In addition, the code paths which are susceptible to throw NPE have been hardened \
> > to catch those situations. Should it happen in the future it makes more sense (to \
> > me) to not have accurate container detection in favor of continuing to keep \
> > running. 
> > Finally, with the added unit-tests a bug was uncovered on the "substring" match \
> > case of cgroup paths in hotspot. `p` returned from `strstr` can never point to \
> > `_root` as it's used as the "needle" to find in "haystack" `cgroup_path` (not the \
> > other way round). 
> > Testing:
> > - [x] Added unit tests
> > - [x] GHA
> > - [x] Container tests on cgroups v1 Linux. Continue to pass
> 
> Severin Gehwolf has updated the pull request incrementally with two additional \
> commits since the last revision: 
> - Refactor hotspot gtest
> - Separate into function. Fix comment.

It's still on my plate to work on, but priorities keep this pushed to the bottom...

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

PR: https://git.openjdk.org/jdk/pull/8629


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic