Permalink
Browse files

Print thread stack trace in logs before thread stop attempts

To further debug some dead lock in tests seen on the CI
  • Loading branch information...
alexarchambault committed Dec 18, 2018
1 parent 75b4ba4 commit b80ce426a16f7611971391667c6aa47b23a3195e
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/scala/scala-interpreter/src/main/scala/almond/ScalaInterpreter.scala
@@ -455,7 +455,7 @@ final class ScalaInterpreter(
case None =>
log.warn("Interrupt asked, but no execution is running")
case Some(t) =>
log.debug(s"Interrupt asked, stopping thread $t")
log.debug(s"Interrupt asked, stopping thread $t\n${t.getStackTrace.map(" " + _).mkString("\n")}")
t.stop()
}
}
@@ -469,8 +469,8 @@ final class ScalaInterpreter(
case None =>
log.warn("Received SIGINT, but no execution is running")
case Some(t) =>
log.debug(s"Received SIGINT, stopping thread $t")
interruptedStackTraceOpt = Some(t.getStackTrace)
log.debug(s"Received SIGINT, stopping thread $t\n${interruptedStackTraceOpt.map(" " + _).mkString("\n")}")
t.stop()
}
}.apply {

0 comments on commit b80ce42

Please sign in to comment.