Random rust build failures

On this computer I am finding I get random build failures from random rust programs (both my own and in nixpkgs). If I keep trying to rebuild, I get a different build error every time. If I keep retrying it eventually works, mostly on the 2nd attempt. Any ideas?

The errors come from code that is not mine, and code that looks correct to me.

Is driving me batty. So far I have not been able to reproduce on any other computer (maybe I haven’t tried enough times?), and all computers have the same nixos/home-manager config.

I think I might have asked about this somewhere else recently, but can’t find it right now.

Here is the latest example.

nix-deploys via ❄️   (nix-shell-env) took 2s
at 15:07:54 ❯ nix flake update robotica-rust
warning: updating lock file '"/home/brian/tree/personal/nix-deploys/flake.lock"':
• Updated input 'robotica-rust':
    'github:brianmay/robotica-rust/f2d775818c605b7b13a149bea2a5fd578fd171fe?narHash=sha256-%2Btw1gvlpcLVYvwNjQYB02x8tzgFP9Sd2iiRGsd3m6WM%3D' (2025-10-06)
  → 'github:brianmay/robotica-rust/4d35aa89e6d1ae616116e456f1bd67dd8350a70a?narHash=sha256-KYfdxLcNgSNFisvpbTEBtoXBswzLNtZo%2BUgvxsZ2dXE%3D' (2025-10-07)
