[jdk11u-dev] RFR: 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy [v8]
Zhengyu Gu
zgu at openjdk.java.net
Thu Mar 17 17:40:09 UTC 2022
On Thu, 17 Mar 2022 17:06:22 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> This is a followup backport for Cgroup v2 support.
>>
>> The original patch does not apply cleanly, due to context differences and some of out-of-order backports, conflicts were resolved manually.
>>
>> In additional:
>>
>> 1) Include partial backport of JDK-8250627.
>> - Renamed `Metrics.c` => `CgroupMetrics.c`
>> - Added native method `isUseContainerSupport()` to `CgroupMetrics.java`
>> - Return instance only if `isUseContainerSupport()` is enabled.
>>
>> 2) Add `createTempDirectory()` method to `test/lib/jdk/test/lib/Utils.java` for `TestCgroupSubsystemController.java` test
>>
>> 3) Add `import jdk.test.lib.process.OutputAnalyzer;` to `TestDockerMemoryMetrics.java`
>>
>> Test:
>>
>> - [x] jtreg containers/docker test on Ubuntu 20.04.4 LTS
>> - [x] jdk/internal/platform/cgroup on Ubuntu 20.04.4 LTS
>> - [x] jdk/internal/platform/docker on Ubuntu 20.04.4 LTS
>
> Zhengyu Gu has updated the pull request incrementally with eight additional commits since the last revision:
>
> - Merge
> - Merge branch 'master' into backport-8230305-cgroup-v2
> - 8223396: [TESTBUG] several jfr tests do not clean up files created in /tmp
>
> Using test utils to create temp files and directories
>
> Reviewed-by: sgehwolf
> Backport-of: 7d3aebccc0b90aa2ca2f656c683fa5931fd0ed3a
> - 8247592: refactor test/jdk/tools/launcher/Test7029048.java
>
> Reviewed-by: phh
> Backport-of: 8b87402a4409b345b820207dcd2aec720a23325b
> - 8166727: javac crashed: [jimage.dll+0x1942] ImageStrings::find+0x28
>
> Backport-of: a8005efde388821e39e6464dbb17fbeac3c9830a
> - 8279356: Method linking fails with guarantee(mh->adapter() != NULL) failed: Adapter blob must already exist!
>
> Reviewed-by: phh
> Backport-of: 6d7db4b0b3e9172645cef12c36fbeb41a6d38d83
> - 8199874: [TESTBUG] runtime/Thread/ThreadPriorities.java fails with "expected 0 to equal 10"
>
> Backport-of: 0d9f615e9214ed6f1f69f6e7969e966005948eb3
> - 8207364: nsk/jvmti/ResourceExhausted/resexhausted003 fails to start
>
> Backport-of: 31cf8b1c65fb0b19e093547fc557fff55d7213bd
> A few more fix-ups are needed (see also inline comments):
> > 3. `PlainRead.java` would need to get the `-2` added as a "good" value. Like here: [openjdk/jdk at 01875677#diff-fb4f4dbf8943e1dcfd1663922c16f9ed3db403c070bd50979680ec5303756674R48](https://github.com/openjdk/jdk/commit/01875677#diff-fb4f4dbf8943e1dcfd1663922c16f9ed3db403c070bd50979680ec5303756674R48) It's part of the original JDK-8250984 fix, but wasn't part of the 11 backport when it was done. So we should add it with this backport.
Even with this change, the test still failed.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/863
More information about the jdk-updates-dev
mailing list