JDK-8243489 : Thread CPU Load event may contain wrong data for CPU time under certain conditions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 11,15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-23
  • Updated: 2020-11-26
  • Resolved: 2020-04-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 15 Other
11.0.9-oracleFixed 13.0.6Fixed 15 b21Fixed openjdk8u272Fixed
Description
If reported CPU time is too large we may accidentally reset stored CPU time for the thread resulting in following evens containing all CPU time from the beginning of time

(contributed by nikolay.martynov@datadoghq.com)
Comments
Fix Request (13u) Requesting backport to 13u for parity with 11u. The original patch applies cleanly and fixes the problem. Tested with tier1 and jdk/jfr. The added tests fail without the patch and pass with it.
16-11-2020

[~andrew] I was looking for `jdk8u-fix-yes` but it has been taken care of already. Thanks!
27-07-2020

Jaroslav, you labelled this with jdk8u-fix-request yourself on 2020-05-28.
26-06-2020

The RFR was approved. Can this be labeled for 8u, plz?
25-06-2020

I have started RFR for 8u - https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-June/012023.html Porting the test does not seem to be feasible - it is using gTest and is relying on MockOs to be able to manipulate the thread CPU time reported by MockOs.
19-06-2020

If the test has been modified (other than by automated patch shuffling), it needs a review before jdk8u-fix-request. Can the test not be ported to 8u?
07-06-2020

[8u] Fix Request This fix is preventing getting incorrect CPU load values from JFR. The fix applies without any further modifications and all jdk_jfr tests are passing. However, the 'test_threadCpuLoad.cpp' test is not present in 8u so the changes from there are not applied.
28-05-2020

[11u] Fix Request This fix is preventing getting incorrect CPU load values from JFR. The fix applies without any further modifications and all jdk_jfr tests are passing.
27-05-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/e7c08ffff4d9 User: jbachorik Date: 2020-04-29 11:31:59 +0000
29-04-2020