direnv: loading ~/tree/personal/nix-deploys/.envrc
direnv: using flake
evaluating derivation 'git+file:///home/brian/tree/personal/nix-deploys#devShells.x86_64-linux.defaudirenv: ([/nix/store/8cz47vsx8z9ksx63472i2p8jqk86r45j-direnv-2.36.0/bin/direnv export json]) is taking a while to execute. Use CTRL-C to give up.
error: builder for '/nix/store/acrk4rbdrkihlsjwfsm74cvn516l8kff-robotica-frontend-deps-0.0.0.drv' failed with exit code 101;
       last 25 log lines:
       >    Compiling url v2.5.7
       >    Compiling robotica-common v0.1.0 (/build/source/robotica-common)
       > error[E0080]: scalar size mismatch: expected 4294968006 bytes but got 4 bytes instead
       >    --> /nix/store/ji8h360nlg0da7kxxa865xajfnkb5g95-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/web-sys-0.3.77/src/features/gen_DragEvent.rs:5:1
       >     |
       >   5 | #[wasm_bindgen]
       >     | ^^^^^^^^^^^^^^^ evaluation of `features::gen_DragEvent::_::_ENCODED_BYTES::_CHUNKS` failed inside this call
       >     |
       > note: inside `flat_byte_slices::<3390, 1>`
       >    --> /nix/store/ji8h360nlg0da7kxxa865xajfnkb5g95-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/wasm-bindgen-0.2.100/src/rt/mod.rs:664:15
       >     |
       > 664 |         while i < slice.len() {
       >     |               ^^^^^^^^^^^^^^^ the failure occurred here
       >     = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
       >
       > note: erroneous constant encountered
       >  --> /nix/store/ji8h360nlg0da7kxxa865xajfnkb5g95-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/web-sys-0.3.77/src/features/gen_DragEvent.rs:5:1
       >   |
       > 5 | #[wasm_bindgen]
       >   | ^^^^^^^^^^^^^^^
       >   |
       >   = note: this note originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
       >
       > For more information about this error, try `rustc --explain E0080`.
       > error: could not compile `web-sys` (lib) due to 1 previous error
       For full logs, run:
         nix log /nix/store/acrk4rbdrkihlsjwfsm74cvn516l8kff-robotica-frontend-deps-0.0.0.drv
error: 1 dependencies of derivation '/nix/store/3xslb3390h46sdk37v39cbq248vrhn29-robotica-frontend-0.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/i191yy6iw93xm7c235rkkqa0h4cp82ww-robotica-frontend-bindgen.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xg4drk6jzylrar2yhgvjx500bawxc2fv-robotica-backend-config.drv' failed to build
error (ignored): error: cannot unlink "/tmp/nix-build-robotica-backend-deps-0.0.0.drv-0/build/source/target/release/deps": Directory not empty
error: 1 dependencies of derivation '/nix/store/xb09p5mda4733p51ff5s71hffcavz77c-robotica-backend.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6dys4mciih957ikihp9c3z155jj6r3kv-unit-robotica-backend.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yaxdyk9a4848lf06x85j49l1pgpm7j09-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g3isqqx0kv3pqhmkv4d42yh9b8pbmpbz-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/kdv3ffkn99b63sb2hp3m8cq46w89x9i8-nixos-system-iot2-25.05.20250904.fe83bbd.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g4rknp8nws807iva8wcsq4pc8v39x23l-activatable-nixos-system-iot2-25.05.20250904.fe83bbd.drv' failed to build
error (ignored): error: cannot unlink "/tmp/nix-build-robotica-freeswitch-deps-0.0.0.drv-0/build/source/target/release/deps": Directory not empty
error: 1 dependencies of derivation '/nix/store/38q922z6mnyh7pcsvgb7i3kpzrf4gkhv-deploy-rs-check-activate.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dzh4czz0al6sgpr2ywqh048plrph1jzp-deploy.json.drv' failed to build
error: 1 dependencies of derivation '/nix/store/mszibnxcq1rrqfsyhmnqgril2d61kjg2-deploy.json.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3w3y878h01ldc3q21a4qa0hzb9sfylk8-nix-shell-env.drv' failed to build
direnv: nix-direnv: Evaluating current devShell failed. Falling back to previous environment!
direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_DIRENV_DID_FALLBACK +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_LDFLAGS +NIX_STORE +NM +OBJCOPY +OBJDUMP +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +__structuredAttrs +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~XDG_DATA_DIRS

nix-deploys via ❄️   (nix-shell-env)
at 08:36:14 ❯ direnv reload
direnv: loading ~/tree/personal/nix-deploys/.envrc
direnv: using flake
evaluating derivation 'git+file:///home/brian/tree/personal/nix-deploys#devShells.x86_64-linux.defaudirenv: ([/nix/store/8cz47vsx8z9ksx63472i2p8jqk86r45j-direnv-2.36.0/bin/direnv export json]) is taking a while to execute. Use CTRL-C to give up.
direnv: nix-direnv: Renewed cache
direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_LDFLAGS +NIX_STORE +NM +OBJCOPY +OBJDUMP +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +__structuredAttrs +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~XDG_DATA_DIRS

Looks suspiciously like it could be hardware failure IMO. How is your RAM doing? Could be that the rust + nix builds tickle your memory enough to hit faulty areas.

This is the computer: Thelio Mira (thelio-mira-r3) - System76 Technical Documentation

It has 128GB RAM.

I am somewhat doubtful that the memory is a problem, but I guess I should verify with memtest86.

What is the easiest way to run memtest86 with nixos? I see that there is a nixos setting, but according to a bug report it may not work - option boot.loader.grub.memtest86.enable not taking effect for iso image builds · Issue #136891 · NixOS/nixpkgs · GitHub

Oh, possible I don’t need to worry about that bug, not using iso image builds here.

Yeah, as long as this is just a bare metal system use that setting and it’ll deploy the binary as a boot menu entry. FWIW, using grub specifically is discouraged for most setups, but that option is generic between the boot managers.

OK, got memtest86 working, although the menu entry was broken (I had to search for it in grub in the EFI partition not the boot partition). Suspect this is nixos/memtest86: Does not function with non-default ESP mount point. · Issue #444841 · NixOS/nixpkgs · GitHub.

I ran through all the memory tests for one pass, no errors detected.

Yes, I setup this computer using guides for using zfs as root before I realized grub is now discouraged, and am hesitant to change it in case I break my working computer :-). /boot is ext4 so it shouldn’t be a problem in theory…

Apparently it is good practice to use the EFI partition - FAT32 - as /boot, not /boot/efi. Sob. So maybe I am not keeping up here with what is best practice.

