Duplicate :
|
|
Relates :
|
|
Relates :
|
Some locks allow a JavaThread to enter a blocked state. If the JavaThread owning the lock is suspended on the back edge when returning to the VM state, it may cause a deadlock. An example of this is a JavaThread having the Compile_lock and then grabbing the VMOperation_lock, the JavaThread may transition to a blocked state due to contentions or if the JavaThread waits on the VMOperation_lock. The resumer might call a path which needs the Compile_lock before it resumes the suspended JavaThread. But since the Compile_lock will not be unlocked until the suspended JavaThread is resumed, we deadlock.
|