Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup 1.24.1 fails to install Rust 1.38.0 on Windows in Travis CI due to failure to allocate memory #2748

Closed
wezm opened this issue May 4, 2021 · 3 comments
Labels

Comments

@wezm
Copy link
Member

wezm commented May 4, 2021

Problem

rustup 1.24.1 fails to install Rust 1.38.0 on Windows in Travis CI due to failure to allocate memory. Interestingly installing Rust 1.51.1 with this version of rustup does succeed. Here's an example log:

$ curl -LSso /tmp/rustup.sh https://sh.rustup.rs && sh /tmp/rustup.sh -y --default-toolchain "$RUST_TOOLCHAIN" --profile minimal
Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
info: downloading installer
info: profile set to 'minimal'
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for '1.38.0-x86_64-pc-windows-gnu'
info: latest update on 2019-09-26, rust version 1.38.0 (625451e37 2019-09-23)
info: downloading component 'cargo'
info: downloading component 'rust-mingw'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'rust-mingw'
info: installing component 'rust-std'
memory allocation of 16777216 bytes failed
The command "curl -LSso /tmp/rustup.sh https://sh.rustup.rs && sh /tmp/rustup.sh -y --default-toolchain "$RUST_TOOLCHAIN" --profile minimal" exited with 1.

Installing Rust 1.38.0 in this environment works with rustup 1.23.1.

Steps

  1. Attempt to install Rust 1.38.0 in a Windows Travis CI build, see https://github.com/wezm/windows-travis-rustup/blob/master/.travis.yml for a minimal reproduction.

Possible Solution(s)

Pinning rustup to 1.23.1 successfully installs Rust 1.38.0.

Notes

Output of rustup --version:
Output of rustup show:

@wezm wezm added the bug label May 4, 2021
@messense
Copy link

messense commented May 4, 2021

Same issue on GitHub Actions

 C:\Rust\.cargo\bin\rustup.exe default nightly
  info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
  info: latest update on 2021-05-04, rust version 1.54.0-nightly (716394d65 2021-05-03)
  info: downloading component 'cargo'
  info: downloading component 'rust-std'
  info: downloading component 'rustc'
  info: installing component 'cargo'
  info: using up to 500.0 MiB of RAM to unpack components
  info: installing component 'rust-std'
  info: installing component 'rustc'
  memory allocation of 16777216 bytes failed
  Error: The process 'C:\Rust\.cargo\bin\rustup.exe' failed with exit code 3221226505

rbtcollins pushed a commit to rbtcollins/rustup.rs that referenced this issue May 4, 2021
Diagnosis by Daniel. Code by Robert.
rbtcollins pushed a commit to rbtcollins/rustup.rs that referenced this issue May 4, 2021
Diagnosis by Daniel. Code by Robert.
@foresterre
Copy link
Contributor

Yes!, this seems to be the same issue I observed yesterday.

From #2717 (comment):

I think this is the same issue, but I'm not 100% sure, my apologies if it isn't.

@rbtcollins It may potentially still be an issue

On the github CI which has 500MB allocated RAM, rustup seems to sometimes time out with Rustup 1.24.1 too:
Details

In cargo-msrv, I use rustup to install different toolchain versions as required, and I have been tracking down an issue where downloads through rustup fail to complete. This happened primarily on CI machines (so far, I assume because of limited memory). It doesn't always fail (e.g. foresterre/cargo-msrv#72 (checks)) , and so far, I've only observed failures on Windows machines.

I saw it once happen on a local Windows machine (with 32GB RAM), but can't reproduce it consistently (or even once anymore).

I'm happy to further help tracking this down, but I'm not sure where to start.

Edit: it seems like another issue, #2748 was opened which more completely describes my issue

rbtcollins pushed a commit to rbtcollins/rustup.rs that referenced this issue May 4, 2021
Diagnosis by Daniel. Code by Robert.
kinnison added a commit that referenced this issue May 4, 2021
Fixes #2748 by filling the streaming buffers fully
@kinnison
Copy link
Contributor

kinnison commented May 4, 2021

I think we'll have to look to a 1.24.2 after the Rust release (so perhaps next week)

fpoli added a commit to viperproject/prusti-dev that referenced this issue May 5, 2021
The next version of rustup will solve this issue (rust-lang/rustup#2748).
rbtcollins pushed a commit to rbtcollins/rustup.rs that referenced this issue Jul 11, 2021
Diagnosis by Daniel. Code by Robert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants