diff options
author | Meir Shpilraien (Spielrein) <meir@redislabs.com> | 2020-11-03 14:59:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 14:59:21 +0200 |
commit | f210e197f3b9d0b4a81c6c354296da8f1ddad513 (patch) | |
tree | 01e61a28daad00738288db582cf48c387b39cfbd /tests/integration/logging.tcl | |
parent | 9122379abc3b15dfd2af3624586cc1e3f826eb55 (diff) | |
download | redis-f210e197f3b9d0b4a81c6c354296da8f1ddad513.tar.gz |
Added crash report on SIGABRT (#8004)
The reason that we want to get a full crash report on SIGABRT
is that the jmalloc, when detecting a corruption, calls abort().
This will cause the Redis to exist silently without any report
and without any way to analyze what happened.
Diffstat (limited to 'tests/integration/logging.tcl')
-rw-r--r-- | tests/integration/logging.tcl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration/logging.tcl b/tests/integration/logging.tcl index c1f4854d4..3314f0f1d 100644 --- a/tests/integration/logging.tcl +++ b/tests/integration/logging.tcl @@ -22,3 +22,14 @@ if {$system_name eq {linux} || $system_name eq {darwin}} { } } } + +set server_path [tmpdir server1.log] +start_server [list overrides [list dir $server_path]] { + test "Crash report generated on SIGABRT" { + set pid [s process_id] + exec kill -SIGABRT $pid + set pattern "*STACK TRACE*" + set result [exec tail -1000 < [srv 0 stdout]] + assert {[string match $pattern $result]} + } +} |