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

Bug: Intermittent database corruption fails at read_snapshot_or_default #1166

Closed
D1plo1d opened this issue Sep 9, 2020 · 2 comments
Closed
Labels

Comments

@D1plo1d
Copy link

D1plo1d commented Sep 9, 2020

  1. expected result: Expected config.open() to open the database
  2. actual result:
  • config.open() some times fails with the following stack trace (note this is in reverse order due to journalctl): https://gist.github.com/D1plo1d/e1ac7171375f8fbd47c1aed9947b59d6
  • once config.open() fails once it will continue to fail if retried indicating that the database is corrupted(?)
  • I delete the database and it works for a while but then the problem re-occurs within less then a day.
  1. sled version: 0.34.2 + some small error handling experiments: https://github.com/D1plo1d/sled/tree/53d0e30a749f27fb808101730f1794a5f85b6216
  2. rustc version: rustc 1.44.1 (c7087fe00 2020-06-17)
  3. operating system: Rasbian 10 (Buster)
  4. minimal code sample that helps to reproduce the issue:
    let db_file = env::var("SLED_DB_PATH")
        .expect("$SLED_DB_PATH not set");

    let config = sled::Config::default()
        .path(db_file.clone())
        .cache_capacity(10_000_000);

    let db = config.open()
        .map(|db| Arc::new(db))
        .with_context(|| format!("Unable to open sled database: {}", db_file))?;
  1. logs, panic messages, stack traces: https://gist.github.com/D1plo1d/e1ac7171375f8fbd47c1aed9947b59d6
@D1plo1d D1plo1d added the bug label Sep 9, 2020
@spacejam
Copy link
Owner

spacejam commented Sep 10, 2020

Thanks for reporting this! I believe I may have fixed it here, and I'm about to cut 0.34.4 which will include the fix.

@spacejam
Copy link
Owner

0.34.4 has been cut which I believe addresses this. please re-open if you encounter similar issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants