< prev index next >

src/hotspot/share/services/threadService.cpp

Print this page
@@ -462,27 +462,10 @@
            currentThread = JavaThread::cast(owner);
          }
        } else if (waitingToLockMonitor != nullptr) {
          if (waitingToLockMonitor->has_owner()) {
            currentThread = Threads::owning_thread_from_monitor(t_list, waitingToLockMonitor);
-           if (currentThread == nullptr) {
-             // This function is called at a safepoint so the JavaThread
-             // that owns waitingToLockMonitor should be findable, but
-             // if it is not findable, then the previous currentThread is
-             // blocked permanently. We record this as a deadlock.
-             num_deadlocks++;
- 
-             // add this cycle to the deadlocks list
-             if (deadlocks == nullptr) {
-               deadlocks = cycle;
-             } else {
-               last->set_next(cycle);
-             }
-             last = cycle;
-             cycle = new DeadlockCycle();
-             break;
-           }
          }
        } else {
          if (concurrent_locks) {
            if (waitingToLockBlocker->is_a(vmClasses::java_util_concurrent_locks_AbstractOwnableSynchronizer_klass())) {
              oop threadObj = java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(waitingToLockBlocker);
< prev index next >