RFR: 8266410: jdk/jfr/javaagent/TestLoadedAgent.java failed with "Mismatch in TestEvent count"
Hi, Could I have a review of a test fix. The test emits a lot of data in a short period of time. On my machine about 35 MB/s, which should be fine in most cases, but could potentially lead to events being dropped. I could reproduce the issue, with 4% of all events being dropped and with jdk.DataLoss events in the recording, if increased the number of events significantly. Contributing to the flakiness is the default recording and its periodic events that uses buffers at the same time. I think it is fine to run with the default recording, as it is more realistic, but we should not do so with too many events emitted per second. Purpose of the test is not to stress the buffer system, but to see we can load JFR with a Java agent (with some user-defined events). I changed the test so it doesn't read all event into memory to make it easier to reproduce the issue without using too much RAM. I choose not to use EventStream.openFile(Path), because we might want to run this with JDK 11 where event streaming is not available. I printed the recording size and any dataloss events to make it easier to diagnose if it should reoccur. Testing: jdk/jdk/jfr/javaagent/* 100 times Thanks Erik ------------- Commit messages: - Initial Changes: https://git.openjdk.java.net/jdk/pull/7141/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7141&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266410 Stats: 18 lines in 1 file changed: 13 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/7141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7141/head:pull/7141 PR: https://git.openjdk.java.net/jdk/pull/7141
On Wed, 19 Jan 2022 07:36:31 GMT, Erik Gahlin <egahlin@openjdk.org> wrote:
Hi,
Could I have a review of a test fix.
The test emits a lot of data in a short period of time. On my machine about 35 MB/s, which should be fine in most cases, but could potentially lead to events being dropped. I could reproduce the issue, with 4% of all events being dropped and with jdk.DataLoss events in the recording, if increased the number of events significantly.
Contributing to the flakiness is the default recording and its periodic events that uses buffers at the same time. I think it is fine to run with the default recording, as it is more realistic, but we should not do so with too many events emitted per second. Purpose of the test is not to stress the buffer system, but to see we can load JFR with a Java agent (with some user-defined events).
I changed the test so it doesn't read all event into memory to make it easier to reproduce the issue without using too much RAM. I choose not to use EventStream.openFile(Path), because we might want to run this with JDK 11 where event streaming is not available. I printed the recording size and any dataloss events to make it easier to diagnose if it should reoccur.
Testing: jdk/jdk/jfr/javaagent/* 100 times
Thanks Erik
Marked as reviewed by mgronlun (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7141
On Wed, 19 Jan 2022 07:36:31 GMT, Erik Gahlin <egahlin@openjdk.org> wrote:
Hi,
Could I have a review of a test fix.
The test emits a lot of data in a short period of time. On my machine about 35 MB/s, which should be fine in most cases, but could potentially lead to events being dropped. I could reproduce the issue, with 4% of all events being dropped and with jdk.DataLoss events in the recording, if increased the number of events significantly.
Contributing to the flakiness is the default recording and its periodic events that uses buffers at the same time. I think it is fine to run with the default recording, as it is more realistic, but we should not do so with too many events emitted per second. Purpose of the test is not to stress the buffer system, but to see we can load JFR with a Java agent (with some user-defined events).
I changed the test so it doesn't read all event into memory to make it easier to reproduce the issue without using too much RAM. I choose not to use EventStream.openFile(Path), because we might want to run this with JDK 11 where event streaming is not available. I printed the recording size and any dataloss events to make it easier to diagnose if it should reoccur.
Testing: jdk/jdk/jfr/javaagent/* 100 times
Thanks Erik
This pull request has now been integrated. Changeset: 6179e13b Author: Erik Gahlin <egahlin@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/6179e13b084a64a3ad247ced8d314e425a6e... Stats: 18 lines in 1 file changed: 13 ins; 0 del; 5 mod 8266410: jdk/jfr/javaagent/TestLoadedAgent.java failed with "Mismatch in TestEvent count" Reviewed-by: mgronlun ------------- PR: https://git.openjdk.java.net/jdk/pull/7141
participants (2)
-
Erik Gahlin
-
Markus Grönlund