summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2020-07-29 17:05:14 +0300
committerOran Agra <oran@redislabs.com>2020-08-06 16:47:27 +0300
commit90b717e72340081ee87f0b85b4ef00b2a5bd2bf2 (patch)
tree037ced676d6a553ae4bf1e8f61e74d0c6894cc49 /redis.conf
parent24c539251f368fb597b660de179a10b2d1370ecb (diff)
downloadredis-90b717e72340081ee87f0b85b4ef00b2a5bd2bf2.tar.gz
Assertion and panic, print crash log without generating SIGSEGV
This makes it possible to add tests that generate assertions, and run them with valgrind, making sure that there are no memory violations prior to the assertion. New config options: - crash-log-enabled - can be disabled for cleaner core dumps - crash-memcheck-enabled - useful for faster termination after a crash - use-exit-on-panic - to be used by the test suite so that valgrind can detect leaks and memory corruptions Other changes: - Crash log is printed even on system that dont HAVE_BACKTRACE, i.e. in both SIGSEGV and assert / panic - Assertion and panic won't print registers and code around EIP (which was useless), but will do fast memory test (which may still indicate that the assertion was due to memory corrpution) I had to reshuffle code in order to re-use it, so i extracted come code into function without actually doing any changes to the code: - logServerInfo - logModulesInfo - doFastMemoryTest (with the exception of it being conditional) - dumpCodeAroundEIP changes to the crash report on segfault: - logRegisters is called right after the stack trace (before info) done just in order to have more re-usable code - stack trace skips the first two items on the stack (the crash log and signal handler functions)
Diffstat (limited to 'redis.conf')
-rw-r--r--redis.conf10
1 files changed, 10 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf
index d4e3e47f0..8440b4750 100644
--- a/redis.conf
+++ b/redis.conf
@@ -269,6 +269,16 @@ logfile ""
# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
# syslog-facility local0
+# To disable the built in crash log, which will possibly produce cleaner core
+# dumps when they are needed, uncomment the following:
+#
+# crash-log-enabled no
+
+# To disable the fast memory check that's run as part of the crash log, which
+# will possibly let redis terminate sooner, uncomment the following:
+#
+# crash-memcheck-enabled no
+
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1