RFR: 8241354: ZGC still crashes in containers with NUMA due to get_mempolicy is disabled by default

Per Liden pliden at openjdk.java.net
Wed Apr 28 07:24:51 UTC 2021


On Mon, 26 Apr 2021 23:19:46 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> Hi all,
> 
> ZGC still crashes in containers hosting on NUMA machines due to an fatal error [1], which really limits the usage of zgc.
> 
> The reason is that get_mempolicy is blocked by default in dockers [2].
> With the default docker configuration, ZGC will always crash with NUMA.
> 
> Other collectors are also somehow affected by this restriction.
> But unlike zgc, they won't crash and can still work in dockers.
> So we'd better fix this bug as soon as possible since more and more people would like to use zgc.
> 
> The patch was prepared under the guidance of StefanK [3] and many thanks to him.
> And we'd like to provide a user friendly -Xlog:gc+init log in a separate RFE after this issue.
> 
> Testing:
>   - tier1 ~ tier3 on Linux/x64
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp#L64
> [2] https://docs.docker.com/engine/security/seccomp/
> [3] https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-March/028927.html

The approach looks good. However, I'd like to suggest the following adjustments https://github.com/pliden/jdk/commit/9cff734de0f03b4990cab55c7052e3e7f3b6a8f1 on top of this PR, which breaks out the syscall into a separate function and renames a few things.

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

Changes requested by pliden (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3704



More information about the hotspot-gc-dev mailing list