RFR: 8264524: jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails due to swapping not working [v2]
Severin Gehwolf
sgehwolf at openjdk.java.net
Tue Apr 6 12:31:35 UTC 2021
On Fri, 2 Apr 2021 04:03:45 GMT, Jie Fu <jiefu at openjdk.org> wrote:
>> Hi all,
>>
>> jdk/internal/platform/docker/TestDockerMemoryMetrics.java fails on some of our testing platforms.
>> This is because testMemoryFailCount [1] fails due to OOM killed.
>> This test fails to avoid OOM killed [2] if memory.failcnt is always 0.
>>
>> The fix will print "Not OOM killed" if OOM killed doesn't happen.
>> And also fix another bug if the test get returned here [3].
>>
>> Testing:
>> - jdk/internal/platform/docker/ hotspot/jtreg/containers on Linux/x64
>>
>> Thanks.
>> Best regards,
>> Jie
>>
>> [1] https://github.com/openjdk/jdk/blob/master/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java#L80
>> [2] https://github.com/openjdk/jdk/blob/master/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java#L87
>> [3] https://github.com/openjdk/jdk/blob/master/test/jdk/jdk/internal/platform/docker/MetricsMemoryTester.java#L96
>
> Jie Fu has updated the pull request incrementally with one additional commit since the last revision:
>
> Check swapping before testing
Changes requested by sgehwolf (Reviewer).
test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java line 106:
> 104: Common.logNewTestCase("testMemoryFailCount" + value);
> 105:
> 106: // Check whether swapping really works for this test
Please explain what "swapping not working" actually means in this comment. One version of it is already handled via JDK-8250984 so this is sort-of ambiguous. Suggestion: "On some systems there is no swap space enabled. On those systems running `java -version`??? with a memory limit fails due to swap space size being 0". Or something like that.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3286
More information about the hotspot-runtime-dev
mailing list