RFR: 8276333: jdk/jfr/event/oldobject/TestLargeRootSet.java failed "assert(!contains(edge->reference())) failed: invariant"

Markus Grönlund mgronlun at openjdk.java.net
Sun Mar 6 13:29:25 UTC 2022


Greetings,

This is a specific issue related to how the DFSClosure process roots.

It traverses roots twice to avoid going sideways. To prevent premature termination during the second pass, a marker, "_ignore_root_set", is set to signal they have already been processed. It lets the recursion continue, but there is a problem with how the code is laid out. It skips the "is_marked" check, but it does not skip add_chain(). If the reference is a stack root, and the pointee is a leak sample candidate, it attempts to construct the reference chain twice. The assertion fires because a reference is only to be added once.

It also includes stronger asserts to give more information for related issue tracked in [JDK-8282067](https://bugs.openjdk.java.net/browse/JDK-8282067) .

Testing: jdk_jfr

Thanks
Markus

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

Commit messages:
 - 8276333

Changes: https://git.openjdk.java.net/jdk/pull/7715/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7715&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276333
  Stats: 32 lines in 3 files changed: 19 ins; 10 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7715.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7715/head:pull/7715

PR: https://git.openjdk.java.net/jdk/pull/7715


More information about the hotspot-jfr-dev mailing list