-
Bug
-
Resolution: Fixed
-
P3
-
15
-
b06
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8237440 | 14.0.1 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8237020 | 14 | Matthias Baesken | P3 | Resolved | Fixed | b32 |
JDK-8257210 | 13.0.6 | Ekaterina Vergizova | P3 | Resolved | Fixed | b02 |
JDK-8249896 | 11.0.10-oracle | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8249770 | 11.0.9 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
8226575: OperatingSystemMXBean should be made container aware
we observe failures on linux s390x / ppc64le in the docker related jtreg test
containers/docker/TestMemoryAwareness.java
The test runs into
java.lang.RuntimeException: 'OperatingSystemMXBean.getTotalSwapSpaceSize: 52428800' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:187)
at TestMemoryAwareness.testOperatingSystemMXBeanAwareness(TestMemoryAwareness.java:154)
at TestMemoryAwareness.main(TestMemoryAwareness.java:65)
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:564)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:832)
Reason is that the value found is instead :
OperatingSystemMXBean.getTotalSwapSpaceSize: -104857600
When looking into the getTotalSwapSpaceSize() function, we get values of 0 for "limit" and 104857600 for "memLimit" :
57 long limit = containerMetrics.getMemoryAndSwapLimit();
....
62 long memLimit = containerMetrics.getMemoryLimit();
63 if (limit >= 0 && memLimit >= 0) {
64 return limit - memLimit;
65 }
That explains the value "-104857600" . We see messages that "Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap" , this most likely
causes the unexpected limit == 0 .
- backported by
-
JDK-8237020 jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
- Resolved
-
JDK-8237440 jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
- Resolved
-
JDK-8249770 jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
- Resolved
-
JDK-8249896 jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
- Resolved
-
JDK-8257210 jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
- Resolved
- relates to
-
JDK-8247863 Unreachable code in OperatingSystemImpl.getTotalSwapSpaceSize()
- Resolved
-
JDK-8226575 OperatingSystemMXBean should be made container aware
- Resolved
-
JDK-8244500 jtreg test error in test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
- Resolved