Skip to content

fail to allocate memory when run rustup update #2759

Closed
@wongsyrone

Description

@wongsyrone

Problem
Fail to allocate memory when I run rustup update on Windows 10 x64 using cmd.exe

C:\Users\home>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: syncing channel updates for 'nightly-x86_64-pc-windows-gnu'
info: latest update on 2021-05-07, rust version 1.54.0-nightly (676ee1472 2021-05-06)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 16.2 MiB /  16.2 MiB (100 %)   8.0 MiB/s in  2s ETA:  0s
info: downloading component 'rust-mingw'
info: downloading component 'rust-std'
 23.6 MiB /  23.6 MiB (100 %)   8.0 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 79.8 MiB /  79.8 MiB (100 %)  14.0 MiB/s in  7s ETA:  0s
info: downloading component 'rustfmt'
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-mingw'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustc'
warning: during uninstall component rustc was not found
info: removing previous version of component 'rustfmt'
warning: during uninstall component rustfmt was not found
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'clippy'
info: installing component 'rust-docs'
 16.2 MiB /  16.2 MiB (100 %)   3.1 MiB/s in  7s ETA:  0s
info: installing component 'rust-mingw'
info: installing component 'rust-std'
 23.6 MiB /  23.6 MiB (100 %)  16.1 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 79.8 MiB /  79.8 MiB (100 %)  14.4 MiB/s in 19s ETA:  0s
info: installing component 'rustfmt'
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2021-05-07, rust version 1.54.0-nightly (676ee1472 2021-05-06)
info: downloading component 'rust-src'
info: downloading component 'rust-analysis'
info: downloading component 'rust-analyzer-preview'
info: downloading component 'rustfmt'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 16.2 MiB /  16.2 MiB (100 %)  14.4 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'
 22.9 MiB /  22.9 MiB (100 %)  13.6 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 59.6 MiB /  59.6 MiB (100 %)   9.6 MiB/s in  8s ETA:  0s
info: removing previous version of component 'rust-src'
info: removing previous version of component 'rust-analysis'
info: removing previous version of component 'rust-analyzer-preview'
info: removing previous version of component 'rustfmt'
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: installing component 'rust-src'
info: installing component 'rust-analysis'
info: installing component 'rust-analyzer-preview'
info: installing component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 16.2 MiB /  16.2 MiB (100 %)   3.0 MiB/s in  7s ETA:  0s
info: installing component 'rust-std'
 22.9 MiB /  22.9 MiB (100 %)   8.0 MiB/s in 11s ETA:  0s
info: installing component 'rustc'
memory allocation of 16777216 bytes failed

C:\Users\home>

Steps

  1. run rustup update

Possible Solution(s)

setting the environment variable RUSTUP_UNPACK_RAM to 21474836480 does NOT solve the problem

Notes

Output of rustup --version:

C:\Users\home>rustup --version
rustup 1.24.1 (a01bd6b0d 2021-04-27)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.52.0 (88f19c6da 2021-05-03)`

Output of rustup show:

C:\Users\home>rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  D:\.rustup_home

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-gnu
nightly-x86_64-pc-windows-msvc

installed targets for active toolchain
--------------------------------------

x86_64-pc-windows-gnu
x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.52.0 (88f19c6da 2021-05-03)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions