-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
armv7 exhausts memory on stage0 librustc w/ debuginfo #45854
Comments
Firefox appears to be hitting this now too, while compiling gkrust: |
This also affects mips and mipsel on Debian which prevents us from bootstrapping the Rust compiler for these architectures. Disabling debug symbols doesn't help unfortunately, unlike on armel and armhf. Both 32-bit MIPS architectures have unfortunately a memory limit of 2 GiB virtual address space per process. |
On Debian, for some packages, we use a gcc option: --param ggc-min-expand=10 on mips/mipsel. Does llvm have some similiar options? |
Work-around for memory exhaustion on arm found on issue: rust-lang/rust#45854
I just ran a scratch build on Fedora 35 with full debuginfo enabled, and the 32-bit targets still failed. Here's i686 (
Here's armv7hl (
(Note, the build version is the as-yet-unreleased 1.64 only because I was already doing release prep...) |
According to https://salsa.debian.org/rust-team/rust/-/blob/debian/sid/debian/rules?ref_type=heads#L238 this is still a problem on many architectures. |
I'm having trouble natively compiling rustc armv7-unknown-linux-gnueabihf with
--enable-debuginfo
, on both the beta and master branches. I haven't seen this on any stable release before. To reproduce the issue, I'm running on Fedora 26 armv7hl, using all default options apart from enabling debuginfo.I guess that C++ exception is probably LLVM running out of memory. This excerpt is from beta sources -- on master it also errors, but without the exception info, instead a SIGSEGV. I doubt that difference is very significant, just bad luck for who failed to allocate memory.
In either case, when I watch progress in htop, the process grows right up to 3GB virt size and then dies. That's the limit of the 32-bit user address space, of course. The resident size was just a little over 2GB at that time, so something is holding wasted memory here. It could be jemalloc, or could be extra capacity in vec/map/etc. -- I'm not sure how to tell.
My workaround for now is to use
--enable-debuginfo-only-std
.(And FWIW, 32-bit i686 is not having this problem for me.)
The text was updated successfully, but these errors were encountered: