[GH-ISSUE #1241] Issue with sqlite database file (Failed to turn on WAL) #876

Closed
opened 2026-03-03 02:04:15 +03:00 by kerem · 4 comments
Owner

Originally created by @Ran-Xing on GitHub (Nov 27, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1241

/--------------------------------------------------------------------\

2020-11-27 22:06:14 | stdout |  
2020-11-27 22:06:14 | stdout | 13: _start
2020-11-27 22:06:14 | stdout | 12: __libc_start_main
2020-11-27 22:06:14 | stdout | 11: main
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/rt.rs:51:25
2020-11-27 22:06:14 | stdout | std::rt::lang_start_internal
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panic.rs:394:14
2020-11-27 22:06:14 | stdout | std::panic::catch_unwind
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:325:15
2020-11-27 22:06:14 | stdout | std::panicking::try
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:348:40
2020-11-27 22:06:14 | stdout | std::panicking::try::do_call
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/rt.rs:52:13
2020-11-27 22:06:14 | stdout | 10: std::rt::lang_start_internal::{{closure}}
2020-11-27 22:06:14 | stdout | 9: std::rt::lang_start::{{closure}}
2020-11-27 22:06:14 | stdout | 8: bitwarden_rs::main
2020-11-27 22:06:14 | stdout | 7: bitwarden_rs::util::retry_db
2020-11-27 22:06:14 | stdout | 6: bitwarden_rs::db::DbPool::from_config
2020-11-27 22:06:14 | stdout | 5: bitwarden_rs::db::sqlite_migrations::run_migrations
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/option.rs:1269:5
2020-11-27 22:06:14 | stdout | 4: core::option::expect_none_failed
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85:14
2020-11-27 22:06:14 | stdout | 3: core::panicking::panic_fmt
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437:5
2020-11-27 22:06:14 | stdout | 2: rust_begin_unwind
2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530:17
2020-11-27 22:06:14 | stdout | 1: std::panicking::rust_panic_with_hook
2020-11-27 22:06:14 | stdout | 0: bitwarden_rs::init_logging::{{closure}}
2020-11-27 22:06:14 | stdout | [2020-11-27 22:06:14.372][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "database disk image is malformed")': src/db/mod.rs:275
2020-11-27 22:06:14 | stdout |  
2020-11-27 22:06:14 | stdout | --------------------------------------------------------------------/
2020-11-27 22:06:14 | stdout | |   https://github.com/dani-garcia/bitwarden_rs/issues/new           |
2020-11-27 22:06:14 | stdout | | Report suspected bugs/issues in the software itself at:            |
2020-11-27 22:06:14 | stdout | |   https://bitwardenrs.discourse.group/                             |
2020-11-27 22:06:14 | stdout | | Send usage/configuration questions or feature requests to:         |
2020-11-27 22:06:14 | stdout | | official channels to report bugs/features, regardless of client.   |
2020-11-27 22:06:14 | stdout | | This is an unofficial Bitwarden implementation, DO NOT use the   |
2020-11-27 22:06:14 | stdout | |--------------------------------------------------------------------|
2020-11-27 22:06:14 | stdout | |                           Version 1.17.0                           |
2020-11-27 22:06:14 | stdout | |                       Starting Bitwarden_RS

Originally created by @Ran-Xing on GitHub (Nov 27, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1241 /--------------------------------------------------------------------\ -- 2020-11-27 22:06:14 | stdout |   2020-11-27 22:06:14 | stdout | 13: _start 2020-11-27 22:06:14 | stdout | 12: __libc_start_main 2020-11-27 22:06:14 | stdout | 11: main 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/rt.rs:51:25 2020-11-27 22:06:14 | stdout | std::rt::lang_start_internal 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panic.rs:394:14 2020-11-27 22:06:14 | stdout | std::panic::catch_unwind 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:325:15 2020-11-27 22:06:14 | stdout | std::panicking::try 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:348:40 2020-11-27 22:06:14 | stdout | std::panicking::try::do_call 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/rt.rs:52:13 2020-11-27 22:06:14 | stdout | 10: std::rt::lang_start_internal::{{closure}} 2020-11-27 22:06:14 | stdout | 9: std::rt::lang_start::{{closure}} 2020-11-27 22:06:14 | stdout | 8: bitwarden_rs::main 2020-11-27 22:06:14 | stdout | 7: bitwarden_rs::util::retry_db 2020-11-27 22:06:14 | stdout | 6: bitwarden_rs::db::DbPool::from_config 2020-11-27 22:06:14 | stdout | 5: bitwarden_rs::db::sqlite_migrations::run_migrations 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/option.rs:1269:5 2020-11-27 22:06:14 | stdout | 4: core::option::expect_none_failed 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85:14 2020-11-27 22:06:14 | stdout | 3: core::panicking::panic_fmt 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437:5 2020-11-27 22:06:14 | stdout | 2: rust_begin_unwind 2020-11-27 22:06:14 | stdout | at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530:17 2020-11-27 22:06:14 | stdout | 1: std::panicking::rust_panic_with_hook 2020-11-27 22:06:14 | stdout | 0: bitwarden_rs::init_logging::{{closure}} 2020-11-27 22:06:14 | stdout | [2020-11-27 22:06:14.372][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "database disk image is malformed")': src/db/mod.rs:275 2020-11-27 22:06:14 | stdout |   2020-11-27 22:06:14 | stdout | \--------------------------------------------------------------------/ 2020-11-27 22:06:14 | stdout | \|   https://github.com/dani-garcia/bitwarden_rs/issues/new           \| 2020-11-27 22:06:14 | stdout | \| Report suspected bugs/issues in the software itself at:            \| 2020-11-27 22:06:14 | stdout | \|   https://bitwardenrs.discourse.group/                             \| 2020-11-27 22:06:14 | stdout | \| Send usage/configuration questions or feature requests to:         \| 2020-11-27 22:06:14 | stdout | \| official channels to report bugs/features, regardless of client.   \| 2020-11-27 22:06:14 | stdout | \| This is an *unofficial* Bitwarden implementation, DO NOT use the   \| 2020-11-27 22:06:14 | stdout | \|--------------------------------------------------------------------\| 2020-11-27 22:06:14 | stdout | \|                           Version 1.17.0                           \| 2020-11-27 22:06:14 | stdout | \|                       Starting Bitwarden_RS
kerem 2026-03-03 02:04:15 +03:00
Author
Owner

@Ran-Xing commented on GitHub (Nov 27, 2020):

After my server was shut down and started again, docker failed to start. I want to know whether the user inserted XSS maliciously or was it a bug
And I hope to be able to recover my password

<!-- gh-comment-id:735000441 --> @Ran-Xing commented on GitHub (Nov 27, 2020): After my server was shut down and started again, docker failed to start. I want to know whether the user inserted XSS maliciously or was it a bug And I hope to be able to recover my password
Author
Owner

@Ran-Xing commented on GitHub (Nov 27, 2020):

thank you

<!-- gh-comment-id:735000488 --> @Ran-Xing commented on GitHub (Nov 27, 2020): thank you
Author
Owner

@BlackDex commented on GitHub (Nov 27, 2020):

It seems more like the sqlite3 file has been corrupted.
Were/are you using a shared filesystem like CIFS/Samba, or NFS?
That is know to cause some issues with sqlite3 files with WAL enabled.

See the following link on what could cause corruption: https://www.sqlite.org/howtocorrupt.html
And the following like for information on how to try and recover: https://sqlite.org/cli.html#recover_data_from_a_corrupted_database

Also, always make backups, there is a "backup" button available in the admin interface.
And see: https://github.com/dani-garcia/bitwarden_rs/wiki/Backing-up-your-vault

<!-- gh-comment-id:735005180 --> @BlackDex commented on GitHub (Nov 27, 2020): It seems more like the sqlite3 file has been corrupted. Were/are you using a shared filesystem like CIFS/Samba, or NFS? That is know to cause some issues with sqlite3 files with WAL enabled. See the following link on what could cause corruption: https://www.sqlite.org/howtocorrupt.html And the following like for information on how to try and recover: https://sqlite.org/cli.html#recover_data_from_a_corrupted_database Also, always make backups, there is a "backup" button available in the admin interface. And see: https://github.com/dani-garcia/bitwarden_rs/wiki/Backing-up-your-vault
Author
Owner

@BlackDex commented on GitHub (Dec 12, 2020):

Closing this issue due to inactivity and it is not something we could fix on the bitwarden_rs side.
Feel free to continue this discussion on the forum: https://bitwardenrs.discourse.group/

<!-- gh-comment-id:743784895 --> @BlackDex commented on GitHub (Dec 12, 2020): Closing this issue due to inactivity and it is not something we could fix on the bitwarden_rs side. Feel free to continue this discussion on the forum: https://bitwardenrs.discourse.group/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#876
No description provided.