Might be a ContainerSupport issue on macOS Docker Engine

Severin Gehwolf sgehwolf at redhat.com
Wed Aug 24 11:53:09 UTC 2022


Hi,

The code in JDK 17 and JDK 8 isn't 100% aligned. So it's hard to say.
Please check which cgroups version is in use. Best to try with JDK 17
using '-XshowSettings:system' switch when spawning the app. That should
give some clues.

For example the output here looks like this (note the 'Provider:'
section):

Operating System Metrics:
    Provider: cgroupv1
    Effective CPU Count: 8
    CPU Period: 100000us
    CPU Quota: -1
    CPU Shares: -1
    List of Processors, 8 total: 
    0 1 2 3 4 5 6 7 
    List of Effective Processors, 8 total: 
    0 1 2 3 4 5 6 7 
    List of Memory Nodes, 1 total: 
    0 
    List of Available Memory Nodes, 1 total: 
    0 
    Memory Limit: Unlimited
    Memory Soft Limit: Unlimited
    Memory & Swap Limit: Unlimited
    Maximum Processes Limit: Unlimited

openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8, mixed mode, sharing)

I'd expect for the affected system to be a cgroups v2 system, which
isn't supported in JDK 8u (yet). See:
https://bugs.openjdk.org/browse/JDK-8230305


On Wed, 2022-08-24 at 18:52 +0900, Plenty Su wrote:
> 
> I checked the cgroup files in the container. For example, 
> ```
> # cat /sys/fs/cgroup/memory.max
> 1073741824
> ```

memory.max is a cgroups v2 interface file. That suggests whatever macOS
Docker Engine does, it uses some Linux with cgv2 underneath.

HTH.

Thanks,
Severin



More information about the jdk8u-dev mailing list