Integrated: 8266410: jdk/jfr/javaagent/TestLoadedAgent.java failed with "Mismatch in TestEvent count"
Erik Gahlin
egahlin at openjdk.java.net
Wed Jan 19 22:27:49 UTC 2022
On Wed, 19 Jan 2022 07:36:31 GMT, Erik Gahlin <egahlin at 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 at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/6179e13b084a64a3ad247ced8d314e425a6e0596
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
More information about the hotspot-jfr-dev
mailing list