--- a/src/hotspot/os/solaris/os_solaris.cpp Fri Nov 15 09:06:58 2019 +0800
+++ b/src/hotspot/os/solaris/os_solaris.cpp Thu Nov 14 22:36:40 2019 -0500
@@ -4925,10 +4925,12 @@
// the ThreadBlockInVM() CTOR and DTOR may grab Threads_lock.
ThreadBlockInVM tbivm(jt);
+ // Can't access interrupt state now that we are _thread_blocked. If we've
+ // been interrupted since we checked above then _counter will be > 0.
+
// Don't wait if cannot get lock since interference arises from
- // unblocking. Also. check interrupt before trying wait
- if (jt->is_interrupted(false) ||
- os::Solaris::mutex_trylock(_mutex) != 0) {
+ // unblocking.
+ if (os::Solaris::mutex_trylock(_mutex) != 0) {
return;
}