MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _serverPanic

Function _serverPanic

app/redis-6.2.6/src/debug.c:987–1009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985}
986
987void _serverPanic(const char *file, int line, const char *msg, ...) {
988 va_list ap;
989 va_start(ap,msg);
990 char fmtmsg[256];
991 vsnprintf(fmtmsg,sizeof(fmtmsg),msg,ap);
992 va_end(ap);
993
994 bugReportStart();
995 serverLog(LL_WARNING,"------------------------------------------------");
996 serverLog(LL_WARNING,"!!! Software Failure. Press left mouse button to continue");
997 serverLog(LL_WARNING,"Guru Meditation: %s #%s:%d",fmtmsg,file,line);
998
999 if (server.crashlog_enabled) {
1000#ifdef HAVE_BACKTRACE
1001 logStackTrace(NULL, 1);
1002#endif
1003 printCrashReport();
1004 }
1005
1006 // remove the signal handler so on abort() we will output the crash report.
1007 removeSignalHandlers();
1008 bugReportEnd(0, 0);
1009}
1010
1011void bugReportStart(void) {
1012 pthread_mutex_lock(&bug_report_start_mutex);

Callers

nothing calls this directly

Calls 6

vsnprintfFunction · 0.85
bugReportStartFunction · 0.85
logStackTraceFunction · 0.85
printCrashReportFunction · 0.85
removeSignalHandlersFunction · 0.85
bugReportEndFunction · 0.85

Tested by

no test coverage detected