Random Fuzzy Thoughts
Treating a fuzzer's byte slice as a finite PRNG unifies coverage-guided fuzzing with structured property-based testing: the entropy length measures input complexity, gives test-case minimization almost for free, and tells interactive simulations when to stop injecting faults. A seed reproduces a failure only at a specific commit, so robust regression tests should persist the generated structured data (e.g. a .wasm module) rather than the seed, using a separate generate/build/process pipeline that also supports hand-written inputs. For interactive distributed-system tests, a livelock in TigerBeetle was reproduced by running the VOPR simulator with a perfect network and steering it with predicates over system state, suggesting regression suites made of predicate 'key frames' that random traces must hit.
Related posts
- A Descent Into the Vörtex
TigerBeetle mediumAdeptTigerBeetle has added Vortex, a non-deterministic, generative full-system test harness that complements its Deterministic Simulation Testing by exercising real production binaries and client libraries from the outside in. A supervisor coordinates a cluster of stock replicas, a workload that checks safety properties, and language-specific client drivers (Zig and Java so far). It injects network faults through a TCP proxy, kills or pauses processes, and runs liveness checks. In four months it found two bugs: incorrect request batching in tb_client and double connection termination. Planned work includes continuous runs, upgrade testing, network partitions and storage faults.
- On the Effectiveness of Mutational Grammar Fuzzing
Google Project Zero hardMaster
Coverage-guided mutational grammar fuzzing has two weaknesses. Coverage does not capture dataflow between calls, so a sample that chains document() into generate-id() to hit a libxslt bug looks no more interesting than two unrelated samples. Greedy corpus saving also yields many near-identical samples. A simple fix in Jackalope restarts a worker with an empty corpus every 2T seconds, letting it build an independent corpus for T seconds before syncing with a persistent server and fuzzing the combined corpus. In week-long libxslt experiments, T=3600 found more unique crashes, and found them faster, than uninterrupted default sessions, which varied between 2 and 5 crashes depending on starting conditions. The best T is likely target-dependent.
- We Put a Distributed Database In the Browser – And Made a Game of It!
TigerBeetle easyNoviceTigerBeetle's deterministic simulator, the VOPR, is compiled to WebAssembly via Zig and wrapped in a playable browser game that runs real TigerBeetle replicas across three levels. The levels run under perfect conditions, then Jepsen-style network faults, crashes and latency, and finally up to 8% read and 9% write storage corruption per replica. The VOPR mocks all network and storage I/O in a single process, verifies linearizability and dilates time: 3.3 seconds of simulation covers 39 minutes of real-world testing, and a day covers two years. Getting the whole cluster under WebAssembly's 2 GiB memory limit was the main porting challenge, and the post contrasts VSR's round-robin view changes with Raft's randomized elections.
- A Tale Of Four Fuzzers
TigerBeetle hardMasterTigerBeetle's Adaptive Replication Routing (ARR) puts the primary in the middle of a replication ring so no single dropped message is critical. It also reorders replicas dynamically by running routing experiments and measuring end-to-end prepare_ok latency rather than modeling the network. Testing it took four different fuzzers rather than relying only on the VOPR whole-system simulator. The key lesson is to design subsystems around minimal, data-oriented interfaces (integers for op, time and view instead of injected clocks or replicas) so they can be fuzzed in isolation. Small state spaces such as route encoding can be exhaustively enumerated instead of randomly sampled.
- Protocol-Aware Deterministic Simulation Testing
TigerBeetle hardMasterTigerBeetle's deterministic simulator (the VOPR) has full visibility into each replica's consensus and storage state, so it can check invariants that black-box tools like Jepsen or Antithesis cannot see through user-facing APIs. For safety, it asserts that every committed WAL entry has matching checksums across replicas, that LSM manifest structure is consistent everywhere, and that replicas are byte-for-byte identical, which goes deeper than the cheaper production checks that crash a diverging backup. For liveness, it enforces per-replica invariants: a replica with an uncorrupted WAL must never need cluster coordination to recover, and missing blocks must be repaired from intact copies on other replicas whenever any copy still exists.