[GH-ISSUE #1091] bitwardenrs/server-mysql:latest (1.16.3): [ERROR] thread 'unnamed' panicked #772

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

Originally created by @itsthejb on GitHub (Aug 10, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1091

Subject of the issue

On attempt to login (app or web) seeing the following error in the console:

[2020-08-10 13:04:19.584][panic][ERROR] thread 'unnamed' panicked at 'called `Option::unwrap()` on a `None` value': src/api/identity.rs:150
   0: bitwarden_rs::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530
   2: rust_begin_unwind
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437
   3: core::panicking::panic_fmt
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85
   4: core::panicking::panic
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:50
   5: bitwarden_rs::api::identity::_password_login
   6: bitwarden_rs::api::identity::rocket_route_fn_login
   7: <F as rocket::handler::Handler>::handle
   8: rocket::rocket::Rocket::route_and_process
   9: <rocket::rocket::Rocket as hyper::server::Handler>::handle
  10: hyper::server::Worker<H>::handle_connection
  11: hyper::server::listener::spawn_with::{{closure}}
  12: std::sys_common::backtrace::__rust_begin_short_backtrace
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
  14: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081
      std::sys::unix::thread::Thread::new::thread_start
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/sys/unix/thread.rs:87
  15: start_thread
  16: clone

Your environment

Steps to reproduce

[2020-08-10 13:39:06][response][INFO] POST /identity/connect/token (login) => 400 Bad Request

Expected behaviour

  • Can log in

Actual behaviour

  • Errors as above

Relevant logs

Originally created by @itsthejb on GitHub (Aug 10, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1091 # Subject of the issue On attempt to login (app or web) seeing the following error in the console: ``` [2020-08-10 13:04:19.584][panic][ERROR] thread 'unnamed' panicked at 'called `Option::unwrap()` on a `None` value': src/api/identity.rs:150 0: bitwarden_rs::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530 2: rust_begin_unwind at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437 3: core::panicking::panic_fmt at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85 4: core::panicking::panic at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:50 5: bitwarden_rs::api::identity::_password_login 6: bitwarden_rs::api::identity::rocket_route_fn_login 7: <F as rocket::handler::Handler>::handle 8: rocket::rocket::Rocket::route_and_process 9: <rocket::rocket::Rocket as hyper::server::Handler>::handle 10: hyper::server::Worker<H>::handle_connection 11: hyper::server::listener::spawn_with::{{closure}} 12: std::sys_common::backtrace::__rust_begin_short_backtrace 13: core::ops::function::FnOnce::call_once{{vtable.shim}} 14: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081 <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081 std::sys::unix::thread::Thread::new::thread_start at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/sys/unix/thread.rs:87 15: start_thread 16: clone ``` ### Your environment - [Docker bitwardenrs/server-mysql:latest (1.16.3)](https://hub.docker.com/layers/bitwardenrs/server-mysql/latest/images/sha256-c7aac7cd0200bdeee44bb84c96c2e454b8bbccf55feaec7c1227a6600f97e458?context=explore) - Backend: MariaDB Docker latest (https://hub.docker.com/layers/mariadb/library/mariadb/latest/images/sha256-1a60cc734bd3fa767a1d8cdabb47b9a5b85cb50b0a14935b46eae550a5c9d0cf?context=explore) ### Steps to reproduce - Trying to log in using the latest release throws this error https://github.com/dani-garcia/bitwarden_rs/releases/tag/1.16.3 - Tried to go back to older versions, e.g. 1.16.0 but then get: ``` [2020-08-10 13:39:06][response][INFO] POST /identity/connect/token (login) => 400 Bad Request ``` ### Expected behaviour - Can log in ### Actual behaviour - Errors as above ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. -->
kerem closed this issue 2026-03-03 02:03:04 +03:00
Author
Owner

@dani-garcia commented on GitHub (Aug 11, 2020):

Very strange error, it seems to happen when we are trying to retrieve the user from the database a second time, and that second one is failing. I've removed the redundant query in github.com/dani-garcia/bitwarden_rs@29c6b145ca, which is going to be available in the testing docker image in a couple of hours once its built.

<!-- gh-comment-id:672005951 --> @dani-garcia commented on GitHub (Aug 11, 2020): Very strange error, it seems to happen when we are trying to retrieve the user from the database a second time, and that second one is failing. I've removed the redundant query in https://github.com/dani-garcia/bitwarden_rs/commit/29c6b145ca40e5bc125f2fb7f00b3ef5dca90d87, which is going to be available in the testing docker image in a couple of hours once its built.
Author
Owner

@itsthejb commented on GitHub (Aug 13, 2020):

Hi @dani-garcia,

Thanks for your response. Just trying the testing image bitwardenrs/server-mysql:testing and now getting:

[2020-08-13 23:25:26.282][panic][ERROR] thread 'unnamed' panicked at 'Error loading twofactor: DeserializationError("Numeric overflow/underflow occurred")': src/db/models/two_factor.rs:110
   0: bitwarden_rs::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530
   2: rust_begin_unwind
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437
   3: core::panicking::panic_fmt
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85
   4: core::option::expect_none_failed
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/option.rs:1269
   5: bitwarden_rs::db::models::two_factor::TwoFactor::find_by_user
   6: bitwarden_rs::api::identity::_password_login
   7: bitwarden_rs::api::identity::rocket_route_fn_login
   8: <F as rocket::handler::Handler>::handle
   9: rocket::rocket::Rocket::route_and_process
  10: <rocket::rocket::Rocket as hyper::server::Handler>::handle
  11: hyper::server::Worker<H>::handle_connection
  12: hyper::server::listener::spawn_with::{{closure}}
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
  14: core::ops::function::FnOnce::call_once{{vtable.shim}}
  15: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081
      <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081
      std::sys::unix::thread::Thread::new::thread_start
             at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/sys/unix/thread.rs:87
  16: start_thread
  17: clone
<!-- gh-comment-id:673718738 --> @itsthejb commented on GitHub (Aug 13, 2020): Hi @dani-garcia, Thanks for your response. Just trying the testing image `bitwardenrs/server-mysql:testing` and now getting: ``` [2020-08-13 23:25:26.282][panic][ERROR] thread 'unnamed' panicked at 'Error loading twofactor: DeserializationError("Numeric overflow/underflow occurred")': src/db/models/two_factor.rs:110 0: bitwarden_rs::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:530 2: rust_begin_unwind at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/panicking.rs:437 3: core::panicking::panic_fmt at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/panicking.rs:85 4: core::option::expect_none_failed at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libcore/option.rs:1269 5: bitwarden_rs::db::models::two_factor::TwoFactor::find_by_user 6: bitwarden_rs::api::identity::_password_login 7: bitwarden_rs::api::identity::rocket_route_fn_login 8: <F as rocket::handler::Handler>::handle 9: rocket::rocket::Rocket::route_and_process 10: <rocket::rocket::Rocket as hyper::server::Handler>::handle 11: hyper::server::Worker<H>::handle_connection 12: hyper::server::listener::spawn_with::{{closure}} 13: std::sys_common::backtrace::__rust_begin_short_backtrace 14: core::ops::function::FnOnce::call_once{{vtable.shim}} 15: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081 <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once at rustc/daecab3a784f28082df90cebb204998051f3557d/src/liballoc/boxed.rs:1081 std::sys::unix::thread::Thread::new::thread_start at rustc/daecab3a784f28082df90cebb204998051f3557d/src/libstd/sys/unix/thread.rs:87 16: start_thread 17: clone ```
Author
Owner

@jjlin commented on GitHub (Aug 15, 2020):

This might be related to the various other MySQL-related issues reported recently. Is this a new installation? Were there other errors in the log? What happens if you use mariadb:10.3 instead of latest?

<!-- gh-comment-id:674371115 --> @jjlin commented on GitHub (Aug 15, 2020): This might be related to the various other MySQL-related issues reported recently. Is this a new installation? Were there other errors in the log? What happens if you use `mariadb:10.3` instead of `latest`?
Author
Owner

@itsthejb commented on GitHub (Aug 19, 2020):

@jjlin No, not new; has been running for some time here (months, year?). I tried going back to Mariadb 10.3, but then my database is not readable:

2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started.
2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started.
2020-08-19 11:18:06 0 [Note] mysqld (mysqld 10.3.24-MariaDB-1:10.3.24+maria~focal) starting as process 1 ...
2020-08-19 11:18:06 0 [Note] InnoDB: Using Linux native AIO
2020-08-19 11:18:06 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-08-19 11:18:06 0 [Note] InnoDB: Uses event mutexes
2020-08-19 11:18:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-19 11:18:06 0 [Note] InnoDB: Number of pools: 1
2020-08-19 11:18:06 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-08-19 11:18:06 0 [Note] InnoDB: Initializing buffer pool, total size = 384M, instances = 1, chunk size = 128M
2020-08-19 11:18:06 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-19 11:18:06 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-08-19 11:18:08 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.5.4.
2020-08-19 11:18:08 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-08-19 11:18:09 0 [Note] InnoDB: Starting shutdown...
2020-08-19 11:18:09 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-08-19 11:18:09 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-08-19 11:18:09 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-19 11:18:09 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2020-08-19 11:18:09 0 [ERROR] Aborting
<!-- gh-comment-id:676012100 --> @itsthejb commented on GitHub (Aug 19, 2020): @jjlin No, not new; has been running for some time here (months, year?). I tried going back to Mariadb 10.3, but then my database is not readable: ``` 2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started. 2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2020-08-19 11:18:06+02:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started. 2020-08-19 11:18:06 0 [Note] mysqld (mysqld 10.3.24-MariaDB-1:10.3.24+maria~focal) starting as process 1 ... 2020-08-19 11:18:06 0 [Note] InnoDB: Using Linux native AIO 2020-08-19 11:18:06 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-08-19 11:18:06 0 [Note] InnoDB: Uses event mutexes 2020-08-19 11:18:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-08-19 11:18:06 0 [Note] InnoDB: Number of pools: 1 2020-08-19 11:18:06 0 [Note] InnoDB: Using SSE2 crc32 instructions 2020-08-19 11:18:06 0 [Note] InnoDB: Initializing buffer pool, total size = 384M, instances = 1, chunk size = 128M 2020-08-19 11:18:06 0 [Note] InnoDB: Completed initialization of buffer pool 2020-08-19 11:18:06 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-08-19 11:18:08 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with MariaDB 10.5.4. 2020-08-19 11:18:08 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-08-19 11:18:09 0 [Note] InnoDB: Starting shutdown... 2020-08-19 11:18:09 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-08-19 11:18:09 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-08-19 11:18:09 0 [Note] Plugin 'FEEDBACK' is disabled. 2020-08-19 11:18:09 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-08-19 11:18:09 0 [ERROR] Aborting ```
Author
Owner

@BlackDex commented on GitHub (Oct 9, 2020):

@itsthejb do you still have issues using the very latest testing tagged version?

<!-- gh-comment-id:706391247 --> @BlackDex commented on GitHub (Oct 9, 2020): @itsthejb do you still have issues using the very latest testing tagged version?
Author
Owner

@BlackDex commented on GitHub (Oct 30, 2020):

Closing this ticket because of inactivity and the issue should be resolved in the latest version.

Please reopen if needed.

<!-- gh-comment-id:719094611 --> @BlackDex commented on GitHub (Oct 30, 2020): Closing this ticket because of inactivity and the issue should be resolved in the latest version. Please reopen if needed.
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#772
No description provided.