-
Bug
-
Resolution: Fixed
-
P4
-
13
-
b21
-
generic
-
linux
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8253786 | 11.0.10-oracle | Bob Vandette | P4 | Resolved | Fixed | b01 |
JDK-8253981 | 11.0.10 | Bob Vandette | P4 | Resolved | Fixed | b01 |
Currently the jtreg test
jdk/internal/platform/cgroup/TestCgroupMetrics.java
fails on my linux ppc64le test machine (SLES 12.3) . (jdk/jdk hg)
It gives me :
java.lang.RuntimeException: Test failed for - blkio:blkio.throttle.io_service_bytes - Total, expected [25288465162240], got [158457046589440]
at jdk.test.lib.containers.cgroup.MetricsTester.fail(MetricsTester.java:188)
at jdk.test.lib.containers.cgroup.MetricsTester.testBlkIO(MetricsTester.java:515)
at TestCgroupMetrics.main(TestCgroupMetrics.java:51)
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:835)
The failure happens here, when a metrics value is compared with a value read from file system (oldVal/newVal).
MetricsTester.java :
public void testBlkIO() {
Metrics metrics = Metrics.systemMetrics();
long oldVal = metrics.getBlkIOServiceCount();
long newVal = getLongValueFromFile(SubSystem.BLKIO,
"blkio.throttle.io_service_bytes", "Total");
if (!compareWithErrorMargin(oldVal, newVal)) {
fail(SubSystem.BLKIO, "blkio.throttle.io_service_bytes - Total",
oldVal, newVal);
}
It seems the wrong values from /sys/fs/cgroup/blkio/blkio.throttle.io_service_bytes are compared :
fgrep Total /sys/fs/cgroup/blkio/blkio.throttle.io_service_bytes
254:6 Total 25350186577920
...
Total 158652998460416
Once the first value is taken , and once the last (where the line ***starts*** with Total).
Short analysis from B.Vandette found that
open/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/SubSystem.java:151
in getLongEntry, seems to do the following :
"Instead of finding the first line that starts with “Total”, it finds the first line that contains “Total”. "
jdk/internal/platform/cgroup/TestCgroupMetrics.java
fails on my linux ppc64le test machine (SLES 12.3) . (jdk/jdk hg)
It gives me :
java.lang.RuntimeException: Test failed for - blkio:blkio.throttle.io_service_bytes - Total, expected [25288465162240], got [158457046589440]
at jdk.test.lib.containers.cgroup.MetricsTester.fail(MetricsTester.java:188)
at jdk.test.lib.containers.cgroup.MetricsTester.testBlkIO(MetricsTester.java:515)
at TestCgroupMetrics.main(TestCgroupMetrics.java:51)
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:835)
The failure happens here, when a metrics value is compared with a value read from file system (oldVal/newVal).
MetricsTester.java :
public void testBlkIO() {
Metrics metrics = Metrics.systemMetrics();
long oldVal = metrics.getBlkIOServiceCount();
long newVal = getLongValueFromFile(SubSystem.BLKIO,
"blkio.throttle.io_service_bytes", "Total");
if (!compareWithErrorMargin(oldVal, newVal)) {
fail(SubSystem.BLKIO, "blkio.throttle.io_service_bytes - Total",
oldVal, newVal);
}
It seems the wrong values from /sys/fs/cgroup/blkio/blkio.throttle.io_service_bytes are compared :
fgrep Total /sys/fs/cgroup/blkio/blkio.throttle.io_service_bytes
254:6 Total 25350186577920
...
Total 158652998460416
Once the first value is taken , and once the last (where the line ***starts*** with Total).
Short analysis from B.Vandette found that
open/src/java.base/linux/classes/jdk/internal/platform/cgroupv1/SubSystem.java:151
in getLongEntry, seems to do the following :
"Instead of finding the first line that starts with “Total”, it finds the first line that contains “Total”. "
- backported by
-
JDK-8253786 jtreg test jdk/internal/platform/cgroup/TestCgroupMetrics.java fails on SLES12.3 linux ppc64le machine
- Resolved
-
JDK-8253981 jtreg test jdk/internal/platform/cgroup/TestCgroupMetrics.java fails on SLES12.3 linux ppc64le machine
- Resolved