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

com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java can fail in Xcomp with out of expected range

XMLWordPrintable

    • b09

        Even though JDK-8311306 resolved one source of this test failing with the "out of expected range" error message, we're seeing that it can still fail under -Xcomp on libgraal. It seems to happen when the ThreadCpuTimeArray::doit method is deoptimized at the "wrong" time and the time taken to recompile it increases the delay between 2 timing calls for the thread running that method. The delay can be increased beyond the threshold expected by the test, causing it to fail:

        java.lang.RuntimeException: TEST FAILED: MyThread-1 CPU time = 9189423 previous CPU time 8584379 out of expected range
        at ThreadCpuTimeArray.main(ThreadCpuTimeArray.java:145)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1575)

              dnsimon Douglas Simon
              dnsimon Douglas Simon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: