Repository navigation
fuzz: add concurrent_sessions and concurrent_rollback targets - #976
Open
citizen-stig wants to merge 1 commit into
Open
citizen-stig wants to merge 1 commit into
citizen-stig wants to merge 1 commit into
Conversation
Every existing target drives the database from one thread, one session at a time, so nothing exercised coexisting sessions, commits waiting on them, or rollbacks racing with sessions on other threads. Both targets share a harness that releases 2-4 threads per round. Each thread runs sessions with reads, writes, proofs, nested sessions and `Nomt::read`, ending in a blocking, non-blocking or overlay commit, or a drop, with pauses that widen the race windows. Commit concurrency, I/O workers and warm-up are randomized, and rounds may reopen the database. Checks: - a session's reads, proofs, nested sessions and `Nomt::read` under it match the state its prev root names - a finished session's root matches a root computed from the model - a commit fails only as stale, and only once the root has moved - successful commits and rollbacks chain from the empty trie to the current root - the database matches the model after every round and reopen concurrent_sessions lets commits race for the write lock. concurrent_rollback adds rollbacks from any thread with a 1-8 entry rollback log; commits and rollbacks queue on a harness lock (never taken while holding a session) so each rollback's outcome is known. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
citizen-stig
marked this pull request as ready for review
November 9, 2026 08:03
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.
Every existing fuzz target drives the database from one thread with one session at a time. Nothing exercises coexisting sessions, commits waiting on them, or rollbacks racing with sessions on other threads.
This adds two targets with a shared harness (
fuzz_targets/concurrent/mod.rs). Each round releases 2–4 threads. Each thread runs sessions with reads, writes, proofs, nested sessions andNomt::read, and ends each session with a blocking, non-blocking or overlay commit, or a drop. Pauses widen the race windows. Commit concurrency, I/O workers and warm-up are randomized, and a round may reopen the database.concurrent_sessions: commits race each other for the write lock.concurrent_rollback: adds rollbacks from any thread with a 1–8 entry rollback log. Commits and rollbacks queue on a harness lock (never taken while holding a session), so each rollback's outcome is known.Checks:
Nomt::readunder it match the state its prev root namesThese targets found the bugs fixed in #973, #974 and #975, so they fail until those land.
🤖 Generated with Claude Code