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:

  1. The fallback for when effective_limits::memory_limit changed from 500MB to 32MB.
  2. 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)

  1. Choose a larger default than 32MB (note, 64MB is still not enough for --profile complete).
  2. 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

Most upvoted comments

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.

It seems to be on the internals forum?

Yeah, I get the two mixed up, sorry 😦

@kinnison How are things going?

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.