Back on topic: I considered the possibility that zfs is causing the random build failures, but this doesn’t seem likely to cause the errors I have been seeing IMHO.

Any further ideas?

This definitely seems like a hardware memory or CPU issue to me. If you want to rule out disk issues you could see if it still happens when building on tmpfs to largely remove the disk from the equation (though everything would probably be cached in memory given your amount of RAM anyways). Try stress and/or mprime to test CPU and RAM (arch wiki recommended tools: Stress testing - ArchWiki). Make sure to monitor system temperatures to ensure it isn’t overheating.

Searching for other instances of this rustc error it seems like they’re all suspected hardware issues: Scalar size mismatch: expected 2350837905160 bytes but got 8 bytes instead - #9 by SamB - The Rust Programming Language Forum and ICE on stable and nightly: `compiler\rustc_const_eval\src\interpret\operand.rs:661:13: primitive read not possible for type: u32` · Issue #137974 · rust-lang/rust · GitHub

Do you have a 13th or 14th gen Intel CPU btw? That’s been a common cause of CPU instability recently. If it’s not the CPU, it could still be the memory (a lot of issues don’t show up in the first memtest pass as they’re probabilistic) but given the frequency with which you encounter this issue and the amount of RAM you have it does seem more like a CPU issue to me.

/proc/cpuinfo shows “Intel(R) Core™ i9-14900KS”.

Hmmm. i think that means it is a 14th gen intel… I guess that could explain it.

Any known solutions?

No, unfortunately if the problem appears it means the CPU itself is physically damaged (due to voltage issues from my understanding). Intel has released new firmware which fixes these issues but it can’t fix an already damaged CPU.

They’ve extended their RMA warranty so you can probably get a free CPU replacement. I did that and it was relatively painless, aside from figuring out the serial number. I’d still try to make sure it’s a CPU issue via stress testing first so that you don’t go through this process for nothing. Good luck!

I see steps for testing here: Reddit - The heart of the internet

But I guess I really should make sure the firmware is update before I do the stress testing. Will do that now.

OK, I guess this means my microcode is up-to-date now:

[    0.715754] microcode: Current revision: 0x0000012f
[    0.715755] microcode: Updated early from: 0x00000129
[    0.716704] microcode: Microcode Update Driver: v2.2.

Supposedly 0x129 should be after Intel fixed this problem. Will try that stress test anyway.

I’d update to 0x12B, I’m not sure 0x129 had all the fixes (there were several different microcode updates before Intel fixed it completely).

Typical. Not surprised.

The stress test command returned without errors after 30 minutes.

[nix-shell:~]$ stress-ng --cpu 20 --cpu-method fft --timeout 30m
stress-ng: info:  [11477] setting to a 30 mins run per stressor
stress-ng: info:  [11477] dispatching hogs: 20 cpu
stress-ng: info:  [11477] skipped: 0
stress-ng: info:  [11477] passed: 20: cpu (20)
stress-ng: info:  [11477] failed: 0
stress-ng: info:  [11477] metrics untrustworthy: 0
stress-ng: info:  [11477] successful run completed in 30 mins

So maybe the CPU isn’t a problem. Or maybe I fixed it when I upgraded the microcode.

I guess I will need to wait and see if I get the rust compiler messages again.

Still getting random build failures :frowning:

