On Thu, 11 Jul 2024 14:09:57 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> Sorry I'm unclear on the different threads involved here. IIUC the >> vm.suspend comes from the debugger, and the mainthread and thread-2 are both >> threads in the debuggee, being suspended at different times? > > Yes. thread2 is suspended via breakpoint (multiple times). mainThread is > suspended by the one place in the test that does a vm.suspend(), which is > near the end of the test. This is the problematic suspend because sometimes > it is done while mainThread is in the middle of a println. A bit later > thread2 is resumed and ends up blocking on a println due to mainThread > holding the needed lock. I've updated the implementation so now it does a sync point after mainThread is done with printlns. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20088#discussion_r1674279814