Panic on migration, 1.27.0 #951

Closed
opened 2025-10-09 16:58:12 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @lretq on GitHub.

Subject of the issue

Since upgrading to the 1.27.0 version, with the groups feature support, vaultwarden panics

Deployment environment

  • vaultwarden version: 1.27.0
  • Install method: docker image

  • Clients used: not applicable

  • Reverse proxy and version: not applicable

  • MySQL/MariaDB or PostgreSQL version: Galera cluster behind a loadbalancer, running mariadb version 15.1

  • Other relevant details: none

Steps to reproduce

Start vaultwarden with the loadbalancer configured as DB, it starts and panics.

Expected behaviour

It shouldn't panic.

Actual behaviour

Panic

Troubleshooting data

[2023-01-01 17:36:47.220][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2022-07-27-110000_add_group_support", version: MigrationVersion("20220727110000") }, DatabaseError(Unknown, "Can't create table `vaultwarden`.`groups` (errno: 150 \"Foreign key constraint is incorrectly formed\")"))': src/db/mod.rs:474
   0: vaultwarden::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: vaultwarden::db::mysql_migrations::run_migrations
   8: vaultwarden::db::DbPool::from_config
   9: vaultwarden::main::{{closure}}
  10: tokio::runtime::park::CachedParkThread::block_on
  11: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
  12: tokio::runtime::runtime::Runtime::block_on
  13: rocket::async_main
  14: vaultwarden::main
  15: std::sys_common::backtrace::__rust_begin_short_backtrace
  16: std::rt::lang_start::{{closure}}
  17: std::rt::lang_start_internal
  18: main
  19: __libc_start_main
  20: _start
Originally created by @lretq on GitHub. <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> Since upgrading to the 1.27.0 version, with the groups feature support, vaultwarden panics ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: 1.27.0 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: docker image * Clients used: not applicable * Reverse proxy and version: not applicable * MySQL/MariaDB or PostgreSQL version: Galera cluster behind a loadbalancer, running mariadb version 15.1 * Other relevant details: none ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> Start vaultwarden with the loadbalancer configured as DB, it starts and panics. ### Expected behaviour <!-- Tell us what you expected to happen --> It shouldn't panic. ### Actual behaviour <!-- Tell us what actually happened --> Panic ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> ``` [2023-01-01 17:36:47.220][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2022-07-27-110000_add_group_support", version: MigrationVersion("20220727110000") }, DatabaseError(Unknown, "Can't create table `vaultwarden`.`groups` (errno: 150 \"Foreign key constraint is incorrectly formed\")"))': src/db/mod.rs:474 0: vaultwarden::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook 2: std::panicking::begin_panic_handler::{{closure}} 3: std::sys_common::backtrace::__rust_end_short_backtrace 4: rust_begin_unwind 5: core::panicking::panic_fmt 6: core::result::unwrap_failed 7: vaultwarden::db::mysql_migrations::run_migrations 8: vaultwarden::db::DbPool::from_config 9: vaultwarden::main::{{closure}} 10: tokio::runtime::park::CachedParkThread::block_on 11: tokio::runtime::scheduler::multi_thread::MultiThread::block_on 12: tokio::runtime::runtime::Runtime::block_on 13: rocket::async_main 14: vaultwarden::main 15: std::sys_common::backtrace::__rust_begin_short_backtrace 16: std::rt::lang_start::{{closure}} 17: std::rt::lang_start_internal 18: main 19: __libc_start_main 20: _start ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#951