warning: Git tree '/home/brian/tree/personal/robotica/robotica-rust' is dirty
error: builder for '/nix/store/6ccl58ixw27n5i2vngmlk9gfa8kvh31p-robotica-frontend-deps-0.0.0.drv' failed with exit code 101;
       last 25 log lines:
       >     = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
       >
       > note: erroneous constant encountered
       >  --> /nix/store/993fjkck66vsl08b20kyms27r41y5hkr-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/web-sys-0.3.77/src/features/gen_HtmlInputElement.rs:5:1
       >   |
       > 5 | #[wasm_bindgen]
       >   | ^^^^^^^^^^^^^^^
       >   |
       >   = note: this note originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
       >
       > error[E0080]: scalar size mismatch: expected 4 bytes but got 0 bytes instead
       >    --> /nix/store/993fjkck66vsl08b20kyms27r41y5hkr-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/web-sys-0.3.77/src/features/gen_Window.rs:5:1
       >     |
       >   5 | #[wasm_bindgen]
       >     | ^^^^^^^^^^^^^^^ evaluation of `features::gen_Window::_::_GENERATED` failed inside this call
       >     |
       > note: inside `flat_byte_slices::<43049, 2>`
       >    --> /nix/store/993fjkck66vsl08b20kyms27r41y5hkr-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/wasm-bindgen-0.2.100/src/rt/mod.rs:664:15
       >     |
       > 664 |         while i < slice.len() {
       >     |               ^^^^^^^^^^^^^^^ the failure occurred here
       >     = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
       >
       > For more information about this error, try `rustc --explain E0080`.
       > error: could not compile `web-sys` (lib) due to 2 previous errors
       For full logs, run:
         nix log /nix/store/6ccl58ixw27n5i2vngmlk9gfa8kvh31p-robotica-frontend-deps-0.0.0.drv
error: 1 dependencies of derivation '/nix/store/js7hpvvs9n272vg6i2gkd8mavbx34n7x-robotica-frontend-0.0.0.drv' failed to build
error (ignored): error: cannot unlink "/tmp/nix-build-robotica-slint-deps-0.0.0.drv-1/build/source/target/release/deps": Directory not empty
error (ignored): error: cannot unlink "/tmp/nix-build-robotica-freeswitch-deps-0.0.0.drv-1/build/source/target/release/deps": Directory not empty
error (ignored): error: cannot unlink "/tmp/nix-build-robotica-backend-deps-0.0.0.drv-1/build/source/target/release/deps": Directory not empty
error: build of '/nix/store/18z3fw6wd2np8yzrq3mk9rmwcavspwm3-robotica-backend-clippy-0.0.0.drv', '/nix/store/2ikdi9c8119dh97a2d1i41f070xnb196-robotica-freeswitch.drv', '/nix/store/2s4qhaxjm5nkfnmglfp2m1gckylk06k2-robotica-backend.drv', '/nix/store/37pdxkrl7xj4i5cdhlfvpj04xblb3pjd-robotica-freeswitch-clippy-0.0.0.drv', '/nix/store/8s8nhvcpdc8d1yy7ygwjkvcjfdy0dnp2-robotica-frontend-clippy-0.0.0.drv', '/nix/store/gi6priafdgi3wjhikaay9dd0cwcpz6a4-robotica-slint-0.0.0.drv', '/nix/store/js7hpvvs9n272vg6i2gkd8mavbx34n7x-robotica-frontend-0.0.0.drv', '/nix/store/wkwq7s7mirc53zh88brnmyjx10834dlc-robotica-slint-clippy-0.0.0.drv', '/nix/store/yn6mhp4mblazbl3jj15dxjdlzbc121y0-robotica-frontend-bindgen.drv' failed

Seems to be in the exact same place, both times. Coincidence?

Different error, same project:

warning: Git tree '/home/brian/tree/personal/robotica/robotica-rust' is dirty
error: builder for '/nix/store/5cbk98qp6r5mj5l2is40bvkb143a5b1s-robotica-backend-0.0.0.drv' failed with exit code 101;
       last 25 log lines:
       >   73:     0x7ffff6617ebc - rustc_interface[c9c4c8df4db17049]::passes::create_and_enter_global_ctxt::<core[42326c15e70145c1]::option::Option<rustc_interface[c9c4c8df4db17049]::queries::Linker>, rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
       >   74:     0x7ffff64c11f1 - rustc_interface[c9c4c8df4db17049]::interface::run_compiler::<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}
       >   75:     0x7ffff63751c1 - std[9479b33d5e275715]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_with_globals<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_pool_with_globals<rustc_interface[c9c4c8df4db17049]::interface::run_compiler<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
       >   76:     0x7ffff6374ea2 - <<std[9479b33d5e275715]::thread::Builder>::spawn_unchecked_<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_with_globals<rustc_interface[c9c4c8df4db17049]::util::run_in_thread_pool_with_globals<rustc_interface[c9c4c8df4db17049]::interface::run_compiler<(), rustc_driver_impl[773a1ede480c2143]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[42326c15e70145c1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
       >   77:     0x7ffff637a7c5 - std::sys::pal::unix::thread::Thread::new::thread_start::hb6e99e73da4d28f8
       >   78:     0x7fffefc908ee - start_thread
       >   79:     0x7fffefd149bc - __GI___clone3
       >   80:                0x0 - <unknown>
       >
       > 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.90.0 (1159e78c4 2025-09-14) running on x86_64-unknown-linux-gnu
       >
       > note: compiler flags: --crate-type bin -C opt-level=3 -C embed-bitcode=no -C strip=debuginfo
       >
       > note: some of the compiler flags provided by cargo are hidden
       >
       > query stack during panic:
       > #0 [eval_to_allocation_raw] const-evaluating + checking `tokio::runtime::task::raw::OffsetHelper::<T, S>::SCHEDULER_OFFSET`
       > #1 [eval_to_const_value_raw] simplifying constant for the type system `tokio::runtime::task::raw::OffsetHelper::<T, S>::SCHEDULER_OFFSET`
       > ... and 4 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
       > error: could not compile `robotica-backend` (bin "robotica-backend")
       >
       > Caused by:
       >   process didn't exit successfully: `rustc --crate-name robotica_backend --edition=2021 robotica-backend/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 embed-bitcode=no --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=5232afd80dbf233c -C extra-filename=-fe2e0b5dcc544bf2 --out-dir /build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps -C strip=debuginfo -L dependency=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps --extern anyhow=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libanyhow-8d1dc5ae4f738a51.rlib --extern chrono=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libchrono-93d3d5b56bb1a6dc.rlib --extern chrono_tz=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libchrono_tz-bf6e80524d63d8ec.rlib --extern color_backtrace=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libcolor_backtrace-24a076f19db57bdd.rlib --extern data_encoding=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libdata_encoding-9f12dbf75a9c91dc.rlib --extern envconfig=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libenvconfig-db5f473ad1f0bbf7.rlib --extern geo=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libgeo-4746aa0c01ac244c.rlib --extern influxdb=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libinfluxdb-7d3c124cde8434bc.rlib --extern opentelemetry=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry-fc6ec54203161f08.rlib --extern opentelemetry_appender_tracing=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry_appender_tracing-73f9ac43f936410e.rlib --extern opentelemetry_otlp=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry_otlp-f5c3e5e641d58526.rlib --extern opentelemetry_semantic_conventions=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry_semantic_conventions-8c0f2f1a9503ee6b.rlib --extern opentelemetry_stdout=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry_stdout-b429dc980fff4075.rlib --extern opentelemetry_sdk=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libopentelemetry_sdk-77b4790e11f7ae8a.rlib --extern reqwest=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libreqwest-488e160f21ada3a6.rlib --extern robotica_common=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/librobotica_common-b482b6df06c15024.rlib --extern robotica_macro=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/librobotica_macro-ccd4b753554f18ea.so --extern robotica_tokio=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/librobotica_tokio-7cee9d293543e468.rlib --extern rstest=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/librstest-a718fa58eb7dbcae.rlib --extern rustls=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/librustls-a85d9d9633ce3cf0.rlib --extern serde=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libserde-178b2a164b66deee.rlib --extern serde_json=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libserde_json-c8f16a345d9dd624.rlib --extern serde_tuple=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libserde_tuple-9c7d92dfd17f8a51.rlib --extern serde_yml=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libserde_yml-10809939ebcb2069.rlib --extern sqlx=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libsqlx-a5a8b7ae12fa6224.rlib --extern tap=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtap-e3a5109c71f4ed3e.rlib --extern thiserror=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libthiserror-9b32cabad93fe3ae.rlib --extern tokio=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtokio-3ab14d88fc70ae96.rlib --extern tonic=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtonic-d64965cfe2cf8ffe.rlib --extern tracing=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtracing-abe29fb167001595.rlib --extern tracing_core=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtracing_core-14bfd91571100c90.rlib --extern tracing_opentelemetry=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtracing_opentelemetry-0386b266f7807ae0.rlib --extern tracing_subscriber=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtracing_subscriber-2a341d933f505724.rlib --extern tracing_log_error=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/libtracing_log_error-c8f832e903c3431c.rlib --extern url=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/deps/liburl-6b1ea2cf751e2af0.rlib -L native=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/build/ring-e2d8f69dd0b486e7/out -L native=/build/2dk87jll52gpg65p3s8zr3barmv5whng-source/target/release/build/aws-lc-sys-f547ead8113cc284/out -L native=/nix/store/adh72qn1r2c4nflkgkv3sdv7aag0p9z5-openssl-3.4.2/lib -L native=/nix/store/vxl8pzgkkw8vdb4agzwm58imrfclmfrx-python3-3.12.11/lib` (exit status: 101)
       For full logs, run:
         nix log /nix/store/5cbk98qp6r5mj5l2is40bvkb143a5b1s-robotica-backend-0.0.0.drv
error: 1 dependencies of derivation '/nix/store/k94lki46k9nhzn816qwy12b1yjjj33rc-robotica-backend.drv' failed to build
error: build of '/nix/store/k94lki46k9nhzn816qwy12b1yjjj33rc-robotica-backend.drv', '/nix/store/kci0yzlif1icnd85c9505qnadingjvln-robotica-slint-0.0.0.drv' failed

First time I got an error without using nix build, just plain rust build. Yuck. Was trying to blame nix :slight_smile:

   Compiling icu_properties v1.5.1
error[E0080]: scalar size mismatch: expected 0 bytes but got 4 bytes instead
   --> /home/brian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties-1.5.1/src/provider.rs:711:1
    |
711 | / expand!(
712 | |     (
713 | |         // code point sets
714 | |         (AsciiHexDigitV1Marker, "AHex"),
...   |
929 | | );
    | |_^ evaluation of `<provider::JoinControlV1Marker as icu_provider::KeyedDataMarker>::KEY::RESOURCE_KEY_MACRO_CONST` failed inside this call
    |
note: inside `icu_provider::DataKey::construct_internal`
   --> /home/brian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_provider-1.5.0/src/key.rs:394:15
    |
394 |         while i < leading_tag!().len() {
    |               ^^^^^^^^^^^^^^^^^^^^^^^^ the failure occurred here
    = note: this error originates in the macro `data_key` which comes from the expansion of the macro `expand` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
   --> /home/brian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties-1.5.1/src/provider.rs:711:1
    |
711 | / expand!(
712 | |     (
713 | |         // code point sets
714 | |         (AsciiHexDigitV1Marker, "AHex"),
...   |
929 | | );
    | |_^
    |
    = note: this note originates in the macro `data_key` which comes from the expansion of the macro `expand` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
   --> /home/brian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties-1.5.1/src/provider.rs:693:15
    |
693 |               $($code_point_set_marker::KEY,)+
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
711 | / expand!(
712 | |     (
713 | |         // code point sets
714 | |         (AsciiHexDigitV1Marker, "AHex"),
...   |
929 | | );
    | |_- in this macro invocation
    |
    = note: this note originates in the macro `expand` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
   --> /home/brian/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_properties-1.5.1/src/provider.rs:142:5
    |
142 |     icu_properties_data::impl_props_join_c_v1!(Baked);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this note originates in the macro `icu_properties_data::impl_props_join_c_v1` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0080`.
error: could not compile `icu_properties` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Have you tried compiling large projects in other languages, e.g. the Linux kernel or Firefox? I’m still pretty sure this is some kind of hardware instability, probably CPU given that it seems to occur in certain codepaths. I’d also try other stress testing commands, e.g. letting stress --cpu $(nproc) run for a while.

FWIW, the “fixes” are just turning down voltages, if your CPU is already damaged microcode updates won’t do much.