Ensure main thread stack is dumped

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot 2013-08-09 20:34:05 +10:00
parent f3e6f841ca
commit 047c339a29

View file

@ -1,4 +1,4 @@
From 86915a8c0199e77b6ddda60a7a3238b326c1142b Mon Sep 17 00:00:00 2001 From de7e8217654cf0fd14076c0ce8cbf569cc84e39d Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100 Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread. Subject: [PATCH] Watchdog Thread.
@ -164,7 +164,7 @@ index 8ef108d..8499c7f 100644
} }
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
new file mode 100644 new file mode 100644
index 0000000..946f9db index 0000000..0a646d6
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -0,0 +1,122 @@ @@ -0,0 +1,122 @@
@ -232,7 +232,7 @@ index 0000000..946f9db
+ // + //
+ log.log( Level.SEVERE, "------------------------------" ); + log.log( Level.SEVERE, "------------------------------" );
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" ); + log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
+ dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId() ), log ); + dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log );
+ log.log( Level.SEVERE, "------------------------------" ); + log.log( Level.SEVERE, "------------------------------" );
+ // + //
+ log.log( Level.SEVERE, "Entire Thread Dump:" ); + log.log( Level.SEVERE, "Entire Thread Dump:" );