-
Notifications
You must be signed in to change notification settings - Fork 891
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
allocation failure installing rustc #2229
Comments
Please try setting RUSTUP_UNPACK_RAM to a lower figure than 400M, or provide more VM to rustup. |
Yes Any suggestions on how this could be handled by default? The budget could be clamped to some fraction of available ram, or the package unpack could be split across multiple tasks. |
Yes, detecting usable RAM and subtracting an appropriate overhead amount would be a decent way to autotune this. |
My only concern with such an approach would be if we were then unable to unpack due to a large file not fitting in RAM, yet it'd be |
I think we some different sorts of issues all cropping up. In the former case rustc will fail to run, as RAM footprint is not being measured, assuming I recall my basics correctly. I'm not sure that the two situations make a lot of difference to rustup, other than that we want the min() of the detected resources for autotuning. Autotuning the parameter would be strictly better than the current hardcoded default because we can dynamically cope with these smaller setups. It won't on its own solve problems with very small environments. Solving very small environments - for that I think we need to fall back to streaming/chunking and optimising for minimising resource usage rather than minimising wall clock time. Autotuning can help here though - if unpack ram is under (say) 200MB, we switch to a different IO strategy. Putting it altogether, it would look something like:
|
I think that makes a lot of sense. So the question is how we do the |
mem_info returns avail for Windows, so thats fine; and Windows doesn't do ulimits last I heard. |
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
This doesn't implement streaming IO for low memory situations - we still have the situation that low footprint situations will fail to install, but while it is the case that rustc's memory footprint is lower than our unpack footprint this is probably not urgent to fix, though I will get around to it. Being less aggressive about unpack buffer size though should reduce the number of support tickets from folk in these cases, I hope. We may end up getting tickets from folk with broken ulimit syscalls though, who knows.
To overcome an error which was occurring during the "Rustup install" step that was producing a "memory allocation of 16777216 bytes failed" error that was ALSO NOT causing the _setup_ step to fail, this commit: - Use the 64-bit installer rather than the 32-bit! I would have thought that this on its own could have been the major root of the problem, but it seems like it's also paired best with the next bullet. - Limits the amount of RAM for the _installation of Rust_ (and nothing else), overriding the auto-detection which seems un-reliable in this virtual env. rust-lang/rustup#2229 (comment) - Uses a larger resource size, which actually makes the tests run faster anyhow. This will use more credits but use less minutes. I'll look at the numbers in a month to see what I think, but I'm not worried right now. (note to self: 76203c/1900m, right now, jesse) - Prevent missed failure catch in installation via .exe file, instead opting for using LASTEXITCODE which seems to be a recommended way to do this when using EXE files. Having the "echo" there certainly seems like it could have been hurting things too (since echo returns 0, but that didn't seem to fix it on its own).
To overcome an error which was occurring during the "Rustup install" step that was producing a "memory allocation of 16777216 bytes failed" error that was ALSO NOT causing the _setup_ step to fail, this commit: - Use the 64-bit installer rather than the 32-bit! I would have thought that this on its own could have been the major root of the problem, but it seems like it's also paired best with the next bullet. - Limits the amount of RAM for the _installation of Rust_ (and nothing else), overriding the auto-detection which seems un-reliable in this virtual env. rust-lang/rustup#2229 (comment) - Uses a larger resource size, which actually makes the tests run faster anyhow. This will use more credits but use less minutes. I'll look at the numbers in a month to see what I think, but I'm not worried right now. (note to self: 76203c/1900m, right now, jesse) - Prevent missed failure catch in installation via .exe file, instead opting for using LASTEXITCODE which seems to be a recommended way to do this when using EXE files. Having the "echo" there certainly seems like it could have been hurting things too (since echo returns 0, but that didn't seem to fix it on its own).
To overcome an error which was occurring during the "Rustup install" step that was producing a "memory allocation of 16777216 bytes failed" error that was ALSO NOT causing the _setup_ step to fail, this commit: - Use the 64-bit installer rather than the 32-bit! I would have thought that this on its own could have been the major root of the problem, but it seems like it's also paired best with the next bullet. - Limits the amount of RAM for the _installation of Rust_ (and nothing else), overriding the auto-detection which seems un-reliable in this virtual env. rust-lang/rustup#2229 (comment) - Uses a larger resource size, which actually makes the tests run faster anyhow. This will use more credits but use less minutes. I'll look at the numbers in a month to see what I think, but I'm not worried right now. (note to self: 76203c/1900m, right now, jesse) - Prevent missed failure catch in installation via .exe file, instead opting for using LASTEXITCODE which seems to be a recommended way to do this when using EXE files. Having the "echo" there certainly seems like it could have been hurting things too (since echo returns 0, but that didn't seem to fix it on its own).
Problem
Running
rustup update
to upgrade an install to the 1.41.0 stable release today, I have a repeatable failure:This is on a mips host with 512 MiB of physical ram. I'd expect this to work on a larger machine, but it also doesn't seem correct that the installer is asking for twice the size of the file it's unpacking.
Steps
rustup update
.Possible Solution(s)
Since the previous releases all worked, it's possible the rustc package just got big enough to trigger this in the 1.41.0 release.
Notes
I ran
rustup self update
to upgrade the tool itself to 1.21.1, but that didn't resolve the issue. I can also reproduce with rustup 1.20.2 re-installed by an older rustup-init binary, so the bug doesn't seem to be particularly new.Note that this left the host without a working toolchain, since the installer removes the old release before unpacking the new one. I'm also unable to downgrade since
rustup
seems to now requireclippy
which wasn't available for this plafform in previous releases. Is there a way around that?Command-line
tar xvf
works fine to unpack the archive.Output of
rustup --version
:Output of
rustup show
:The text was updated successfully, but these errors were encountered: