add debug print before shell kills executor
diff --git a/heron/shell/src/python/handlers/killexecutorhandler.py b/heron/shell/src/python/handlers/killexecutorhandler.py
index 0aa92e7..3a8a5c0 100644
--- a/heron/shell/src/python/handlers/killexecutorhandler.py
+++ b/heron/shell/src/python/handlers/killexecutorhandler.py
@@ -20,6 +20,7 @@
import os
import signal
import urlparse
+import subprocess
import tornado.web
from tornado.options import options
@@ -37,6 +38,12 @@
def kill_parent():
status_finish(200)
+ try:
+ logger.info("Print stmgr backtrace to ./stmgr.bt")
+ cmd = 'timeout 3 gdb -batch -ex "run" -ex "bt" -p `cat stmgr-1.pid` 2>&1 > stmgr.bt'
+ subprocess.call(cmd, shell=True)
+ except Exception:
+ logger.warning("Exception: ")
logger.info("Killing parent executor")
os.killpg(os.getppid(), signal.SIGTERM)