Integrated: 8323883: JFR AssertionError: Missing object ID 15101

Markus Grönlund mgronlun at openjdk.org
Wed Feb 14 14:13:08 UTC 2024


On Thu, 8 Feb 2024 13:46:40 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> Greetings,
> 
> The following adjustments fix the intermittent issues with incomplete tag sets for a chunk. The situations are pretty subtle:
> 
> 1. A situation can occur where an event is emitted during the event instrumentation callback as part of JVMTI Retransform (ErrorThrownEvent). A stack trace is captured that marks, or "tags", the existing method(s) of the klass (i.e. when the scratch class is instrumented). But after the instrumentation call returns, the set of methods of the klass is exchanged from the "old" methods (now marked) , to the new set of methods (from the scratch class, not marked). This means the mark/tag is lost for a method. Therefore, method tags must be transferred when exchanging methods during JVMTI redefine / retransform.
> 2. OldObjectSample events are emitted at the end of a recording. As part of writing the events, several checkpoint events are also created and enqueued. But these checkpoints are incomplete standalone because they need to be complemented with a typeset checkpoint, which happens just after, as part of the rotation. But flush() can occur concurrently with OldObjectSample emit, and can, therefore, serialize these checkpoints to a segment before the complementary typeset checkpoint has been created. There needs to be mutual exclusion between OldObjectSample emit() and flush(), now provided by the JfrRotationLock.
> 3. The set of artefacts captured during class unloading is incomplete because it respects already serialized artefacts. However, because class unloading typesets are linked to OldObjectSamples and DeprecatedInvocation events, which survive chunk boundaries, these unloading typesets can be serialized in later chunks. If the unloading set is incomplete (not transitive), there will be missing constants. Hence, class unloading typesets require serialization of the entire transitive set of unloading artefacts, even if they have already been serialized to the current chunk.
> 
> As part of fixing these issues, the disabled assert is also reactivated.
> 
> Testing: jdk_jfr, stress testing, tier 1-6
> 
> Thanks
> Markus

This pull request has now been integrated.

Changeset: 737b4c51
Author:    Markus Grönlund <mgronlun at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/737b4c515e082239579369d9806307b9f16c4816
Stats:     166 lines in 15 files changed: 81 ins; 48 del; 37 mod

8323883: JFR AssertionError: Missing object ID 15101

Reviewed-by: egahlin

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

PR: https://git.openjdk.org/jdk/pull/17771


More information about the serviceability-dev mailing list