mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-07 17:08:53 +00:00
8207334: VM times out in VM_HandshakeAllThreads::doit() with RunThese30M
Handshakes did not consider external suspended threads safe for safepoint. Reviewed-by: dcubed, dholmes
This commit is contained in:
parent
3c0f0f0175
commit
3bb71a9b51
@ -338,7 +338,13 @@ void HandshakeState::cancel_inner(JavaThread* thread) {
|
||||
}
|
||||
|
||||
bool HandshakeState::vmthread_can_process_handshake(JavaThread* target) {
|
||||
return SafepointSynchronize::safepoint_safe(target, target->thread_state());
|
||||
// SafepointSynchronize::safepoint_safe() does not consider an externally
|
||||
// suspended thread to be safe. However, this function must be called with
|
||||
// the Threads_lock held so an externally suspended thread cannot be
|
||||
// resumed thus it is safe.
|
||||
assert(Threads_lock->owned_by_self(), "Not holding Threads_lock.");
|
||||
return SafepointSynchronize::safepoint_safe(target, target->thread_state()) ||
|
||||
target->is_ext_suspended();
|
||||
}
|
||||
|
||||
bool HandshakeState::claim_handshake_for_vmthread() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user