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

OOM on MIPS 32-bit #56888

Open
infinity0 opened this issue Dec 16, 2018 · 6 comments
Open

OOM on MIPS 32-bit #56888

infinity0 opened this issue Dec 16, 2018 · 6 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. O-MIPS Target: MIPS processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@infinity0
Copy link
Contributor

We previous successfully did a native-compilation of mips rustc 1.30.0 here:

https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=mips&ver=1.30.0%2Bdfsg1-2%2Bb1&stamp=1541331217&raw=0

It was compiling itself using a previously-cross-compiled 1.30.0 rustc mips, cross-compiled from amd64. Only 14 tests failed out of the whole test suite, so we're now shipping it in Debian.

However the build for 1.31.0 is running out of memory in LLVM on stage 1:

https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=mips&ver=1.31.0%2Bdfsg1-1%7Eexp2&stamp=1544918153&raw=0

@nagisa nagisa added the O-MIPS Target: MIPS processors label Dec 17, 2018
@nagisa
Copy link
Member

nagisa commented Dec 17, 2018

Just my two cents, It is not likely to be a high priority to support building the compiler on 32-bit systems. 3GiB of memory is increasingly little for a modern project of rustc’s size, and even if this particular regression is fixed it is certain that at some point down the road the threshold will be exceeded again and again.

There may be some things you can change in the build configuration (e.g. set codegen units to 1, perhaps?) to ensure a lower peak memory use.

@infinity0
Copy link
Contributor Author

If this is hard to achieve, what you say sounds reasonable. I wanted to file this issue anyways in case >4GB RAM usage is anomalous (e.g. compared to other arches) and/or could be easily fixed.

At any rate it seems like another build attempt succeeded in the meantime so maybe we just have to hope in the future these builds are scheduled on otherwise non-busy machines.

@sanxiyn
Copy link
Member

sanxiyn commented Mar 6, 2019

This continued to be a problem with 1.32.0: https://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/2019-January/004844.html

@sanxiyn sanxiyn changed the title 1.31.0 OOMs compiling itself on MIPS 32-bit OOM on MIPS 32-bit Mar 6, 2019
@nagisa
Copy link
Member

nagisa commented Mar 6, 2019

cc @rust-lang/compiler would be nice to have compiler compilation to fit within 2G or something.

@michaelwoerister
Copy link
Member

Reducing the amount of parallelism in LLVM might help. I think -Zno_parallel_llvm would have the effect of never having more than one LLVM module in memory at a time (at least when not using ThinLTO).

@nagisa
Copy link
Member

nagisa commented Mar 6, 2019

According to the thread linked above -Zno-parallel-llvm is something that has been attempted.

@sanxiyn sanxiyn added the I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. label Mar 19, 2019
@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. O-MIPS Target: MIPS processors T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants