3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-17 03:50:08 +01:00

Add version to watchdog early warning system

BECAUSE VERSIONING INFO
Dieser Commit ist enthalten in:
Zach Brown 2018-10-24 15:01:17 -04:00
Ursprung 4b45701372
Commit 719dae9595
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76

Datei anzeigen

@ -1,4 +1,4 @@
From e6aeaaaf67788aca8b41ee04b7925e2ea7f815e9 Mon Sep 17 00:00:00 2001 From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com> From: miclebrick <miclebrick@outlook.com>
Date: Wed, 8 Aug 2018 15:30:52 -0400 Date: Wed, 8 Aug 2018 15:30:52 -0400
Subject: [PATCH] Add Early Warning Feature to WatchDog Subject: [PATCH] Add Early Warning Feature to WatchDog
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash. This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index fad2f8f82..4061073b2 100644 index 7ac07ac07ac0..7ac07ac07ac0 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
@ -36,7 +36,7 @@ index fad2f8f82..4061073b2 100644
public static int tabSpamLimit = 500; public static int tabSpamLimit = 500;
private static void tabSpamLimiters() { private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 18eeee510..6fa54386e 100644 index 7ac07ac07ac0..7ac07ac07ac0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -796,6 +796,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -796,6 +796,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -48,7 +48,7 @@ index 18eeee510..6fa54386e 100644
long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop long start = System.nanoTime(), curTime, wait, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index eed96c60c..496c5cbdf 100644 index 7ac07ac07ac0..7ac07ac07ac0 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java --- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -226,7 +226,7 @@ public class SpigotConfig @@ -226,7 +226,7 @@ public class SpigotConfig
@ -61,7 +61,7 @@ index eed96c60c..496c5cbdf 100644
public static boolean bungee; public static boolean bungee;
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
index 57a4748a3..19df383e0 100644 index 7ac07ac07ac0..7ac07ac07ac0 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -5,6 +5,7 @@ import java.lang.management.MonitorInfo; @@ -5,6 +5,7 @@ import java.lang.management.MonitorInfo;
@ -120,7 +120,7 @@ index 57a4748a3..19df383e0 100644
// Paper end // Paper end
+ } else + } else
+ { + {
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---"); + log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + "---");
+ log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump"); + log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
+ } + }
+ // Paper end - Different message for short timeout + // Paper end - Different message for short timeout