RFR(XS): VM times out in VM_HandshakeAllThreads::doit() with RunThese30M
Robbin Ehn
robbin.ehn at oracle.com
Wed Aug 15 20:21:41 UTC 2018
Hi Dan, thanks,
On 2018-08-15 22:02, Daniel D. Daugherty wrote:
> So if HandshakeState::vmthread_can_process_handshake() is only
> called by the VMThread while at a safepoint, then the target
> JavaThread cannot be externally resumed while that function is
> running so this new check:
No we are not at safepoint, this method is never called at safepoint. All
other threads should be considered running. Therefore I need to stop resuming
targeted suspended thread while VM thread is executing the handshake on behalf
of the suspended thread.
Does my comment/assert make more sense in the light of that?
/Robbin
>
> + return SafepointSynchronize::safepoint_safe(target,
> target->thread_state()) ||
> + target->is_ext_suspended();
>
> is okay because that externally suspended thread is also safepoint safe.
>
> This assert:
>
> + assert(Threads_lock->owned_by_self(), "Not holding Threads_lock.");
>
> doesn't quite match your intent. If
> HandshakeState::vmthread_can_process_handshake()
> should only be called by the VMThread at a safepoint, then a different
> check would be better:
>
> assert(SafepointSynchronize::is_at_safepoint() &&
> Thread::current()->is_VM_thread(),
> "must be VMThread at a safepoint");
>
> Perhaps this for your comment:
>
> // SafepointSynchronize::safepoint_safe() does not consider an externally
> // suspended thread to be safe. However, if we are at a safepoint, then
> // the externally suspended thread cannot be resumed so it is safe.
>
> Dan
>
>
>>
>> Thanks, Robbin
>>
>>>
>>> Thanks,
>>> David
>>>
>
More information about the hotspot-runtime-dev
mailing list