G1ConcurrentMarkThread::delay_to_keep_mmu locks the CGC_lock monitor using MonitorLocker, and does a wait on that MonitorLocker object. However, the arguments passed to wait include a second argument of Monitor::_no_safepoint_check_flag. Whether waits should be safepoint checking are determined by the MonitorLocker, not by the wait. The second argument to wait is bool as_suspend_equivalent, so this is actually a kind of type error that can't currently be detected by the compiler. The fix here is to just remove the second argument to wait.
- relates to
-
JDK-8255596 Mutex safepoint checking options and flags should be scoped enums
- Resolved