X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/447ebf3bc73016a6137a458bf0314109a0128157..9aba884b348432a3ef802723a5f6692b353bbaa8:/src/debug.c diff --git a/src/debug.c b/src/debug.c index f16bcfd1..8eea3bf8 100644 --- a/src/debug.c +++ b/src/debug.c @@ -314,8 +314,8 @@ void _redisAssert(char *estr, char *file, int line) { server.assert_file = file; server.assert_line = line; redisLog(REDIS_WARNING,"(forcing SIGSEGV to print the bug report.)"); - *((char*)-1) = 'x'; #endif + *((char*)-1) = 'x'; } void _redisAssertPrintClientInfo(redisClient *c) { @@ -384,9 +384,17 @@ void _redisPanic(char *msg, char *file, int line) { redisLog(REDIS_WARNING,"Guru Meditation: %s #%s:%d",msg,file,line); #ifdef HAVE_BACKTRACE redisLog(REDIS_WARNING,"(forcing SIGSEGV in order to print the stack trace)"); +#endif redisLog(REDIS_WARNING,"------------------------------------------------"); *((char*)-1) = 'x'; -#endif +} + +void bugReportStart(void) { + if (server.bug_report_start == 0) { + redisLog(REDIS_WARNING, + "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ==="); + server.bug_report_start = 1; + } } #ifdef HAVE_BACKTRACE @@ -420,14 +428,6 @@ static void *getMcontextEip(ucontext_t *uc) { #endif } -void bugReportStart(void) { - if (server.bug_report_start == 0) { - redisLog(REDIS_WARNING, - "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ==="); - server.bug_report_start = 1; - } -} - void logStackContent(void **sp) { int i; for (i = 15; i >= 0; i--) { @@ -589,6 +589,8 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) { /* Log INFO and CLIENT LIST */ redisLog(REDIS_WARNING, "--- INFO OUTPUT"); infostring = genRedisInfoString("all"); + infostring = sdscatprintf(infostring, "hash_init_value: %u\n", + dictGetHashFunctionSeed()); redisLogRaw(REDIS_WARNING, infostring); redisLog(REDIS_WARNING, "--- CLIENT LIST OUTPUT"); clients = getAllClientsInfoString(); @@ -634,8 +636,9 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) { redisLog(REDIS_WARNING, "\n=== REDIS BUG REPORT END. Make sure to include from START to END. ===\n\n" -" Please report the crash opening an issue on github:\n\n" -" http://github.com/antirez/redis/issues\n\n" +" Please report the crash opening an issue on github:\n\n" +" http://github.com/antirez/redis/issues\n\n" +" Suspect RAM error? Use redis-server --test-memory to veryfy it.\n\n" ); /* free(messages); Don't call free() with possibly corrupted memory. */ if (server.daemonize) unlink(server.pidfile);