On Fri, 10 Jul 2026 17:29:16 GMT, Serguei Spitsyn <[email protected]> wrote:
>> The test wasn't consuming all ThreadStartEvents, meaning that >> eventSet.resume() wasn't called, which left threads suspended, which meant >> the debuggee never exited, which caused the debugger to timeout waiting for >> it to exit. Updated EventListener to ignore the `isConnected` flag until >> there are no more events. >> >> The issue turned up about 1 in every 25000 runs. I ran about 75000 times >> with the fix without any issues. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/threadStartRequests/thrstartreq001.java > line 226: > >> 224: // events until there are no more. So do a >> continue here rather than >> 225: // allowing continuing to be conditional on >> isConnected below. >> 226: continue; > > Q: Execution is already at the end of loop cycle. > The `continue;` at line 226 is confusing and misleading. Why do we need it? Yeah, that's a bug. I was thinking that a "continue" here would skip the "isConnected" check below, but that is not the case. I think the reason my changes still seem to resolve the bug is because of the above change to not check "isConnected" before doing the eventSet.resume(). This appears to have addressed the common case of events not being processed. However, my intent with doing the continue should still be addressed somehow. Hypothetically there could still be more events to process. I'll need to restructure the loop to do this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31756#discussion_r3560863271
