-
Notifications
You must be signed in to change notification settings - Fork 892
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
fail to allocate memory when run rustup update
#2759
Comments
setting the environment variable RUSTUP_UNPACK_RAM to 21474836480 does NOT solve the problem. How can I get my toolchain back as I cannot install it anymore? |
I changed the value, it looks like working now.
|
We think there's likely a problem with memory fragmentation on Windows' allocator. We are working on a fix to this in #2756 and I hope we will resolve this fairly soon. |
In the nighltly toolchain It fails on rustc unpack allocation cannot allocate 16 mb of memory [crash], |
@gruber123 what platform are you using? |
windows 7 x64 |
@gruber123 Cool, could you download and install https://github.com/rust-lang/rustup/suites/2685811520/artifacts/59213037 (you must be logged into github to download it) and then try again to do the install of nightly? (You may need to remove the incomplete/broken version first) |
Thanks, I've already installed it after closing some programs, but failing message for next updates is frustrating. |
Can you please confirm - did you install the rustup-init which I linked to above? If so, could you please run |
@gruber123 the custom build of rustup that @kinnison has linked may fix the problem for you, but you'll need to follow these steps:
|
C:\Users\User>rustup dump-testament C:\Users\User>rustup toolchain remove nightly C:\Users\User>rustup toolchain install nightly --no-self-update nightly-x86_64-pc-windows-msvc installed - rustc 1.54.0-nightly (881c1ac40 2021-05-08) C:\Users\User>rustc --version |
Ok, it worked without closing extra programs So what is custom build of rustup-init, how it's different from official version on main page? |
The version we asked you to try is a work-in-progress to fix the issue on the main version. I will look to merge that tomorrow and then we can try and prepare a new beta release. I'll keep you updated when that's done and I'll ask you to install and try the beta release then. I'll provide instructions at that point. |
again some problem: C:\Users\User>rustup update nightly --no-self-update nightly-x86_64-pc-windows-msvc updated - rustc 1.54.0-nightly (ca82264ec 2021-05-09) (from rustc 1.54.0-nightly (881c1ac40 2021-05-08)) |
I have exactly the same problem but on Raspberry Pi 3. Unitl now I was able to update with 'rustup update' without a problem. Now I can't update it nor do a clean install.
|
@gruber123 As we state in the release announcements, you must ensure there are no IDEs etc open when updating rust toolchains, for exactly that reason. |
@FoxKyong if you wish to try a build of master with our candidate fix in it, you can find it here https://github.com/rust-lang/rustup/suites/2703495866/artifacts/59599296 |
I've updated the beta testing post on the users forum with details of how to test our proposed fix - https://internals.rust-lang.org/t/seeking-testers-for-rustup-1-24-2-beta/14634/6 |
Thank you for addressing this issue and letting us know about the beta testing. I asked one of the users who reported a duplicate issue #2764 on Raspberry Pi 3 to join the beta testing. So far, so good; he verified that Rustup v1.24.2 beta can install the latest Rust stable tool chain without problem. Raspberry Pi 3 running Raspbian Buster arm32 ( $ rustup self uninstall
$ export RUSTUP_UPDATE_ROOT=https://dev-static.rust-lang.org/rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ rustup dump-testament
Rustup version renders as: 1.24.2 (34cd8a5b7 2021-05-10)
Current crate version: 1.24.2
Built from branch: stable
Commit info: 1.24.1+76 (34cd8a5b7 2021-05-10)
Working tree is clean
$ rustc -V
rustc 1.52.1 (9bc8c42bb 2021-05-09) |
That's great news, thank you for that. We'll hold off a little while in case other reports come in, but I think we have a candidate for 1.24.2 :D |
I also got this problem randomly with newly installed Windows 10 21H1 and WSL. I saw an allocation error on the first try, and the second was successful. |
|
@ghost Are you using the 1.24.2 beta release as per the above comments? |
@kinnison I downloaded from https://win.rustup.rs. |
@kinnison I'm using 1.24.1.
|
@ghost Could you please follow the instructions in https://internals.rust-lang.org/t/seeking-testers-for-rustup-1-24-2-beta/14634/6 to get the beta copy and try that? |
After changing the version to beta, I was able to see a significant difference. When running rust-analyzer in vscode with rustup version 1.24.1 it took a very long time than usual. With version 1.24.2 beta it took me the usual time again. Maybe rust-analyzer uses rustup internally. |
Thanks, I just tried it and it works. Installation works but I noticed another very minor issue. It adds |
@FoxKyong Because the sourcing of the env file is designed to be safe to do multiple times, we now scattergun the line into as many places as possible to cover as many different shells as we can. |
I tried the beta version, works smoothly. Great job. |
Closing as the problem has been fixed. |
Add temporary fix for rustup on windows in CI. This adds a temporary fix for rustup on the Windows CI runners. The GitHub image updated to rustup 1.24.1 which has an issue (rust-lang/rustup#2759) causing them to fail. This is fixed in 1.24.2. I believe the images are updated on roughly a weekly basis, and from what I can see the image just downloads the most recently release, so hopefully this will be fixed on GitHub's side in roughly a week. Until then, this will force rustup to update. Note: Self updates aren't available on macOS images, but they seem to work on the others.
chore(ci): remove temporary fix for rustup 1.24.1 rust-lang/rustup#2759 was fixed in 1.24.2 and now GitHub ships 1.26.0 [^1]. The temporary workaround is not needed anymore. Let's see if everything goes well! [^1]: https://github.com/actions/runner-images/blob/156ad8a318284c617f76cef1077cd0d64aeb758e/images/linux/Ubuntu2204-Readme.md?plain=1#L151
Problem
Fail to allocate memory when I run
rustup update
on Windows 10 x64 using cmd.exeSteps
rustup update
Possible Solution(s)
setting the environment variable RUSTUP_UNPACK_RAM to 21474836480 does NOT solve the problem
Notes
Output of
rustup --version
:Output of
rustup show
:The text was updated successfully, but these errors were encountered: