MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / _serverPanic

Function _serverPanic

src/debug.cpp:1094–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092}
1093
1094void _serverPanic(const char *file, int line, const char *msg, ...) {
1095 g_fInCrash = true;
1096 va_list ap;
1097 va_start(ap,msg);
1098 char fmtmsg[256];
1099 vsnprintf(fmtmsg,sizeof(fmtmsg),msg,ap);
1100 va_end(ap);
1101
1102 bugReportStart();
1103 serverLog(LL_WARNING,"------------------------------------------------");
1104 serverLog(LL_WARNING,"!!! Software Failure. Press left mouse button to continue");
1105 serverLog(LL_WARNING,"Guru Meditation: %s #%s:%d",fmtmsg,file,line);
1106
1107 if (g_pserver->crashlog_enabled) {
1108#if defined HAVE_BACKTRACE || defined UNW_LOCAL_ONLY
1109 logStackTrace(NULL, 1);
1110#endif
1111 printCrashReport();
1112 }
1113
1114 // remove the signal handler so on abort() we will output the crash report.
1115 removeSignalHandlers();
1116 bugReportEnd(0, 0);
1117}
1118
1119void bugReportStart(void) {
1120 pthread_mutex_lock(&bug_report_start_mutex);

Callers

nothing calls this directly

Calls 6

bugReportStartFunction · 0.85
serverLogFunction · 0.85
printCrashReportFunction · 0.85
removeSignalHandlersFunction · 0.85
bugReportEndFunction · 0.85
logStackTraceFunction · 0.70

Tested by

no test coverage detected