You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Heap_lock performs safepoint check. Mutators may hold such locks and
enter safepoint. If the VMThread attempts to acquire this lock in a
VMOperation while some mutators are still holding this lock, the
VMThread will have to wait forever because mutators will not resume
until the VMOperation ends. Later versions of OpenJDK forbid the
VMThread from acquiring any lock that performs safepoint check.
We notify the ReferenceHandler thread when resuming mutators. But the
current code does this notification in a VMOperation, and will cause the
deadlock. When this happens, the process will freeze when a GC is
triggered. This is likely to happen when the heap size is small and GC
is triggered often.
We move the notification code to `mmtk_resume_mutators` which is
executed on a GC worker thread *after* mutators have been resumed. This
solves the deadlock issue.
0 commit comments