Repository: asterixdb Updated Branches: refs/heads/master ce348d684 -> 8a8014285
[NO ISSUE] Log the threaddump of the NC at shutdown To assist in debugging issues that may have triggered a shutdown, info log the node's thread dump at the start of a shutdown request. Change-Id: I55adc38ca9c66b1e75486f0e9715e1d475917ee6 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2042 Reviewed-by: Murtadha Hubail <[email protected]> Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/8a801428 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/8a801428 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/8a801428 Branch: refs/heads/master Commit: 8a801428585ae0251233b2b0e6a92d3709c96619 Parents: ce348d6 Author: Michael Blow <[email protected]> Authored: Sun Oct 1 19:06:33 2017 -0400 Committer: Michael Blow <[email protected]> Committed: Mon Oct 2 12:14:30 2017 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hyracks/control/nc/NCShutdownHook.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8a801428/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java index 1cd45b2..0a02635 100644 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java +++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NCShutdownHook.java @@ -21,6 +21,8 @@ package org.apache.hyracks.control.nc; import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.hyracks.util.ThreadDumpUtil; + /** * Shutdown hook that invokes {@link NodeControllerService#stop() stop} method. * This shutdown hook must have a failsafe mechanism to halt the process in case the shutdown @@ -67,6 +69,7 @@ public class NCShutdownHook extends Thread { } shutdownHookThread = Thread.currentThread(); watchDog.start(); + LOGGER.log(Level.INFO, () -> "Thread dump at shutdown: " + ThreadDumpUtil.takeDumpString()); nodeControllerService.stop(); } catch (Throwable th) { // NOSONAR... This is fine since this is shutdown hook LOGGER.log(Level.WARNING, "Exception in executing shutdown hook", th);
