rustup: Attempting to install Rustup 1.24.2 hangs
Problem
After #2756 rustup will just hang if it’s not able to determine the effective max ram of the system. The differences seem to be:
- The fallback for when
effective_limits::memory_limitchanged from 500MB to 32MB. - Rustup gets stuck waiting for some memory to free up here: https://github.com/rust-lang/rustup/blob/a1d59124df97069ce210f4ca9c11f00ab2dbd5e8/src/dist/component/package.rs#L402-L409
I encountered this running on an illumos machine.
Steps
On a machine not supported by effective_limits v0.5.2`:
$ curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal --default-toolchain nightly
Possible Solution(s)
- Choose a larger default than 32MB (note, 64MB is still not enough for
--profile complete). - v0.5.3-alpha of the effective-limits crate supports illumos but hasn’t been released yet. (https://github.com/rbtcollins/effective-limits.rs/issues/15)
Notes
Output of rustup --version: 1.24.2 (755e2b07e 2021-05-12)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 15 (9 by maintainers)
Commits related to this issue
- fix(ci): work around Rustup issue on FreeBSD References: rust-lang/rustup#2774 Signed-off-by: Fletcher Nichol <fnichol@nichol.ca> — committed to fnichol/fnichol-cime by fnichol 3 years ago
- fix(ci): work around Rustup issue on FreeBSD References: rust-lang/rustup#2774 Signed-off-by: Fletcher Nichol <fnichol@nichol.ca> — committed to fnichol/workstation by fnichol 3 years ago
- ci: workaround rustup hang on freebsd refs: https://github.com/rust-lang/rustup/issues/2774 — committed to wez/wezterm by wez 3 years ago
- freebsd/circus: workaround the timeout https://github.com/rust-lang/rustup/issues/2774 It is failing currently on: ``` info: installing component 'cargo' error: error: 'sysinfo not supported on this... — committed to sylvestre/coreutils by sylvestre 3 years ago
- freebsd/circus: workaround the timeout https://github.com/rust-lang/rustup/issues/2774 It is failing currently on: ``` info: installing component 'cargo' error: error: 'sysinfo not supported on this... — committed to sylvestre/coreutils by sylvestre 3 years ago
- freebsd/circus: workaround the timeout https://github.com/rust-lang/rustup/issues/2774 It is failing currently on: ``` info: installing component 'cargo' error: error: 'sysinfo not supported on this... — committed to sylvestre/coreutils by sylvestre 3 years ago
- diskio: Add buffer_used() to Executor and verify it in the test In #2774 we have seen hangs during installation for some low tier platforms for whom the 32M default if sysinfo doesn't work causes pro... — committed to kinnison/rustup by kinnison 3 years ago
- diskio: Correctly account the release of the final chunk In incremental file processing we need to correctly account for the final chunk being released, otherwise we end up holding a chunk for the du... — committed to kinnison/rustup by kinnison 3 years ago
- Workaround Rustup bug 2774 A regression in rustup has broken that tool on FreeBSD. Set RUSTUP_IO_THREADS=1 as a workaround. https://github.com/rust-lang/rustup/issues/2774 — committed to nix-rust/nix by asomers 3 years ago
- diskio: Correctly account the release of the final chunk In incremental file processing we need to correctly account for the final chunk being released, otherwise we end up holding a chunk for the du... — committed to kinnison/rustup by kinnison 3 years ago
- diskio: Add buffer_used() to Executor and verify it in the test In #2774 we have seen hangs during installation for some low tier platforms for whom the 32M default if sysinfo doesn't work causes pro... — committed to kinnison/rustup by kinnison 3 years ago
- diskio: Correctly account the release of the final chunk In incremental file processing we need to correctly account for the final chunk being released, otherwise we end up holding a chunk for the du... — committed to kinnison/rustup by kinnison 3 years ago
- Workaround rustup bug 2774 https://github.com/rust-lang/rustup/issues/2774 — committed to bfffs/bfffs by asomers 3 years ago
- diskio: Add buffer_used() to Executor and verify it in the test In #2774 we have seen hangs during installation for some low tier platforms for whom the 32M default if sysinfo doesn't work causes pro... — committed to rbtcollins/rustup.rs by kinnison 3 years ago
- diskio: Correctly account the release of the final chunk In incremental file processing we need to correctly account for the final chunk being released, otherwise we end up holding a chunk for the du... — committed to rbtcollins/rustup.rs by kinnison 3 years ago
It’s probably best to revert the regressing change for now – the motivation was ostensibly a “hypothetical” memory fragmentation issue, whereas the hang is very real.
Yeah, I get the two mixed up, sorry 😦
The beta release has been released and you can find the test method here.
We have a Cirrus CI setup on the Tokio github repository that we use for FreeBSD.