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).

-------------

Commit messages:
 - consume all events before exiting EventListener

Changes: https://git.openjdk.org/jdk/pull/31756/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31756&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8387640
  Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/31756.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31756/head:pull/31756

PR: https://git.openjdk.org/jdk/pull/31756

Reply via email to