-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize J9JavaVM->liveVirtualThreadList at startup
This change fixes the below deadlock. Thread 1 wants exclusive VM access but it is unable to acquire exclusive VM access because Thread 2 also holds VM access. Thread 2 is waiting to acquire liveVirtualThreadListMutex and unable to proceed because Thread 1 holds liveVirtualThreadListMutex. This prevents both threads to proceed and leads to a deadlock. Thread 1: JVM_VirtualThreadMountEnd -> Acquires VM Access and liveVirtualThreadListMutex -> J9AllocateObject -> Multiple GC frames -> acquireExclusiveVMAccess Thread 2: JVM_VirtualThreadMountEnd -> Acquires VM Access -> Blocked to enter liveVirtualThreadListMutex Related: #16340 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information
Showing
2 changed files
with
70 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters