Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288398

jdk/internal/platform/cgroup/TestCgroupMetrics.java fails on linux aarch64 Ubuntu 22

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 17, 19, 20
    • hotspot
    • aarch64
    • linux

    Description

      we run into this error on an Ubuntu 22 Linux aarch64 machine :
      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:1596)

      (this is cgroupsv2 based).
      Reason is that the cpu.stat file misses nr_periods entry.
      cpu.stat has instead those entries :
      usage_usec 676979
      user_usec 202599
      system_usec 474379

      Probably the coding getLongValueEntryFromFile could be hardened so that it catches ArrayIndexOutOfBoundsException and returns NOT_AVAILABLE instead.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: