rustc 1.25.0 panics with "Cannot allocate memory" while building Firefox 59 for Manjaro Linux i686 within Docker build container #49853
Labels
C-bug
Category: This is a bug.
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
O-x86_32
Target: x86 processors, 32 bit (like i686-*)
O-x86_64
Target: x86-64 processors (like x86_64-*)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Summary
While trying to build Firefox 59.0.2 for i686 under a Manjaro Linux (Arch-like) Docker-based build container,
rustc
panics with "Cannot allocate memory" while compiling thegkrust
crate.I'm reporting because the backtrace asked me to. :)
Details
On first look this would appear to be
rustc
trying to allocate more than ~3GB RAM during the LTO step as seen https://bugzilla.mozilla.org/show_bug.cgi?id=1417268#c13, and a similar thing last occurred with rustc 1.22 (https://bbs.archlinux32.org/viewtopic.php?id=643).Monitoring RAM usage during the failing compilation step appears to show it remaining fairly constant at ~1.3GB RES for a "long" period (~50% time before failure), jumping to ~1.5GB RES, then jumping again to 1.7GB and 2.0GB (~80% TBF), before finally (~95% TBF) rapidly increasing in ~100MB steps and panicking somewhere around ~3GB RES.
I am able to successfully build 64-bit Firefox 59.0.2, as well as both 32- and 64-bit Firefox ESR 52.7.3 with the same build container setup, so it looks to be something specific between i686
rustc
and FF 59's use of thegkrust
crate.I have not set any resource limits for Docker.
Steps which might reproduce
Failing command with flags
/usr/bin/rustc --crate-name gkrust lib.rs --color always --crate-type staticlib --emit=dep-info,link -C opt-level=2 -C panic=abort -C lto --cfg feature="bindgen" --cfg feature="cubeb-remoting" --cfg feature="cubeb_pulse_rust" --cfg feature="gkrust-shared" --cfg feature="no-static-ideograph-encoder-tables" --cfg feature="servo" --cfg feature="simd-accel" -C metadata=651646389c08113e -C extra-filename=-651646389c08113e --out-dir /build/src/mozilla-unified/obj-i686-pc-linux-gnu/toolkit/library/i686-unknown-linux-gnu/release/deps --target i686-unknown-linux-gnu -C linker=/build/src/mozilla-unified/build/cargo-linker -L dependency=/build/src/mozilla-unified/obj-i686-pc-linux-gnu/toolkit/library/i686-unknown-linux-gnu/release/deps -L dependency=/build/src/mozilla-unified/obj-i686-pc-linux-gnu/toolkit/library/release/deps --extern gkrust_shared=/build/src/mozilla-unified/obj-i686-pc-linux-gnu/toolkit/library/i686-unknown-linux-gnu/release/deps/libgkrust_shared-f2bb0c738944c0f6.rlib -C opt-level=2 -C debuginfo=2
Backtrace
rustc --version --verbose
Packaging files
rustc: https://www.archlinux.org/packages/community/x86_64/rust/
firefox: https://www.archlinux.org/packages/extra/x86_64/firefox/
The text was updated successfully, but these errors were encountered: