RFR: 8292083: Detected container memory limit may exceed physical machine memory [v3]

Severin Gehwolf sgehwolf at openjdk.org
Wed Aug 17 14:50:15 UTC 2022


On Wed, 17 Aug 2022 12:58:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Jonathan Dowland has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   restructure conditions for legibility
>>   
>>    * split assignment to mem_limit from reading it
>>    * nest if expressions to avoid comparing mem_limit twice
>
> src/hotspot/os/linux/osContainer_linux.cpp line 74:
> 
>> 72:     log_trace(os, container)("Container memory limit exceeded or equal to physical"
>> 73:                              " memory! container mem: " JLONG_FORMAT ", host mem: " JLONG_FORMAT,
>> 74:                              mem_limit, host_memory);
> 
> Not sure we need the exclamation mark :-) and I'd reduce this to one line. 
> 
> Unless Severin objects, I would however make this at least debug, maybe even info, mirroring above branch. This section gets executed exactly once, so there is no danger of drowning in output.

All fine suggestions. As to reduce to one line: It's fine as long as we get detected limits and physical host mem printed in traces. That's really the only thing to go by when strange things happen in the wild.

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

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


More information about the hotspot-runtime-dev mailing list