Vaultwarden update command fail & then vaultwarden not start even after reboot

Yes, don’t worry about the database, the update only touches the program files/executable, not the userdata.

Thanks for making dietpi solid operating system, 99.9 % my system works fine with all operating system upgrades. only 0.1% i struck when i updating homeasssistant or vaultwarden in a year. else my hardware is always happy with whole system functionality.

1 Like

Thanks for your kind feedback.

Yeah Home Assistant and vaultwarden are both compiled in case, which is generally more prone to errors compared to using precompiled binaries. Sadly those also take much more time for install, so that issues are doubled nasty.

ok it’s failing on my test system RPi3B+ ARMv6 as well on a new fresh install

root@DietPi3:~# echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 1
root@DietPi3:~#
   Compiling yubico v0.11.0
thread '<unnamed>' panicked at 'wanted an rlib: "Cannot allocate memory"', compiler/rustc_codegen_llvm/src/back/lto.rs:112:49
stack backtrace:
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.61.0 (fe5b13d68 2022-05-18) running on armv7-unknown-linux-gnueabihf

note: compiler flags: --crate-type bin -C opt-level=3 -C lto=thin -C strip=debuginfo

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `vaultwarden`

Works well on x86_64, will test ARMv8/aarch64 now.

Nasty, generally or works on aarch64 (tested on Odroid N2+) but 4 GiB, even ~4.7 GiB memory isn’t sufficient. The last compile step, the main vaultwarden binary, takes alone 3 GiB before the whole SSH session got OOM-killed. On x86_64 this was much less. Also reducing to 1 compile jobs doesn’t help since it is only a single job: All others have finished until memory usage peaks that high.

So it looks like we need to set the swap space to 5 or 6 GiB (I’ll do further tests), at least for aarch64. However, this is not the reason for the failure here. I’ll test on ARMv7 RPi image and ARMv6, probably it is affecting Raspbian only.

Rebooted and tried again, same error. It looks like you have reproduced the error, but let me know if I can provide any info.

@MichaIng a test install on my RPi4B ARMv8 finished within 40 minuted without issues.

If new version of vaultwarden is not capability with raspberypi B2, please guide me so that i will install my old working version of vaultwarden & forget to upgrade in future version. I think in past i have vaultwarden 2.24.1 was installed & it was installed in Dec 2021 on same raspberry pi B2.

I did some testing it seems to be possible to install version 1.24. At least it finished on my RPi3B+ 32bit

Following would need to be changed by yourself inside /boot/dietpi/dietpi-software

Search for line 9829 and replace the whole line with

local version='1.24.0'

Now, you should be able to reinstall Vaultwarden

dietpi-software reinstall 183
1 Like

Thanks @Joulinar, I have done same instruction you told, after replacing that line & make like local version='1.24.0' system able to install vaultwarden. so is it mean that vaultwarden now end of life on raspberry pi with 1gb ram? is this the last milestone upto which raspberry pi 1gb ram can get vaultwarden version.

I’d say it is a bug which can be fixed. Cannot imagine that vaultwarden intentionally dropped support for ARMv7 or Raspbian intentionally.

v1.25.0 even shipped a “fix” for ARMv6 and some flags change for ARMv7: Fix building mimalloc on armv6 by BlackDex · Pull Request #2397 · dani-garcia/vaultwarden · GitHub
Probably that actually broke it, at least for Raspbian.

The last days I tried to play around with different rust versions but without success. I guess we would need to report the behaviour to dani-garcia on their GitHub project GitHub - dani-garcia/vaultwarden: Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs

Any update regarding vaultwarden install/update/upgrade on raspberry pi b2 on dietpi future update version 8.6 ?

I’m not 100% sure bit I guess this would need to be reported to Vaultwarden guys as it seems their source code compilation failing. Maybe they have a hint what the issue is.

Jep, report is still outstanding. I’ll do that when I’m home.

Wait, are we just hitting the 32-bit single-process memory limit here? I remember that on aarch64 the memory consumption for compiling was higher, but probably it is too high now on armv7l as well. At least it fails at the very last step indeed where also on aarch64 I saw this peak.

Quite interesting questing :thinking:

Anyway, I did again a test today on my RPi 3B+ (1GB memory + 2GB SWAP) and Vaultwarden finished installation within 90 minutes successfully. Peak memory usage was at around 1.75GB total SWAP used. I’m not 100% sure what has been changed. At least nothing on DietPi side.

Mysterious, there hasn’t been a vaultwarden or Rust update in the meantime either. The dependencies crate versions are all hardcoded but their dependencies (according to the cargo.lock) are not all hardcoded, so probably there was one with an update which fixed the high memory usage :thinking:.

I’ll also try again on aarch64 to check memory usage peak.

I have update dietpi to version 8.6.1 & in its documentation it has written the vaultwarden installation process updated & fixed. but still it is fail & dietpi system not able to install vaultwarden on raspberrypi b2.