fix: add mac crash report processing

This commit is contained in:
dapan1121 2023-01-04 19:12:16 +08:00
parent 86382731df
commit a551641b6c
4 changed files with 4 additions and 6 deletions

View File

@ -420,9 +420,7 @@ _return:
taosLogCrashInfo("taos", pMsg, msgLen, signum, sigInfo); taosLogCrashInfo("taos", pMsg, msgLen, signum, sigInfo);
#if defined(WINDOWS)
exit(signum); exit(signum);
#endif
} }
void crashReportThreadFuncUnexpectedStopped(void) { atomic_store_32(&clientStop, -1); } void crashReportThreadFuncUnexpectedStopped(void) { atomic_store_32(&clientStop, -1); }

View File

@ -1253,8 +1253,6 @@ STscObj* taosConnectImpl(const char* user, const char* auth, const char* db, __t
int64_t transporterId = 0; int64_t transporterId = 0;
asyncSendMsgToServer(pTscObj->pAppInfo->pTransporter, &pTscObj->pAppInfo->mgmtEp.epSet, &transporterId, body); asyncSendMsgToServer(pTscObj->pAppInfo->pTransporter, &pTscObj->pAppInfo->mgmtEp.epSet, &transporterId, body);
*(int32_t*)0 = 1;
tsem_wait(&pRequest->body.rspSem); tsem_wait(&pRequest->body.rspSem);
if (pRequest->code != TSDB_CODE_SUCCESS) { if (pRequest->code != TSDB_CODE_SUCCESS) {

View File

@ -99,6 +99,8 @@ void dmLogCrash(int signum, void *sigInfo, void *context) {
_return: _return:
taosLogCrashInfo("taosd", pMsg, msgLen, signum, sigInfo); taosLogCrashInfo("taosd", pMsg, msgLen, signum, sigInfo);
exit(signum);
} }
static void dmSetSignalHandle() { static void dmSetSignalHandle() {

View File

@ -868,7 +868,7 @@ int32_t taosGenCrashJsonMsg(int signum, char** pMsg, int64_t clusterId, int64_t
#ifdef _TD_DARWIN_64 #ifdef _TD_DARWIN_64
taosLogTraceToBuf(tmp, sizeof(tmp), 4); taosLogTraceToBuf(tmp, sizeof(tmp), 4);
#elseif !defined(WINDOWS) #elif !defined(WINDOWS)
taosLogTraceToBuf(tmp, sizeof(tmp), 3); taosLogTraceToBuf(tmp, sizeof(tmp), 3);
#else #else
taosLogTraceToBuf(tmp, sizeof(tmp), 8); taosLogTraceToBuf(tmp, sizeof(tmp), 8);
@ -931,7 +931,7 @@ _return:
#ifdef _TD_DARWIN_64 #ifdef _TD_DARWIN_64
taosPrintTrace(flags, level, dflag, 4); taosPrintTrace(flags, level, dflag, 4);
#elseif !defined(WINDOWS) #elif !defined(WINDOWS)
taosPrintLog(flags, level, dflag, "sender PID:%d cmdline:%s", ((siginfo_t *)sigInfo)->si_pid, taosPrintLog(flags, level, dflag, "sender PID:%d cmdline:%s", ((siginfo_t *)sigInfo)->si_pid,
taosGetCmdlineByPID(((siginfo_t *)sigInfo)->si_pid)); taosGetCmdlineByPID(((siginfo_t *)sigInfo)->si_pid));
taosPrintTrace(flags, level, dflag, 3); taosPrintTrace(flags, level, dflag, 3);