#1533·sled

DB Corruption Panic on Sled 0.34 After Stopping Container

Author: nachocodexxCreated Oct 3, 2025Updated Oct 3, 2025

A Sled database (version 0.34) enters a corrupt state and cannot be opened after the Docker container using it was abruptly stopped. When attempting to restart the application, it panics with a Corruption error.


Current Behavior

When the application starts, the following output is observed in the logs before the process terminates:

  1. A WARN message indicating a corrupt or empty snapshot file:
    WARN sled::pagecache::snapshot: empty/corrupt snapshot file found
  2. The application panics when calling .unwrap() on a corruption error result:
    thread 'main' panicked at ... called `Result::unwrap()` on an `Err` value: Corruption { at: None, bt: () }

Expected Behavior

Sled should ideally be able to recover from an unexpected shutdown. Barring that, it should provide a clear recovery path or tooling to repair the database and salvage data.