MCPcopy Create free account
hub / github.com/apache/tomcat / findDeadlock

Method findDeadlock

java/org/apache/tomcat/util/Diagnostics.java:364–373  ·  view source on GitHub ↗

Check if any threads are deadlocked. If any, print the thread dump for those threads. @return a deadlock message and the formatted thread dump of the deadlocked threads

()

Source from the content-addressed store, hash-verified

362 * @return a deadlock message and the formatted thread dump of the deadlocked threads
363 */
364 public static String findDeadlock() {
365 long[] ids = threadMXBean.findDeadlockedThreads();
366 if (ids != null) {
367 ThreadInfo[] tinfos = threadMXBean.getThreadInfo(threadMXBean.findDeadlockedThreads(), true, true);
368 if (tinfos != null) {
369 return sm.getString("diagnostics.deadlockFound") + CRLF + getThreadDump(tinfos);
370 }
371 }
372 return "";
373 }
374
375 /**
376 * Retrieves a formatted JVM thread dump. The default StringManager will be used.

Callers 1

getThreadDumpMethod · 0.95

Calls 2

getThreadDumpMethod · 0.95
getStringMethod · 0.65

Tested by

no test coverage detected