1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-1085 Add crash dump to daemons

This patch adds an automated crash dump which logs in
/var/log/mariadb/columnstore/trace/ when one of the ColumnStore daemons
crashes.
This commit is contained in:
Andrew Hutchings
2018-01-03 09:20:09 +00:00
parent 3924d1a443
commit c31c836352
22 changed files with 192 additions and 15 deletions

View File

@ -97,6 +97,8 @@ using namespace querytele;
#include "utils_utf8.h"
#include "boost/filesystem.hpp"
#include "crashtrace.h"
namespace {
//If any flags other than the table mode flags are set, produce output to screeen
@ -1165,10 +1167,12 @@ public:
}
};
#ifdef _MSC_VER
void exit_(int)
{
exit(0);
}
#endif
void added_a_pm(int)
{
@ -1213,7 +1217,6 @@ void printTotalUmMemory(int sig)
void setupSignalHandlers()
{
#ifdef _MSC_VER
signal(SIGSEGV, exit_);
signal(SIGINT, exit_);
signal(SIGTERM, exit_);
#else
@ -1229,6 +1232,12 @@ void setupSignalHandlers()
sigaction(SIGHUP, &ign, 0);
ign.sa_handler = printTotalUmMemory;
sigaction(SIGUSR1, &ign, 0);
memset(&ign, 0, sizeof(ign));
ign.sa_handler = fatalHandler;
sigaction(SIGSEGV, &ign, 0);
sigaction(SIGABRT, &ign, 0);
sigaction(SIGFPE, &ign, 0);
#endif
}
@ -1302,6 +1311,9 @@ int main(int argc, char* argv[])
string systemLang = "C";
systemLang = funcexp::utf8::idb_setlocale();
// This is unset due to the way we start it
program_invocation_short_name = const_cast<char*>("ExeMgr");
gDebug = 0;
bool eFlg = false;
int c;