On Mon, 28 Nov 2022 15:47:48 GMT, Jaikiran Pai <[email protected]> wrote:
> So perhaps that means the selector manager thread has just started (and > marked itself as alive) but hasn't yet reached the `selector.select` > statement when the tracker checked if it was alive? Looking at the code that > seems possible and perhaps explains why shortly later the tracker in its > logging noted that the selector manager is no longer alive. This would then > mean that the tracker is (and will always?) be inherently racy, isn't it? See explanation above: when we started the wait loop, the thread had not started yet, so the tracker believed it had already exited, and stopped waiting. But before the checks were performed, the thread had started and isAlive was true, which caused the assertion error: the test was no longer waiting for shutdown at this point - it had already exited the waiting loop without waiting. Adding timeout debug in the reference tracker is what allowed me to understand the issue, as I could see that the reference tracker had not waited at all, and the timeout had not been honored. ------------- PR: https://git.openjdk.org/jdk/pull/11294
