The test tries to do interrupts while all threads are suspended. With virtual 
threads this can cause a deadlock because some threads may need to make 
progress in order for JVMTI InterruptThread to work. Solution is to resume all 
but the main thread before issuing the interrupts.

The failure was very hard to reproduce. It took about 2700 runs. During testing 
of this fix I ran it about 5000 times and didn't see 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:
 - resume threads before doing interrupt

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

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

Reply via email to