Repository navigation
fix(monitor-input): skip HELLO lines in the --monitor-input loader (2.4, part of #496) - #497
Merged
Merged
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
…rt of #496) Backport of the master fix: load_from_file skips connection/protocol- negotiation commands (HELLO) so a captured/fuzzed `HELLO "3"` line can't be replayed as a workload. Replaying HELLO switches the connection to RESP3, after which the RESP2 reply parser blocks forever and --test-time can't interrupt the in-flight read, wedging the Monitor-Input Fuzz nightly (#482). Fixes it in the loader rather than by scrubbing the corpus. Co-Authored-By: Claude Opus 4.8 <[email protected]>
fcostaoliveira
force-pushed
the
fix/monitor-input-hang-2.4
branch
from
June 26, 2026 12:20
bb10538 to
0522aeb
Compare
…ented build (#496) The HELLO loader-skip fix removed the real wedge, but the Monitor-Input Fuzz nightly still failed on master: an 8 MiB grow-mutated --monitor-input payload exceeds the 90s per-run timeout under master's heavier ASAN+UBSan build (read-preference, CPU tracking, Prometheus). It's finite-but-slow, not a hang -- the identical input completes in <20s locally and the exact CI PRNG stream did not wedge in 470 local replays. Raise the per-run timeout to 180s so slow large payloads finish; true (infinite) hangs are unaffected since any timeout still trips them. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Even at FUZZ_TIMEOUT=180 the Monitor-Input Fuzz nightly still timed out on master: a grow-mutated 8 MiB --monitor-input (seed 17_all_command_types) takes >180s to load/replay under the heavier instrumented ASAN+UBSan build on CI runners (the same input is <20s locally -- a >9x runner slowdown). It's finite-but-slow, not a hang. Rather than keep raising the timeout, cap FUZZ_GROW_MAX at 2 MiB so the worst-case grow payload processes in ~45s (4x margin under the 180s timeout). Large-input coverage is retained by the 17 MiB / million-line synthetic seeds. Co-Authored-By: Claude Opus 4.8 <[email protected]>
) GROW_MAX=2MiB did not actually bound payload size: mutate() applies up to 4 mutators, so several grows compound to ~8MiB regardless (the only true bound was the hard 32MiB truncate). master's monitor-fuzz still timed out at 180s on a ~8MiB input (~22s/MiB under the heavier ASAN+UBSan build on CI; <20s locally) -- finite-but-slow, not a hang. Make the post-mutation truncate cap env-configurable (FUZZ_MAX_BYTES, default 32MiB) and set it to 2MiB in the nightly so the worst-case payload processes in ~45s. Verified: max mutated size over 3000 mutations is now exactly 2MiB. Large-input coverage retained via the synthetic seeds. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…nitor_*) (#496) The driver saves repros via tempfile prefix mfuzz_ (/tmp/mfuzz_*.txt) but the upload step globbed /tmp/fuzz_monitor_*, so on failure no reproducer was ever uploaded -- which hampered diagnosing the master slowness here. Cover both globs. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This was referenced Jun 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of the master loader fix (#498).
Root cause
Replaying
HELLO "<proto>"from--monitor-inputswitches the connection to RESP3; memtier's RESP2 reply parser then blocks forever on a reply it can't decode, and the in-flight read isn't bounded by--test-time, so the Monitor-Input Fuzz run wedges past the harness timeout (the latent hang #482). This is why the nightly failed every run.Fix (loader-level, not corpus-scrubbing)
monitor_command_list::load_from_filenow skips connection/protocol-negotiation commands (HELLO) so they can never be replayed as a workload — every other command in the file still runs. Reported as "N unreplayable line(s) skipped". The corpus keeps itsHELLOline so the fuzzer exercises the skip path. (Merely deleting HELLO from the seed fixes nothing — a real MONITOR capture contains it and the fuzzer mutates toward it.)Verified
A lone
HELLOinput now exits immediately (was a >12s wedge); the full17_all_command_typesseed loads 91/92 commands (1 unreplayable skipped) and runs clean. Full monitor-fuzz driver re-run for confirmation.The deeper option (bound the in-flight read by
--test-timeso any wedging reply self-recovers) remains tracked as #482.Note
Medium Risk
Loader behavior changes which commands replay from monitor captures (HELLO omitted); fuzz CI tuning affects nightly signal, not production benchmark defaults.
Overview
--monitor-inputloader now drops HELLO lines duringload_from_fileso protocol negotiation is not replayed as workload (avoids RESP3 mid-stream and infinite RESP2 parse hangs from #482). Other commands in the file still load; stderr reports malformed vs unreplayable skip counts.Monitor-Input Fuzz adds a post-mutation
FUZZ_MAX_BYTEScap (2 MiB on CI) because compoundedgrowmutators exceedGROW_MAX, raisesFUZZ_TIMEOUTto 180s for slow ASAN builds, and fixes failure artifact upload to include/tmp/mfuzz_*repro paths.Reviewed by Cursor Bugbot for commit 667e232. Bugbot is set up for automated code reviews on this repo. Configure here.