jmx-dev RFR: 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with CPU time out of expected range

Paul Hohensee phh at openjdk.org
Thu Jun 27 17:31:54 UTC 2024


On Thu, 27 Jun 2024 08:54:16 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> This test has had occasional failures for years, possibly forever.
> A previous update made the test "othervm" which removed some interruptions, but a time accounting problem remains.
> 
> This change adds a simple sleep after observing that the test threads are all sleeping.
> 
> The idea is that threads may not have actually started sleeping when we observe their java.lang.Thread.State as WAITING, they may use some CPU time after that in order to actually get to sleep.

Makes sense.

-------------

Marked as reviewed by phh (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19924#pullrequestreview-2146005577


More information about the jmx-dev mailing list