mirror of https://mirror.osredm.com/root/redis.git
Dump server logs when corrupt fuzzer reports crash (#12612)
Recently we found some signal crashes, but unable to reproduce them. It is a good idea to dump the server logs when a failure happens.
This commit is contained in:
parent
8cdeddc81c
commit
9fe63bdc80
|
@ -169,6 +169,11 @@ foreach sanitize_dump {no yes} {
|
|||
incr stat_terminated_by_signal $by_signal
|
||||
|
||||
if {$by_signal != 0 || $sanitize_dump == yes} {
|
||||
if {$::dump_logs} {
|
||||
set srv [get_srv 0]
|
||||
dump_server_log $srv
|
||||
}
|
||||
|
||||
puts "Server crashed (by signal: $by_signal), with payload: $printable_dump"
|
||||
set print_commands true
|
||||
}
|
||||
|
|
|
@ -197,6 +197,12 @@ proc srv {args} {
|
|||
dict get $srv $property
|
||||
}
|
||||
|
||||
# Take an index to get a srv.
|
||||
proc get_srv {level} {
|
||||
set srv [lindex $::servers end+$level]
|
||||
return $srv
|
||||
}
|
||||
|
||||
# Provide easy access to the client for the inner server. It's possible to
|
||||
# prepend the argument list with a negative level to access clients for
|
||||
# servers running in outer blocks.
|
||||
|
|
Loading…
Reference in New Issue