Skip to content

Fuzzing test - #4384

Draft
kennethjor wants to merge 25 commits into
h2database:masterfrom
kennethjor:fuzzing-test
Draft

kennethjor wants to merge 25 commits into
h2database:masterfrom
kennethjor:fuzzing-test

Conversation

@kennethjor

@kennethjor kennethjor commented Sep 1, 2026

Copy link
Copy Markdown

I don't know if this is of interest, but I was tinkering with this today. It's a setup for generating random runs of operations in order to break MVStore. TestMVStoreFuzz.generateFuzzTests will generate random new runs and test them, keeping the ones which fail. TestMVStoreFuzz.replayTests will take the saved run files and and rerun them.

  • fuzz-0.txt org.h2.mvstore.MVStoreException: Chunk 1 not found [2.5.259/9] on a reopen
  • fuzz-1.txt: java.lang.StackOverflowError on a multiple version rollback

It's very possible some of these end up using MVStore incorrectly, in which case those tests could be discarded or maybe turned into more suitable error messages.

I use MVStore a lot in a couple of projects and experience some intermittent failures. I'm not smart enough to track down those failures nor fix them, but I can write code like this. Perhaps it can help make the library more resilient.

@kennethjor

Copy link
Copy Markdown
Author

I'm not sure why this fails on the CI, it's having trouble loading in Junit classes. May have to revisit how it's set up.

https://github.com/kennethjor/h2database/actions/runs/33528404632

@kennethjor
kennethjor marked this pull request as draft September 1, 2026 17:14
@kennethjor

kennethjor commented Sep 2, 2026

Copy link
Copy Markdown
Author

fuzz-2.txt reliably produces a "org.h2.mvstore.MVStoreException: Chunk 1 not found [2.5.259/9]" during a rollback immediately after a commit

Edit: That does use versionsToKeep=0 retentionTime=0 which I guess is improper.

Edit 2: It fails even with versionsToKeep=5 retentionTime=45000

@andreitokar

Copy link
Copy Markdown
Contributor

@kennethjor, Thank You for your contribution.
I've used you test and was able to reproduce failures, it uncovered. They all have the same root cause, and all are fixed now by #4386.
Was not able to find any more failures, so far.
As far as JUnit usage goes - decision was made long ago (right or wrong) to avoid it's use, so let's stick to that.
Once it's ready, please can you do a license statement to the google groups mailing list, as described at here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants