Rocket-worker-thread panicked

Hello. Need a bit of help here. I use vaultwarden without docker. Recently I found that there are a lot of errors like this in vaultwarden log.

[panic][ERROR] thread 'rocket-worker-thread' panicked at 'Error loading emergen
cy_access: DatabaseError(__Unknown, "database is locked")': src/db/models/emergency_access.rs:241
May 13 13:05:13 nas vaultwarden[2453]:    0: vaultwarden::init_logging::{{closure}}
May 13 13:05:13 nas vaultwarden[2453]:    1: std::panicking::rust_panic_with_hook
May 13 13:05:13 nas vaultwarden[2453]:    2: std::panicking::begin_panic_handler::{{closure}}
May 13 13:05:13 nas vaultwarden[2453]:    3: std::sys_common::backtrace::__rust_end_short_backtrace
May 13 13:05:13 nas vaultwarden[2453]:    4: rust_begin_unwind
May 13 13:05:13 nas vaultwarden[2453]:    5: core::panicking::panic_fmt
May 13 13:05:13 nas vaultwarden[2453]:    6: core::result::unwrap_failed
May 13 13:05:13 nas vaultwarden[2453]:    7: tokio::runtime::enter::exit
May 13 13:05:13 nas vaultwarden[2453]:    8: tokio::runtime::thread_pool::worker::block_in_place
May 13 13:05:13 nas vaultwarden[2453]:    9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
May 13 13:05:13 nas vaultwarden[2453]:   10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
May 13 13:05:13 nas vaultwarden[2453]:   11: tokio::runtime::task::harness::poll_future
May 13 13:05:13 nas vaultwarden[2453]:   12: tokio::runtime::task::harness::Harness<T,S>::poll
May 13 13:05:13 nas vaultwarden[2453]:   13: std::thread::local::LocalKey<T>::with
May 13 13:05:13 nas vaultwarden[2453]:   14: tokio::runtime::thread_pool::worker::Context::run_task
May 13 13:05:13 nas vaultwarden[2453]:   15: tokio::runtime::thread_pool::worker::Context::run
May 13 13:05:13 nas vaultwarden[2453]:   16: tokio::macros::scoped_tls::ScopedKey<T>::set
May 13 13:05:13 nas vaultwarden[2453]:   17: tokio::runtime::thread_pool::worker::run
May 13 13:05:13 nas vaultwarden[2453]:   18: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
May 13 13:05:13 nas vaultwarden[2453]:   19: tokio::runtime::task::harness::Harness<T,S>::poll
May 13 13:05:13 nas vaultwarden[2453]:   20: tokio::runtime::blocking::pool::Inner::run
May 13 13:05:13 nas vaultwarden[2453]:   21: std::sys_common::backtrace::__rust_begin_short_backtrace
May 13 13:05:13 nas vaultwarden[2453]:   22: core::ops::function::FnOnce::call_once{{vtable.shim}}
May 13 13:05:13 nas vaultwarden[2453]:   23: std::sys::unix::thread::Thread::new::thread_start
May 13 13:05:13 nas vaultwarden[2453]:   24: start_thread
May 13 13:05:13 nas vaultwarden[2453]:   25: clone

After every panic it crashes until systemd restart it. I’m the only one who use my vaultwarden service and most of the time I use it from one client at a time. Found nothing similar in bugtracker. Any ideas why could this happen? Usually I see up to 20 times of such panic state during a day.

Vaultwarden 1.24.0

This should be fixed in the latest commits, as of a couple of days ago. Not sure where you got your binary from, but you should rebuild the latest code or extract the binary from the Docker image tagged testing.

Thanks for the info. I built my binary from official source (github) a couple of weeks ago. Gonna rebuild soon.