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

List:       openjdk-serviceability-dev
Subject:    Integrated: 8293540: [Metrics] Incorrectly detected resource limits with additional cgroup fs mounts
From:       Severin Gehwolf <sgehwolf () openjdk ! org>
Date:       2022-09-30 8:48:35
Message-ID: A3aAd8Bk52jpvZ96RQcr3C1gUuSbNnI16NXYvIvURVg=.9f78f1d7-47ef-4ecd-a5bb-11817792e84f () github ! com
[Download RAW message or body]

On Tue, 13 Sep 2022 13:06:10 GMT, Severin Gehwolf <sgehwolf@openjdk.org> wrote:

> Similar issue to the hotspot change discussed in \
> https://bugs.openjdk.org/browse/JDK-8293472. The Java metrics implementation may \
> get the resource limits wrong if there are additional cgroup fs mounts. Apparently \
> that's more common than one might think. I've reproduced this with these existing \
> tests on cg v2: 
> 
> test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
> test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java
> test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java 
> 
> 
> I've also added `test/jdk/jdk/internal/platform/docker/TestDockerBasic.java` and \
> amended `test/jdk/jdk/internal/platform/cgroup/TestCgroupSubsystemFactory.java` \
> which unconditionally fails (irrespective of cgroup version in use). The fix is \
> fairly straight forward and is an extension which we already do for the `cpuset` \
> controller: Allow duplicates, and if there are any prefer those mounted at \
> `/sys/fs/cgroup`. 
> Testing:
> - [x] fastdebug build on cgroups v2 and cgroups v1 (before and after the product \
>                 fix)
> - [x] added tests fail before, pass after the product fix.
> - [x] Some manual testing using `cgcreate` and `cgexec` on cg1 and cg2. Still pass. \
>                 
> - [x] GHA all pass.
> 
> Please review! Many thanks in advance.

This pull request has now been integrated.

Changeset: 6d83482a
Author:    Severin Gehwolf <sgehwolf@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6d83482a6b5f1898514fd450d8143dbfef57e362
                
Stats:     181 lines in 6 files changed: 143 ins; 23 del; 15 mod

8293540: [Metrics] Incorrectly detected resource limits with additional cgroup fs \
mounts

Reviewed-by: iklam

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

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


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

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