From a9e0333dba843020224388842060f085df492c4a Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Fri, 15 Jul 2022 16:17:53 +0000 Subject: [PATCH] intercept SIGUSR2 in RCCL add support for intercepting SIGUSR2 in RCCL. This signal will not terminate the execution of the application, but print the stacktrace of the process that the signal was sent to instead. [ROCm/rccl commit: 2b1d5d3bc145b6287268a4f81651b38e2b11d246] --- projects/rccl/src/misc/signals.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/rccl/src/misc/signals.cc b/projects/rccl/src/misc/signals.cc index ed70039354..c729f873c2 100644 --- a/projects/rccl/src/misc/signals.cc +++ b/projects/rccl/src/misc/signals.cc @@ -58,6 +58,10 @@ void sig_handler(int signum) free (strings); #endif + if (signum == SIGUSR2) { + return; + } + exit (-1); } @@ -69,7 +73,7 @@ void RegisterSignalHandlers() { INFO(NCCL_INIT, "Enabling custom signal handler"); - std::vector signalsToCatch = {SIGILL, SIGBUS, SIGFPE, SIGSEGV}; + std::vector signalsToCatch = {SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGUSR2}; for (auto signum : signalsToCatch) {