mirror of
https://github.com/redis/redis.git
synced 2026-05-28 04:02:46 -04:00
Capture and report server crash after RESTORE in corrupt-dump-fuzzer test (#14836)
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
Some checks are pending
CI / test-ubuntu-latest (push) Waiting to run
CI / test-sanitizer-address (push) Waiting to run
CI / build-debian-old (push) Waiting to run
CI / build-macos-latest (push) Waiting to run
CI / build-32bit (push) Waiting to run
CI / build-libc-malloc (push) Waiting to run
CI / build-centos-jemalloc (push) Waiting to run
CI / build-old-chain-jemalloc (push) Waiting to run
Codecov / code-coverage (push) Waiting to run
External Server Tests / test-external-standalone (push) Waiting to run
External Server Tests / test-external-cluster (push) Waiting to run
External Server Tests / test-external-nodebug (push) Waiting to run
Spellcheck / Spellcheck (push) Waiting to run
## Problem In `corrupt-dump-fuzzer.tcl`, after a successful `RESTORE` with a corrupted payload, the test did a bare `r ping` to check whether the server was still alive: If the server crashed at this point, the uncaught exception would **silently terminate the entire test** without printing the payload that caused the crash, making the issue extremely hard to reproduce and debug. ## Fix Wrap `r ping` with catch to ensure failures trigger the same reporting and restart logic as `RESTORE`. This ensures offending payloads are logged for reproduction.
This commit is contained in:
parent
67187687b1
commit
6088387b6f
1 changed files with 7 additions and 1 deletions
|
|
@ -145,7 +145,13 @@ foreach sanitize_dump {no yes} {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
r ping ;# an attempt to check if the server didn't terminate (this will throw an error that will terminate the tests)
|
||||
# an attempt to check if the server didn't terminate (this will throw an error that will terminate the tests)
|
||||
if { [catch { r ping } err] } {
|
||||
set msg "Server crashed after RESTORE with payload: $printable_dump"
|
||||
write_log_line 0 $msg
|
||||
puts $msg
|
||||
error $err
|
||||
}
|
||||
}
|
||||
|
||||
set print_commands false
|
||||
|
|
|
|||
Loading…
Reference in a new issue