RFR: Do not visit gc threads during shutdown

Y. Srinivas Ramakrishna ysr at openjdk.org
Mon Mar 20 19:14:01 UTC 2023


On Mon, 20 Mar 2023 17:13:27 GMT, William Kemper <wkemper at openjdk.org> wrote:

> Discovered a strange crash during shutdown while working on jtreg tests.

Changes look reasonable, but would like a couple of clarifications to determine in my mind the robustness of the proposed fix. Thanks!

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1807:

> 1805:     return;
> 1806:   }
> 1807: 

Some related questions so I can understand the shutdown sequence a bit better, and what caused the issue that @kdnilsen recorded in the ticket:

1. I suppose we have determined that the shutdown sequence doesn't itself need to iterate over these GC-related threads to do anything.
2. was the original issue because one of the threads gone by the time we started iterating over it with the closure below?
3. what prevents a race between the check above and the exit of the threads subject to iteration below, so that some of the threads may be asynchronously gone between the check above and the iteration over that thread below?

Thanks!

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

PR Review: https://git.openjdk.org/shenandoah/pull/228#pullrequestreview-1349237142
PR Review Comment: https://git.openjdk.org/shenandoah/pull/228#discussion_r1142571950


More information about the shenandoah-dev mailing list