12b
Février 11, 2024, 9:29
21
J’avais regardé passbolt avant de choisir une solution pour notre chaton. Ca m’avait l’air pas mal du tout.
Mais comme un membre de l’équipe sysadmin utilisait dejà pass pour ses besoins perso on est parti la dessus.
srs
Février 11, 2024, 1:55
22
Hello 12b,
perso j’utilise pass en ligne de commande sur mon pc. Et il existe une application pour telephone qui fonctionne tres bien (ma femme l’utilise donc c’est accessible, en tout cas pour la partie visible du systeme).
Par contre en equipe !? vous n’avez pas de conflits ?
Sebastien
12b
Février 11, 2024, 4:13
23
Ah, je ne connais pas l’appli pour téléphone. Ça m’intéresse ça!
Non pas de conflit en équipe.
Mais pour éviter les conflits de merge ça demande un peu de rigueur, comme pour un dépôt de code classique où on travaille a plusieurs.
Avant de modifier ou ajouter un mot de passe on fait un pass git pull
pour récupérer en local la dernière version du dépot git partagé.
Et après avoir fait des modifications/ajouts, si ça coince au moment du pass git push
parce-que quelqu’un·e d’autre a fait un push depuis notre pull, on refait un pull, qui par défaut fait un rebase parce-qu’on a mis ça dans notre ~/.gitconfig :
[pull]
rebase = true
Après on pourrait toujours avoir un conflit si le même mot de passe est modifié par deux personnes en même temps, mais ça ne nous ai jamais arrivé. On ne modifie pas les mots de passe très souvent.
Bon, en fait c’est un peu plus compliqué que ça parce-qu’on a des mots de passe perso dans ~/.passwordstore et le git partagé est dans un sous répertoire de ~/.password-store/
Et dans mon cas ~/.passwordstore est un dépot git perso, que je partage entre mes différents devices et le sous répertoire des mot de passe de l’équipe est un autre dépôt git, intégré comme un sous module git dans mon dépôt perso.
1 « J'aime »
Maxime
Février 11, 2024, 6:03
24
Non aucun souci, en particulier parce que tu ne travailles jamais sur le même fichier (un mdp = 1 fichier). Du coup la routine c’est :
pass git pull
si merge entre la version locale et la version distante : enregistrer
créer/éditer/copier des mdp
pass git push
1 « J'aime »
srs
Février 13, 2024, 10:41
25
j’utilise le client ios passforios . Je ne connais pas les autres que tu peux trouver sur la page du projet a la section
Compatible Clients
Sébastien
Désolé pour la brièveté de mon message, je passe en coup de vent sur le forum.
TL;DR
Remplace cargo build --release
par cargo build --profile release-micro
.
cargo build --release
Command being timed: "cargo build --release --features sqlite"
User time (seconds): 1085.59
System time (seconds): 44.74
Percent of CPU this job got: 222%
Elapsed (wall clock) time (h:mm:ss or m:ss): 8:27.12
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 3366016
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1107
Minor (reclaiming a frame) page faults: 9218023
Voluntary context switches: 20591
Involuntary context switches: 102882
Swaps: 0
File system inputs: 179224
File system outputs: 1930808
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
~3.36Go en pic
cargo build --profile release-micro
Command being timed: "cargo build --profile release-micro --features sqlite"
User time (seconds): 776.19
System time (seconds): 47.56
Percent of CPU this job got: 286%
Elapsed (wall clock) time (h:mm:ss or m:ss): 4:47.70
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2241464
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 800
Minor (reclaiming a frame) page faults: 9617151
Voluntary context switches: 22277
Involuntary context switches: 110647
Swaps: 0
File system inputs: 968
File system outputs: 2099976
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
~2,24Go en pic
Références
dani-garcia:main
← gladiac:profile-release-micro
opened 10:31AM - 23 Nov 23 UTC
OpenWRT (https://openwrt.org) is a project which builds and distributes firmware… for embedded devies like routers, access points, and so on. These devices are usually very limited in terms of storage. Therefore, **optimizing binaries for size** at the cost of execution speed is usually desired. As I intend to provide a vaultwarden package for OpenWRT this change would help significantly.
This PR adds an additional build-target, namely "release-micro", which implements several parameters which optimize in favor of binary size.
The following parameters were chosen:
- opt-level "z": Optimize for size with disabled loop vectorization
- strip "symbols": Strip debuginfo and symbols from binary
- lto "fat": Enable link-time optimizations across all crates
- codegen-units 1: Disable parallelization of code generation to allow for additional optimizations
- panic "abort": Abort on Panic() instead of unwinding
All these build parameters significantly reduce the binary size from >40MB to <15MB - the actual amount depends on the target architecture.
I would like to upstream this new build target to keep our build environment simple. Other projects which deploy vaultwarden on size-constrained environments may benefit from this change too.
opened 10:22PM - 05 Feb 24 UTC
closed 01:14PM - 10 Feb 24 UTC
<!--
# ###
NOTE: Please update to the latest version of vaultwarden be… fore 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
When building vaultwarden on 32-bit ARM systems, it fails at the last compilation step, when assembling/linking the final `vaultwarden` binary. I first recognised that our GitHub Actions workflow failed building vaultwarden v1.30.3. This compiles on the public GitHub Actions runners within a QEMU-emulated container, throwing the following errors:
```
fatal runtime error: Rust cannot catch foreign exceptions
qemu: uncaught target signal 6 (Aborted) - core dumped
error: could not compile `vaultwarden` (bin "vaultwarden")
Caused by:
process didn't exit successfully: `/root/.rustup/toolchains/1.75.0-armv7-unknown-linux-gnueabihf/bin/rustc --crate-name vaultwarden --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto=fat -C codegen-units=1 --cfg 'feature="libsqlite3-sys"' --cfg 'feature="sqlite"' -C metadata=1d58e77e878ebff3 -C extra-filename=-1d58e77e878ebff3 --out-dir /tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps -C strip=debuginfo -L dependency=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps --extern argon2=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libargon2-b3c0e2fb66f02f2d.rlib --extern bigdecimal=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libbigdecimal-5c86038a6cda2357.rlib --extern bytes=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libbytes-96d5c91a8970d3e0.rlib --extern cached=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libcached-821a263ab8ba999e.rlib --extern chrono=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libchrono-15dfa97106ea9ebc.rlib --extern chrono_tz=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libchrono_tz-78b03a250f1270bd.rlib --extern cookie=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libcookie-043627deeb63f29d.rlib --extern cookie_store=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libcookie_store-669046e1dd142dcd.rlib --extern dashmap=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdashmap-4e900a06ccdaf881.rlib --extern data_encoding=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdata_encoding-2d1c20ef5ab53b9f.rlib --extern data_url=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdata_url-b52f35a304c403e4.rlib --extern diesel=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdiesel-ca0c77a5a320c634.rlib --extern diesel_migrations=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdiesel_migrations-16e3489a14ca359f.rlib --extern dotenvy=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libdotenvy-0639e1593ada03c1.rlib --extern email_address=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libemail_address-ef15593c949ba84d.rlib --extern fern=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libfern-a911570f27da85c4.rlib --extern futures=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libfutures-e89e3ce9357840c0.rlib --extern governor=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libgovernor-4f4ba3b235183b38.rlib --extern handlebars=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libhandlebars-c7fd7cd5e66214d0.rlib --extern html5gum=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libhtml5gum-f30a2504d52ce515.rlib --extern job_scheduler_ng=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libjob_scheduler_ng-9ad45ce09bc25744.rlib --extern jsonwebtoken=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libjsonwebtoken-450434a1f9394291.rlib --extern lettre=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/liblettre-452bf5ebf537ccf1.rlib --extern libsqlite3_sys=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/liblibsqlite3_sys-31047204d554a120.rlib --extern log=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/liblog-546ced36359b5ce9.rlib --extern num_derive=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libnum_derive-5e15818039b17888.so --extern num_traits=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libnum_traits-92bc955e64bc391c.rlib --extern once_cell=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libonce_cell-49d951a6756b3fe0.rlib --extern openssl=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libopenssl-f81ff30d71ee3f77.rlib --extern paste=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libpaste-a79e4674c1034386.so --extern percent_encoding=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libpercent_encoding-39b0e9fee14dda0f.rlib --extern pico_args=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libpico_args-1ee48336305d6717.rlib --extern rand=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/librand-f0cff6ea6faef3d8.rlib --extern regex=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libregex-527e30f8b0362c21.rlib --extern reqwest=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libreqwest-ea7db8ba6bf40739.rlib --extern ring=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libring-777c51b0c3d288c0.rlib --extern rmpv=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/librmpv-fdaa6bd5760011c9.rlib --extern rocket=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/librocket-4ee1c8e28bd14c24.rlib --extern rocket_ws=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/librocket_ws-2f177dcbabdf5516.rlib --extern rpassword=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/librpassword-c8818deb34b76ea8.rlib --extern semver=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libsemver-60d3d6cb5a7e3505.rlib --extern serde=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libserde-9cc93a7189128f25.rlib --extern serde_json=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libserde_json-86d2120e19427cc1.rlib --extern syslog=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libsyslog-5c152346c1ce8d61.rlib --extern time=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libtime-56441102515dd14f.rlib --extern tokio=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libtokio-5dfae61c8444c1a0.rlib --extern tokio_tungstenite=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libtokio_tungstenite-e58dabcf1dceb921.rlib --extern totp_lite=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libtotp_lite-2df5b536107c4b4f.rlib --extern tracing=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libtracing-ceeaccc151504516.rlib --extern url=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/liburl-16c84f7f7f3fb00c.rlib --extern uuid=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libuuid-73a3a4756b8fa3b6.rlib --extern webauthn_rs=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libwebauthn_rs-df1e3b8e026399eb.rlib --extern which=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libwhich-19dbf4ddca88d868.rlib --extern yubico=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/deps/libyubico-72696a30719f44e6.rlib -L native=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/build/libsqlite3-sys-23d986867762c654/out -L native=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/build/ring-74ae6fe0630f3cbf/out -L native=/tmp/DietPi-Software/vaultwarden-1.30.3/target/release/build/psm-af7ee5a81c4a19fd/out --cfg sqlite` (signal: 6, SIGABRT: process abort signal)
```
I then tested it natively on an Odroid XU4, which fails with:
```
LLVM ERROR: out of memory
Allocation failed
error: could not compile `vaultwarden` (bin "vaultwarden")
Caused by:
process didn't exit successfully: `/root/.rustup/toolchains/1.75.0-armv7-unknown-linux-gnueabihf/bin/rustc --crate-name vaultwarden --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto=fat -C codegen-units=1 --cfg 'feature="libsqlite3-sys"' --cfg 'feature="sqlite"' -C metadata=1d58e77e878ebff3 -C extra-filename=-1d58e77e878ebff3 --out-dir /root/vaultwarden-1.30.3/target/release/deps -C strip=debuginfo -L dependency=/root/vaultwarden-1.30.3/target/release/deps --extern argon2=/root/vaultwarden-1.30.3/target/release/deps/libargon2-b3c0e2fb66f02f2d.rlib --extern bigdecimal=/root/vaultwarden-1.30.3/target/release/deps/libbigdecimal-5c86038a6cda2357.rlib --extern bytes=/root/vaultwarden-1.30.3/target/release/deps/libbytes-96d5c91a8970d3e0.rlib --extern cached=/root/vaultwarden-1.30.3/target/release/deps/libcached-821a263ab8ba999e.rlib --extern chrono=/root/vaultwarden-1.30.3/target/release/deps/libchrono-15dfa97106ea9ebc.rlib --extern chrono_tz=/root/vaultwarden-1.30.3/target/release/deps/libchrono_tz-78b03a250f1270bd.rlib --extern cookie=/root/vaultwarden-1.30.3/target/release/deps/libcookie-043627deeb63f29d.rlib --extern cookie_store=/root/vaultwarden-1.30.3/target/release/deps/libcookie_store-669046e1dd142dcd.rlib --extern dashmap=/root/vaultwarden-1.30.3/target/release/deps/libdashmap-4e900a06ccdaf881.rlib --extern data_encoding=/root/vaultwarden-1.30.3/target/release/deps/libdata_encoding-2d1c20ef5ab53b9f.rlib --extern data_url=/root/vaultwarden-1.30.3/target/release/deps/libdata_url-b52f35a304c403e4.rlib --extern diesel=/root/vaultwarden-1.30.3/target/release/deps/libdiesel-ca0c77a5a320c634.rlib --extern diesel_migrations=/root/vaultwarden-1.30.3/target/release/deps/libdiesel_migrations-16e3489a14ca359f.rlib --extern dotenvy=/root/vaultwarden-1.30.3/target/release/deps/libdotenvy-0639e1593ada03c1.rlib --extern email_address=/root/vaultwarden-1.30.3/target/release/deps/libemail_address-ef15593c949ba84d.rlib --extern fern=/root/vaultwarden-1.30.3/target/release/deps/libfern-a911570f27da85c4.rlib --extern futures=/root/vaultwarden-1.30.3/target/release/deps/libfutures-e89e3ce9357840c0.rlib --extern governor=/root/vaultwarden-1.30.3/target/release/deps/libgovernor-4f4ba3b235183b38.rlib --extern handlebars=/root/vaultwarden-1.30.3/target/release/deps/libhandlebars-c7fd7cd5e66214d0.rlib --extern html5gum=/root/vaultwarden-1.30.3/target/release/deps/libhtml5gum-f30a2504d52ce515.rlib --extern job_scheduler_ng=/root/vaultwarden-1.30.3/target/release/deps/libjob_scheduler_ng-9ad45ce09bc25744.rlib --extern jsonwebtoken=/root/vaultwarden-1.30.3/target/release/deps/libjsonwebtoken-450434a1f9394291.rlib --extern lettre=/root/vaultwarden-1.30.3/target/release/deps/liblettre-452bf5ebf537ccf1.rlib --extern libsqlite3_sys=/root/vaultwarden-1.30.3/target/release/deps/liblibsqlite3_sys-31047204d554a120.rlib --extern log=/root/vaultwarden-1.30.3/target/release/deps/liblog-546ced36359b5ce9.rlib --extern num_derive=/root/vaultwarden-1.30.3/target/release/deps/libnum_derive-5e15818039b17888.so --extern num_traits=/root/vaultwarden-1.30.3/target/release/deps/libnum_traits-92bc955e64bc391c.rlib --extern once_cell=/root/vaultwarden-1.30.3/target/release/deps/libonce_cell-49d951a6756b3fe0.rlib --extern openssl=/root/vaultwarden-1.30.3/target/release/deps/libopenssl-f81ff30d71ee3f77.rlib --extern paste=/root/vaultwarden-1.30.3/target/release/deps/libpaste-a79e4674c1034386.so --extern percent_encoding=/root/vaultwarden-1.30.3/target/release/deps/libpercent_encoding-39b0e9fee14dda0f.rlib --extern pico_args=/root/vaultwarden-1.30.3/target/release/deps/libpico_args-1ee48336305d6717.rlib --extern rand=/root/vaultwarden-1.30.3/target/release/deps/librand-f0cff6ea6faef3d8.rlib --extern regex=/root/vaultwarden-1.30.3/target/release/deps/libregex-527e30f8b0362c21.rlib --extern reqwest=/root/vaultwarden-1.30.3/target/release/deps/libreqwest-ea7db8ba6bf40739.rlib --extern ring=/root/vaultwarden-1.30.3/target/release/deps/libring-777c51b0c3d288c0.rlib --extern rmpv=/root/vaultwarden-1.30.3/target/release/deps/librmpv-fdaa6bd5760011c9.rlib --extern rocket=/root/vaultwarden-1.30.3/target/release/deps/librocket-4ee1c8e28bd14c24.rlib --extern rocket_ws=/root/vaultwarden-1.30.3/target/release/deps/librocket_ws-2f177dcbabdf5516.rlib --extern rpassword=/root/vaultwarden-1.30.3/target/release/deps/librpassword-c8818deb34b76ea8.rlib --extern semver=/root/vaultwarden-1.30.3/target/release/deps/libsemver-60d3d6cb5a7e3505.rlib --extern serde=/root/vaultwarden-1.30.3/target/release/deps/libserde-9cc93a7189128f25.rlib --extern serde_json=/root/vaultwarden-1.30.3/target/release/deps/libserde_json-86d2120e19427cc1.rlib --extern syslog=/root/vaultwarden-1.30.3/target/release/deps/libsyslog-5c152346c1ce8d61.rlib --extern time=/root/vaultwarden-1.30.3/target/release/deps/libtime-56441102515dd14f.rlib --extern tokio=/root/vaultwarden-1.30.3/target/release/deps/libtokio-5dfae61c8444c1a0.rlib --extern tokio_tungstenite=/root/vaultwarden-1.30.3/target/release/deps/libtokio_tungstenite-e58dabcf1dceb921.rlib --extern totp_lite=/root/vaultwarden-1.30.3/target/release/deps/libtotp_lite-2df5b536107c4b4f.rlib --extern tracing=/root/vaultwarden-1.30.3/target/release/deps/libtracing-ceeaccc151504516.rlib --extern url=/root/vaultwarden-1.30.3/target/release/deps/liburl-16c84f7f7f3fb00c.rlib --extern uuid=/root/vaultwarden-1.30.3/target/release/deps/libuuid-73a3a4756b8fa3b6.rlib --extern webauthn_rs=/root/vaultwarden-1.30.3/target/release/deps/libwebauthn_rs-df1e3b8e026399eb.rlib --extern which=/root/vaultwarden-1.30.3/target/release/deps/libwhich-19dbf4ddca88d868.rlib --extern yubico=/root/vaultwarden-1.30.3/target/release/deps/libyubico-72696a30719f44e6.rlib -L native=/root/vaultwarden-1.30.3/target/release/build/libsqlite3-sys-23d986867762c654/out -L native=/root/vaultwarden-1.30.3/target/release/build/ring-74ae6fe0630f3cbf/out -L native=/root/vaultwarden-1.30.3/target/release/build/psm-af7ee5a81c4a19fd/out --cfg sqlite` (signal: 6, SIGABRT: process abort signal)
```
I suspect both to be the same underlying issues, but the build inside the container is probably aborted by the host/container engine.
The same works well with `x86_64` and `aarch64` builds, natively and within the same QEMU container setup.
I monitored some stats during the build on the Odroid XU4:
```
6832 | CPU: 19.2% 56°C | RAM: 99% | Swap: 13%
6833 | CPU: 18.0% 56°C | RAM: 99% | Swap: 13%
6834 | CPU: 14.8% 56°C | RAM: 99% | Swap: 13%
6835 | CPU: 17.5% 57°C | RAM: 99% | Swap: 13%
6836 | CPU: 14.7% 55°C | RAM: 74% | Swap: 8%
6837 | CPU: 16.3% 55°C | RAM: 33% | Swap: 1%
6838 | CPU: 2.9% 55°C | RAM: 7% | Swap: 1%
6839 | CPU: 4.6% 54°C | RAM: 7% | Swap: 0%
6840 | CPU: 8.7% 54°C | RAM: 6% | Swap: 0%
6841 | CPU: 6.4% 54°C | RAM: 6% | Swap: 0%
```
These are the seconds around the failure. RAM size is 2 GiB, and I created an 8 GiB swap space. The last build step of the `vaultwarden` crate/binary utilises a single CPU core (the XU4 has 8 cores, so 1 core maxed is 12.5% CPU usage, the way I obtained it above) with a single process, and RAM + swap usage seems to crack the 3 GiB limit for a single process, which would explain the issue. LPAE allows an overall larger memory size/usage, but the utilisation for a single process is still limited.
I verified this again by monitoring the process resident and virtual memory usage in `htop`:
![image](https://github.com/dani-garcia/vaultwarden/assets/28480705/ccc94fca-53cf-475c-b2fa-ff840df798f2)
One `rustc` process during the last build step, with 4 threads. And the build fails when the virtual memory usage crosses 3052 MiB, i.e. quite precisely the 32-bit per-process memory limit.
Since we have successful builds/packages with vaultwarden v1.30.1, I tried building v1.30.2, which expectedly fails the same way, as it differs with just [2 tiny surely unrelated commits](https://github.com/dani-garcia/vaultwarden/compare/1.30.2...1.30.3) from v1.30.3. v1.30.1 still builds fine, so the culprit is to be found between v1.30.1 and v1.30.2, probably just dependency crates which raised in size.
Not sure whether there is an easy solution/workaround. Of course we could try cross-compiling, but I actually would like to avoid that, as it is difficult to assure that correctly shared libraries are linked, especially when building for ARMv6 Raspbian systems.
### 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.
=========================================================================================
-->
* vaultwarden version: [1.30.3](https://github.com/dani-garcia/vaultwarden/releases/tag/1.30.3)
* Install method: source build
* Clients used:
* Reverse proxy and version:
* MySQL/MariaDB or PostgreSQL version:
* Other relevant details:
### 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? -->
On Debian (any version):
```sh
apt install gcc libc6-dev pkg-config libssl-dev git
curl -sSfo rustup-init.sh 'https://sh.rustup.rs'
chmod +x rustup-init.sh
# ARMv7: Workaround for failing crates index update in emulated 32-bit ARM environments: https://github.com/rust-lang/cargo/issues/8719#issuecomment-1516492970
# ARMv8: Workaround for increased cargo fetch RAM usage: https://github.com/rust-lang/cargo/issues/10583
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL='sparse' CARGO_NET_GIT_FETCH_WITH_CLI='true'
./rustup-init.sh -y --profile minimal --default-toolchain none
rm rustup-init.sh
export PATH="$HOME/.cargo/bin:$PATH"
curl -fLO 'https://github.com/dani-garcia/vaultwarden/archive/1.30.3.tar.gz'
tar xf '1.30.3.tar.gz'
rm '1.30.3.tar.gz'
cd 'vaultwarden-1.30.3'
cargo build --features sqlite --release
```
### Expected behaviour
### Actual behaviour
### Troubleshooting data
1 « J'aime »
Meewan
Février 15, 2024, 10:27
27
merci je lis ce soir, tu as utilisé quelle commande pour avoir les statistiques ?
J’ai utilisé GNU Time en mode verbeuse. Commande souvent cachée derrière le mot clé time
du shell donc assez méconnue :
$ type time
time est un mot-clé du shell
Donc pour utiliser GNU Time plutôt que le time du shell, ce petit tour de magie marche pour moi :
/usr/bin/env time -v
Dans le cas de la compilation de Vaultwarden :
/usr/bin/env time -v cargo build --profile release-micro --features sqlite
Sinon tu peux essayer de l’invoquer avec le chemin entier si tu as un système qui respecte le FHS - ce qui n’est pas le cas de ma distribution NixOS :
/usr/bin/time -v
2 « J'aime »
12b
Mars 8, 2024, 3:03
29
J’ai commencé à utiliser les applications pour android « Password Store » + « OpenKeychain » qu’on peut trouver sur F-Droid et pour l’instant j’en suis très content.
1 « J'aime »