RFR: 8308881: Strong CLD oop handle roots are demoted to non-roots concurrently

Stefan Karlsson stefank at openjdk.org
Thu May 25 16:23:56 UTC 2023


On Thu, 25 May 2023 15:41:23 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> It is illegal to remove strong roots concurrently without clearing them first. A SATB collector with concurrent root scanning assumes that when strong roots disappear from the object graph, they are cleared first, which makes SATB notice the root. All global strong roots do this. Except CLD strong roots, which are turned into non-roots by decrementing the keep_alive counter to 0, when bootstrapping weak hidden class CLDs. This is not valid behaviour. This patch tries to treat these oops like we do any other global strong handles that are unlinked from the system: clear them when they stop being strong roots.

Could this be using CollectedHeap::keep_alive instead of performing this clear/store dance?

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

PR Review: https://git.openjdk.org/jdk/pull/14154#pullrequestreview-1444260225


More information about the hotspot-gc-dev mailing list