summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-12 22:27:53 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-12 22:27:53 +0200
commitbac76425602076eec4c21d79bed9b583e6ae4b4e (patch)
tree83bd0aa7d097d7373cdc3fd7eeaf80fda6d921d0 /vespajlib
parentd02daee3cd8317637160c586a7f28fe8b0d1f7d4 (diff)
This adds a 60 seconds watchdog aroung the init and start calls of the BootstrapDaemon.
If the calls does not complete in 60 seconds we dump the stack.
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/main/java/com/yahoo/protect/Process.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/protect/Process.java b/vespajlib/src/main/java/com/yahoo/protect/Process.java
index 6f381b40cd7..bc5114922da 100644
--- a/vespajlib/src/main/java/com/yahoo/protect/Process.java
+++ b/vespajlib/src/main/java/com/yahoo/protect/Process.java
@@ -42,8 +42,10 @@ public final class Process {
*/
public static void logAndDie(String message, Throwable thrown, boolean dumpThreads) {
try {
- if (dumpThreads)
+ if (dumpThreads) {
+ log.log(Level.INFO, "About to shut down.");
dumpThreads();
+ }
if (thrown != null)
log.log(Level.SEVERE, message, thrown);
else
@@ -60,9 +62,9 @@ public final class Process {
}
- private static void dumpThreads() {
+ public static void dumpThreads() {
try {
- log.log(Level.INFO, "About to shut down. Commencing full thread dump for diagnosis.");
+ log.log(Level.INFO, "Commencing full thread dump for diagnosis.");
Map<Thread, StackTraceElement[]> allStackTraces = Thread.getAllStackTraces();
for (Map.Entry<Thread, StackTraceElement[]> e : allStackTraces.entrySet()) {
Thread t = e.getKey();