[11u] RFR: 8250984: Memory Docker tests fail on some Linux kernels w/o cgroupv1 swap limit capabilities

Severin Gehwolf sgehwolf at redhat.com
Wed Oct 21 09:17:03 UTC 2020


Gentle reminder. Anyone?

On Fri, 2020-10-09 at 18:18 +0200, Severin Gehwolf wrote:
> Hi,
> 
> Please review this backport for Oracle 11.0.10 parity. The jdk-jdk
> patch needs to be significantly reworked since JDK 15+ has the cgroups
> v2 patches. The gist of the change is to only report memory values if
> swap accounting is disabled on the system (i.e. no swap memory) for
> metrics which would otherwise report values for memory + swap.
> 
> Here is the list of changes I've done as compared to the JDK 16 patch:
> 
>  * Drop ProblemList.txt hunks. The test was not problem-listed in
>    OpenJDK 11u. It's not applicable.
>  * Dropped hunk in test/hotspot/jtreg/containers/cgroup/PlainRead.java,
>    which also is not applicable (cgroups v2 and later refactorings
>    related).
>  * Moved changes from CgroupV1Subsystem.java to cgroupv1/Metrics.java
>    class. That's where the code lived prior the cgroups v2 addition.
>  * Moved code changes from CgroupV1MemorySubSystemController.java to
>    MemorySubsystem in SubSystem.java
>  * test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
>    adjusted since JDK-8226575 for JDK 11 was different to JDK 15 (no
>    new methods)
>  * MetricsMemoryTester.java the code is again different in JDK 15+
>    because of JDK-8231111. But the changes for this bug only move it
>    into a conditional testing whether swap is enabled and only test if
>    it is.
>  * MetricsTesterCgroupV1 => MetricsTester
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8250984
> webrev: https://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8250984/01/webrev/
> 
> Testing: Container tests on a system with swapaccount=0 and on a system
> with it enabled on Linux x86_64. Tests mentioned in the bug failed
> before, pass after.
> 
> Thoughts?
> 
> Thanks,
> Severin



More information about the core-libs-dev mailing list