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

## 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:
Vitah Lin 2026-03-03 09:33:52 +08:00 committed by GitHub
parent 67187687b1
commit 6088387b6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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