-
Bug
-
Resolution: Fixed
-
P4
-
openjdk8u292, 13, 14
-
b13
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8231408 | 13.0.2 | Matthias Baesken | P4 | Resolved | Fixed | b02 |
JDK-8264764 | 11.0.12-oracle | Vaibhav Choudhary | P4 | Resolved | Fixed | b01 |
JDK-8231886 | 11.0.6 | Matthias Baesken | P4 | Resolved | Fixed | b01 |
JDK-8258829 | openjdk8u292 | Severin Gehwolf | P4 | Resolved | Fixed | b01 |
JDK-8261150 | 8u361 | Ivan Bereziuk | P4 | Closed | Duplicate | b02 |
Failures look like :
java.lang.RuntimeException: Test failed for - memory:getMemoryUsage, expected [56019386368], got [56200986624]
at jdk.test.lib.containers.cgroup.MetricsTester.fail(MetricsTester.java:207)
at jdk.test.lib.containers.cgroup.MetricsTester.testMemoryUsage(MetricsTester.java:597)
at TestCgroupMetrics.main(TestCgroupMetrics.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:830)
Looking at the coding in MetricsTester.java we expect that “memory.usage_in_bytes” gets larger after an additional allocation of 64 M.
However this is sometimes not the case. The reason is not fully clear.
Might be that a GC kicked in and freed space; or for some reasons OS pages were freed.
Maybe also the "memory.usage_in_bytes” counter is not so reliable (by design? or bug ?) .
Coding from MetricsTester.java :
public void testMemoryUsage() throws Exception {
Metrics metrics = Metrics.systemMetrics();
long memoryMaxUsage = metrics.getMemoryMaxUsage();
long memoryUsage = metrics.getMemoryUsage();
byte[] bb = new byte[64*1024*1024]; // 64M - here we expect an increase of memory.usage_in_bytes
long newMemoryMaxUsage = metrics.getMemoryMaxUsage();
long newMemoryUsage = metrics.getMemoryUsage();
if(newMemoryMaxUsage < memoryMaxUsage) {
fail(SubSystem.MEMORY, "getMemoryMaxUsage", newMemoryMaxUsage,
memoryMaxUsage);
}
if(newMemoryUsage < memoryUsage) {
fail(SubSystem.MEMORY, "getMemoryUsage", newMemoryUsage, memoryUsage); // line 597 triggers the failure in MetricsTester.java
}
}
probably we should make the test more reliable and add a little loop with allocations (and do not fail on the first one) .
- backported by
-
JDK-8231408 [TESTBUG] jdk/internal/platform/cgroup/TestCgroupMetrics.java fails for - memory:getMemoryUsage
- Resolved
-
JDK-8231886 [TESTBUG] jdk/internal/platform/cgroup/TestCgroupMetrics.java fails for - memory:getMemoryUsage
- Resolved
-
JDK-8258829 [TESTBUG] jdk/internal/platform/cgroup/TestCgroupMetrics.java fails for - memory:getMemoryUsage
- Resolved
-
JDK-8264764 [TESTBUG] jdk/internal/platform/cgroup/TestCgroupMetrics.java fails for - memory:getMemoryUsage
- Resolved
-
JDK-8261150 [TESTBUG] jdk/internal/platform/cgroup/TestCgroupMetrics.java fails for - memory:getMemoryUsage
- Closed
- relates to
-
JDK-8292206 TestCgroupMetrics.java fails as getMemoryUsage() is lower than expected
- Resolved