On Thu, 11 Jul 2024 15:58:13 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> 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. > Which logging should be removed? Alex suggest the logging between breakpoints > 2 and 3, but even that is not enough. There is logging after breakpoint 3, > and that happens before the vm.resume() is done. After breakpoint 3 debugger calls thread2.resume() and vm.resume(), so there is no issue there (all threads are resumed). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20088#discussion_r1674512891