Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fuzzing of crash recovery and fix a bunch of bugs #573

Merged
merged 18 commits into from
May 9, 2023
Merged

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    fb45a05 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Improve assertion message

    cberner committed May 4, 2023
    Configuration menu
    Copy the full SHA
    e09c80f View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    e76bc96 View commit details
    Browse the repository at this point in the history
  2. Fix dirty page leak with debug_assertions

    If an I/O error occurred during write(), the dirty page tracking would
    leak causing a panic when the transaction was committed/aborted
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    350db58 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b8ba89 View commit details
    Browse the repository at this point in the history
  4. Replace eprint with warn

    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8ff7c43 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a72b9a6 View commit details
    Browse the repository at this point in the history
  6. Fix panic after crash recovery

    This fixes a cache poisoning issue in which a page might be in the
    userspace cache after walking the btrees during crash recovery, but then
    be freed by the rollback process of recovery. This could then poison the
    cache, leading to a crash in the future
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    4bde7a4 View commit details
    Browse the repository at this point in the history
  7. Fix page leak after crash

    Fixes a page leak if an I/O error occurred during commit(), since drop()
    would still flush the recovery bit to "clean"
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    93c7cfd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7ccdb9d View commit details
    Browse the repository at this point in the history
  9. Fix database corruption bug

    Fixes a corruption issue that could occur if a Durability::None commit
    was made, followed by a durable commit, and the durable commit crashed
    during the call to commit().
    
    Non-durable commits pushed their pending free pages into the freed
    table. The next durable commit then processed these *before* finalizing
    its commit. If that durable commit crashed after processing the frees,
    but before finalizing, then all the non-durable commits are rolled back,
    but the freed pages have already been processed. This left the database
    in a corrupted state since those pages could get overwritten as part of
    finalizing the durable commit
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    975d321 View commit details
    Browse the repository at this point in the history
  10. Fix potential read-after-write inconsistency

    An I/O error during writeback could cause the page being flushed to be
    lost
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    5953d74 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3ba8df8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    dc61f4b View commit details
    Browse the repository at this point in the history
  13. Fix panic if make_tree_path failed

    The root would end up set, but not the path, this lead to a panic in the
    drop() method
    cberner committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ee7befb View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Shorten max fuzz length to 100k

    Every issue found has reproduced at < 10k, and the corpus only has items
    up to ~50k
    cberner committed May 9, 2023
    Configuration menu
    Copy the full SHA
    c1eac7c View commit details
    Browse the repository at this point in the history
  2. Fix crash during I/O error handling

    If an I/O occurring during commit(), the transaction would then try to
    abort() which might panic since the data structures are left in an
    inconsistent state
    cberner committed May 9, 2023
    Configuration menu
    Copy the full SHA
    17f41ed View commit details
    Browse the repository at this point in the history
  3. Update changelog

    cberner committed May 9, 2023
    Configuration menu
    Copy the full SHA
    f763fbf View commit details
    Browse the repository at this point in the history