[jdk21u-dev] RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container

Matthias Baesken mbaesken at openjdk.org
Tue May 6 15:03:15 UTC 2025


On Wed, 16 Apr 2025 10:31:35 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

> A patch 3 of 6 for: [[21u] Backport intention of 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected](https://mail.openjdk.org/pipermail/jdk-updates-dev/2025-April/043206.html)
> 
> It has a patch dependency on PR 2 of 6: https://github.com/openjdk/jdk21u-dev/pull/1660
> 
> This backport is clean. But it contains an additional oneliner (by Yuri Nesterenko):
> 
> make/data/hotspot-symbols/symbols-linux:
> +JVM_IsContainerized
> 
> as otherwise the build would fail with:
> 
> src/java.base/linux/native/libjava/CgroupMetrics.c:42:(.text+0x11): undefined reference to `JVM_IsContainerized'
> 
> This oneliner was not needed in JDK24 as there is [JDK-8017234: Hotspot should stop using mapfiles](https://bugs.openjdk.org/browse/JDK-8017234).
> 
> The whole patchset has been tested on CentOS-7.9 (for cgroup v1) and on Fedora 40 (for cgroup v2) for test/hotspot/jtreg/containers.

Marked as reviewed by mbaesken (Reviewer).

The  `test/hotspot/jtreg/ProblemList.txt`  change from jdk head is missing but it seems to be unneeded in 21 because it is not there;  otherwise looks clean and okay.

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

PR Review: https://git.openjdk.org/jdk21u-dev/pull/1661#pullrequestreview-2818621745
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1661#issuecomment-2854895189


More information about the jdk-updates-dev mailing list