-
Bug
-
Resolution: Fixed
-
P4
-
24, 25, 26
-
master
-
generic
-
generic
The test case VThreadBlockedAtOjectWait of serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java can deadlock if the verifyHeapDump() call at
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L111
throws an exception and control is transferred to the finally block. There the join() at
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L117
produces a deadlock because the notify() above was not executed and the test runs into timeout.
Typical symptom: stdout log does not include "1 virtual thread(s) found" from that location:
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L144
Typical stack when deadlocked (main thread blocked in join at UnmountedVThreadNativeMethodAtTop.java:117):
"MainThread" #43 [37752] prio=5 os_prio=0 cpu=75006.62ms elapsed=720.12s tid=0x00007fffa028aaf0 nid=37752 waiting on condition [0x00007fff46ff9000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@25-internal/Native Method)
- parking to wait for <0x00000000fff00020> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base@25-internal/LockSupport.java:223)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@25-internal/AbstractQueuedSynchronizer.java:789)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@25-internal/AbstractQueuedSynchronizer.java:1138)
at java.util.concurrent.CountDownLatch.await(java.base@25-internal/CountDownLatch.java:230)
at java.lang.VirtualThread.joinNanos(java.base@25-internal/VirtualThread.java:1002)
at java.lang.Thread.join(java.base@25-internal/Thread.java:1843)
at java.lang.Thread.join(java.base@25-internal/Thread.java:1936)
at UnmountedVThreadNativeMethodAtTop.VThreadBlockedAtOjectWait(UnmountedVThreadNativeMethodAtTop.java:117)
at java.lang.invoke.LambdaForm$DMH/0x00000177010a4800.invokeVirtual(java.base@25-internal/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x00000177010a8000.invoke(java.base@25-internal/LambdaForm$MH)
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L111
throws an exception and control is transferred to the finally block. There the join() at
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L117
produces a deadlock because the notify() above was not executed and the test runs into timeout.
Typical symptom: stdout log does not include "1 virtual thread(s) found" from that location:
https://github.com/openjdk/jdk/blob/63e08d4af7145b94048d565f4f80dae221090c19/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java#L144
Typical stack when deadlocked (main thread blocked in join at UnmountedVThreadNativeMethodAtTop.java:117):
"MainThread" #43 [37752] prio=5 os_prio=0 cpu=75006.62ms elapsed=720.12s tid=0x00007fffa028aaf0 nid=37752 waiting on condition [0x00007fff46ff9000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base@25-internal/Native Method)
- parking to wait for <0x00000000fff00020> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base@25-internal/LockSupport.java:223)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@25-internal/AbstractQueuedSynchronizer.java:789)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base@25-internal/AbstractQueuedSynchronizer.java:1138)
at java.util.concurrent.CountDownLatch.await(java.base@25-internal/CountDownLatch.java:230)
at java.lang.VirtualThread.joinNanos(java.base@25-internal/VirtualThread.java:1002)
at java.lang.Thread.join(java.base@25-internal/Thread.java:1843)
at java.lang.Thread.join(java.base@25-internal/Thread.java:1936)
at UnmountedVThreadNativeMethodAtTop.VThreadBlockedAtOjectWait(UnmountedVThreadNativeMethodAtTop.java:117)
at java.lang.invoke.LambdaForm$DMH/0x00000177010a4800.invokeVirtual(java.base@25-internal/LambdaForm$DMH)
at java.lang.invoke.LambdaForm$MH/0x00000177010a8000.invoke(java.base@25-internal/LambdaForm$MH)
- relates to
-
JDK-8361827 [TESTBUG] serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java throws OutOfMemoryError
-
- In Progress
-
-
JDK-8355557 serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java timed out
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/917d0182
-
Review(jdk25) openjdk/jdk/26279
-
Review(master) openjdk/jdk/26213