RFR: 8299426: Heap dump does not contain virtual Thread stack references [v2]
Chris Plummer
cjplummer at openjdk.org
Thu Nov 30 21:14:06 UTC 2023
On Thu, 30 Nov 2023 20:44:33 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> I'm not sure I understand the scenario. The state is set to TERMINATED after the thread completes its execution.
> So a virtual thread was scheduled, mounted, did some work (as state != NEW) and then scheduler unmounts it and decides to not schedule it again and just "loses" it?
> This does not look like a real scenario for me, but anyway I think that's fine to report such unreachable virtual threads until GC collects the objects.
I wasn't thinking in terms of the scheduler somehow no longer references the virtual thread, but instead the program no longer referencing the scheduler (and also not referencing the virtual thread).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16665#issuecomment-1834565906
More information about the serviceability-dev
mailing list