-
Bug
-
Resolution: Fixed
-
P4
-
11.0.6-oracle, 17, 19
-
b03
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8293138 | 19.0.2 | Christoph Langer | P4 | Resolved | Fixed | b01 |
JDK-8292961 | 19.0.1 | Christoph Langer | P4 | Resolved | Fixed | b09 |
JDK-8300744 | 17.0.8-oracle | Ryan Wallace | P4 | Resolved | Fixed | b01 |
JDK-8289914 | 17.0.5 | Matthias Baesken | P4 | Resolved | Fixed | b01 |
JDK-8294575 | 11.0.18 | Jonathan Dowland | P4 | Resolved | Fixed | b01 |
JDK-8299307 | openjdk8u372 | Severin Gehwolf | P4 | Resolved | Fixed | b01 |
JDK-8302730 | 8u381 | Ivan Bereziuk | P4 | Resolved | Fixed | b01 |
When running test/jdk/jdk/internal/platform/cgroup/TestCgroupMetrics.java on ubuntu 21.10, this test looks for a named value "nr_periods" in the file /sys/fs/cgroup/..../cpu.stat
However, if this file exists but doesn't contain this named value, the following code fails:
private long getLongValueEntryFromFile(String file, String metric) {
Path filePath = Paths.get(UNIFIED.getPath(), file);
try {
String strVal = Files.lines(filePath).filter(l -> l.startsWith(metric)).collect(Collectors.joining());
String[] keyValues = strVal.split("\\s+");
String value = keyValues[1]; <<< HERE
return convertStringToLong(value);
} catch (IOException e) {
return NOT_AVAILABLE;
}
}
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at jdk.test.lib.containers.cgroup.MetricsTesterCgroupV2.getLongValueEntryFromFile(MetricsTesterCgroupV2.java:125)
at jdk.test.lib.containers.cgroup.MetricsTesterCgroupV2.testCpuSchedulingMetrics(MetricsTesterCgroupV2.java:324)
at jdk.test.lib.containers.cgroup.MetricsTester.testAll(MetricsTester.java:59)
at TestCgroupMetrics.main(TestCgroupMetrics.java:47)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
at java.base/java.lang.Thread.run(Thread.java:828)
- backported by
-
JDK-8289914 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8292961 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8293138 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8294575 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8299307 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8300744 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
-
JDK-8302730 MetricsTesterCgroupV2.getLongValueEntryFromFile fails when named value doesn't exist
- Resolved
- duplicates
-
JDK-8288398 jdk/internal/platform/cgroup/TestCgroupMetrics.java fails on linux aarch64 Ubuntu 22
- Closed
- links to
-
Commit openjdk/jdk8u-dev/b4a745d2
-
Commit openjdk/jdk11u-dev/378b516a
-
Commit openjdk/jdk17u-dev/3ad14451
-
Commit openjdk/jdk19u/d10e902a
-
Commit openjdk/jdk/444a0d98
-
Review openjdk/jdk8u-dev/215
-
Review openjdk/jdk11u-dev/1379
-
Review openjdk/jdk17u-dev/532
-
Review openjdk/jdk19u/13
-
Review openjdk/jdk/9153