RFR: 8175: Flightrecorder UI-tests are failing
Alex Macdonald
aptmac at openjdk.org
Wed Feb 14 16:29:13 UTC 2024
This PR addresses JMC-8175 [[0]](https://bugs.openjdk.org/browse/JMC-8175), in which there are three uitests in ControlRecordingsTest that have sporadic failures.
The root cause looks to be https://bugs.openjdk.org/browse/JDK-8286740, which affects the jdk.ActiveSetting event in JDK 17. This issue, among other things, can lead to Active Setting events sharing the same timestamp due to the event object being cached (which you can see in my screenshots below).
The failing uitests operate by dumping a recording, finding an event that can have it's threshold/enablement/period changed, changing said value, and then verifying the result of the latest timestamp in the Event Settings table in the Recording Page. Because these events in jdk17 can share the same timestamp, we may end up in a situation where the uitest is trying to filter the table based on timestamp and verifying that the enabled setting is true, but there is a false & true for the same timestamp (or a 1s and 5ms in the case of `modifyEventPeriod()`).
I've attached two images below, one using jdk17 and one using jdk21. I dumped a recording of the jvm running jmc, enabled the allocation gc event, and then re-dumped the recording. The left jfr page shows the results for the initial recording, and the page on the right for the one with allocation gc enabled.
In jdk17 we can see events sharing the same timestamp, and in jdk21 they're unique. Based on Marcus' comment on the issue [[2]](https://bugs.openjdk.org/browse/JMC-8175?focusedId=14648937&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14648937) I've ignored these tests with a comment mentioning they'll require a backport of JDK-8286740 to jdk17.
JDK 17 (duplicated timestamps)

JDK 21 (expected)

[0] https://bugs.openjdk.org/browse/JMC-8175
[1] https://bugs.openjdk.org/browse/JDK-8286740
[2] https://bugs.openjdk.org/browse/JMC-8175?focusedId=14648937&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14648937
-------------
Commit messages:
- 8175: Flightrecorder UI-tests are failing
Changes: https://git.openjdk.org/jmc/pull/553/files
Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=553&range=00
Issue: https://bugs.openjdk.org/browse/JMC-8175
Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jmc/pull/553.diff
Fetch: git fetch https://git.openjdk.org/jmc.git pull/553/head:pull/553
PR: https://git.openjdk.org/jmc/pull/553
More information about the jmc-dev
mailing list