@VisibleForTesting
  public boolean mapValidation() {
    final long currentTime = System.currentTimeMillis();
    final Set<AbstractExecutor> stuckThreads = new HashSet<>();
    final Set<Long> stuckThreadIds = new HashSet<>();
    checkForStuckThreads(threadsMonitoring.getMonitorMap().values(), currentTime,
        (executor, stuckTime) -> {
          final long threadId = executor.getThreadID();
          stuckThreads.add(executor);
          stuckThreadIds.add(threadId);
          addLockOwnerThreadId(stuckThreadIds, threadId);
        });

    final Map<Long, ThreadInfo> threadInfoMap = createThreadInfoMap(stuckThreadIds);
    final int numOfStuck =
        checkForStuckThreads(stuckThreads, currentTime, (executor, stuckTime) -> {
          final long threadId = executor.getThreadID();
          logger.warn("Thread {} (0x{}) is stuck", threadId, Long.toHexString(threadId));
          executor.handleExpiry(stuckTime, threadInfoMap);
        });

    updateNumThreadStuckStatistic(numOfStuck);
    if (numOfStuck == 0) {
      logger.trace("There are no stuck threads in the system");
    } else if (numOfStuck != 1) {
      logger.warn("There are {} stuck threads in this node", numOfStuck);
    } else {
      logger.warn("There is 1 stuck thread in this node");
    }
    return numOfStuck != 0;
  }
Returns true if a stuck thread was detected
geode-core/src/main/java/org/apache/geode/internal/monitoring/ThreadsMonitoringProcess.java