[jdk25u-dev] RFR: 8370572: Cgroups hierarchical memory limit is not honored after JDK-8322420
Aleksey Shipilev
shade at openjdk.org
Mon Dec 15 13:28:30 UTC 2025
On Mon, 15 Dec 2025 12:56:16 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp line 169:
>>
>>> 167: CONTAINER_READ_NUMBER_CHECKED(reader(), "/memory.limit_in_bytes", "Memory Limit", memlimit);
>>> 168: if (memlimit >= phys_mem) {
>>> 169: if (uses_mem_hierarchy()) {
>>
>> I understand you want a more defensive fix. But I don't think we want to diverge from mainline, really: this just creates another code shape that would be a headache for future maintenance and backports. Unless I don't see a hidden problem somewhere here?
>>
>> FWIW, we picked up the mainline version in Corretto 25 and it works fine:
>> https://github.com/corretto/corretto-25/commit/d38805b294493ad7a7e582286d64a874121417f8
>
>> I understand you want a more defensive fix. But I don't think we want to diverge from mainline, really: this just creates another code shape that would be a headache for future maintenance and backports. Unless I don't see a hidden problem somewhere here?
>
> Mainline uses the same pattern, so there is no divergence:
> https://github.com/openjdk/jdk/blob/629bf20f59f98a735ca22018ad00c93580aff5f3/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp#L164-L170
I am confused. Isn't it visibly different code? What do you mean by "no divergence"? For me, no divergence means the code in this PR repeats what is/was mainline at some point. The version you have in this PR never existed in mainline, AFAICS: neither after JDK-8370573, nor after JDK-8365606. And if it did not existed, it means we have not tested it; that's the risk we are running into here.
-------------
PR Review Comment: https://git.openjdk.org/jdk25u-dev/pull/76#discussion_r2619431687
More information about the jdk-updates-dev
mailing list