1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-06 22:06:40 +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

@@ -26,6 +26,8 @@ namespace bi=boost::interprocess;
#include "IDBPolicy.h"
#include "crashtrace.h"
using namespace std;
using namespace messageqcpp;
using namespace processmonitor;
@@ -75,6 +77,14 @@ int main(int argc, char **argv)
setuid(0); // set effective ID to root; ignore return status
#endif
struct sigaction ign;
memset(&ign, 0, sizeof(ign));
ign.sa_handler = fatalHandler;
sigaction(SIGSEGV, &ign, 0);
sigaction(SIGABRT, &ign, 0);
sigaction(SIGFPE, &ign, 0);
if (argc > 1 && string(argv[1]) == "--daemon")
{
if (fork() != 0) return 0;