On Sun, 9 Aug 2026 00:18:15 GMT, Shiv Shah <[email protected]> wrote:

> Converts suspend001 to ThreadWrapper and fixes the hang. The test assumed 
> MyThread always grabs the shared lock first once main releases it, which 
> isn't guaranteed. With virtual threads the single wakeup goes to the first 
> thread that blocked, that's Suspended, and a suspended virtual thread can't 
> mount, so MyThread was never woken and the debuggee stalled.
> 
> Now each thread gates on its own lock so nothing depends on who gets the 
> wakeup. Also removed the platform only comment and switched thread discovery 
> to the same rendezvous the other converted jdb tests use
> 
> ---------
> - [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/jdb/suspend/suspend001/suspend001a.java line 
64:

> 62:         synchronized (lockSuspended) {
> 63:             synchronized (lockMyThread) {
> 64:             synchronized (waitnotify) {

should we consistently indent the third synchronized to make the lock ordering 
visually clear

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32267#discussion_r3755912666

Reply via email to