From fb78eb615b3fd04cacb8a30fd2a2ebcd24063167 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:18:00 +0200 Subject: [PATCH] CI: save a minidump if it hangs on panic stop --- src/util.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index 879a87c..137dafc 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -83,6 +83,11 @@ MinerCallbackHandler::~MinerCallbackHandler() {} void panic_stop(const char* message) { +#ifdef DEV_TRACK_MEMORY + // Give it 1 minute to shut down, otherwise save a minidump + minidump_and_crash(60 * 1000); +#endif + fprintf(stderr, "P2Pool can't continue execution: panic at %s\n", message); p2pool::log::stop();