Repository navigation
Rustup OOM #5173
Copy link
Copy link
Open
Labels
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
Rustup tends to get OOM killed on low-memory machines, in particular during unpacking.
In my case, it used 470MB in peak when it got killed:
> time -f '%M kB' rustup update
info: syncing channel updates for nightly-aarch64-unknown-linux-gnu
info: latest update on 2026-10-28 for version 1.101.0-nightly (41089d07a 2026-10-27)
info: removing previous version of component cargo
info: removing previous version of component clippy
info: removing previous version of component rust-docs
info: removing previous version of component rust-std
info: removing previous version of component rustc
info: removing previous version of component rustfmt
info: downloading 6 components
rustc unpacking [ ] 43.72 MiB (6.52 MiB/s, ETA: 0s) Command terminated by signal 9
471628 kBKernel log:
kernel: Out of memory: Killed process 225841 (rustup) total-vm:1527460kB, anon-rss:471336kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:1156kB oom_score_adj:0
This is on arm64, though I don't know if it changes much.
Steps
- Launch
rustup update - Watch it get sigkilled by the kernel for OOM reasons
Notes
This happened in the past, and a fix was merged this year in #4717 ; I don't think it works as intended, probably because detecting the ram_budget is not as trivial as it seems, especially with overcommit.
Possible Solution(s)
No response
Rustup version
rustup 1.29.2 (d8c92c676 2026-10-21)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.99.1 (58cf8f9c3 2026-10-13)`Installed toolchains
Default host: aarch64-unknown-linux-gnu
rustup home: /home/aissen/.rustup
installed toolchains
--------------------
stable-aarch64-unknown-linux-gnu (active, default)
nightly-aarch64-unknown-linux-gnu
active toolchain
----------------
name: stable-aarch64-unknown-linux-gnu
active because: it's the default toolchain
installed targets:
aarch64-unknown-linux-gnuOS version
Debian GNU/Linux 12 (bookworm)
Activity
rami3l commentedon Oct 28, 2026
FTR we are using https://docs.rs/effective-limits/latest/effective_limits/fn.memory_limit.html for the budget thing; and since OOM killing is an OS behavior, I believe this process of preventing OOM is currently a best-effort one.
For your immediate concern, maybe setting
RUSTUP_IO_THREADS=1will help?anisse commentedon Oct 29, 2026
Indeed, using
RUSTUP_IO_THREADS=1reduces the maximum memory impact:djc commentedon Oct 30, 2026
It would be interesting if you can figure out why rustup's understanding of your environment's limits fails.