-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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/surprising memory consumption with Rust 1.72 #115216
Comments
Believe I have the same issue. Not using yew, the project is a web server using Just built the same code with 1.72 and 1.71 on a 8CPU 8GB RAM machine: CI builds running 1.72 time out at 2h, where building with 1.71 took 5-10 minutes. Same 2h timeout with a 32CPU 32GB RAM machine. |
We've noticed similar build time differences with Rust 1.72 as well for hyperswitch: our CI builder (used to build Docker release images) got killed because of going out of memory. Building the same branch on a 32 core, 64 GB RAM machine took more than 1 hour 20 minutes on Rust 1.72 (and we had to cancel it), while building with Rust 1.71 took ~20 minutes. |
@SanchithHegde I have a similarly sized machine and I'm having trouble reproducing your numbers. I cloned the repo you linked and on commit I glanced through the repo and I didn't notice any other build options being set, but maybe I missed something. Can you help me reproduce the problem you're having? |
It also shows error in rustc 1.71.0 |
Successfully
in .cargo/config.toml Not sure why so much memory even if my code base isn't very large. |
Hey @saethlin, sure, I'll include relevant information to help you try and reproduce the build time increase.
The exact repository and branch that was compiled in the above case is not public, and is a wrapper over the linked hyperswitch repository, with the hyperswitch repository being the major contributor to the code compiled (~80%). However, I was still able to reproduce the increase in build time with the corresponding branch on the hyperswitch repository. The command that was run in each case was the following Docker command, with a suitable Docker image tag: $ docker build --build-arg BINARY=router --tag <image_tag> --file Dockerfile . This in turn runs the following $ cargo build --release --features release The first row in the table contains the branch name and the commit hash being compiled, and the first column contains the Rust version used to compile each time.
By the way, to build with 1.71, I changed the first line in the FROM rust:slim-bookworm as builder to: FROM rust:1.71-slim-bookworm as builder I'll also include some details about the host machine used:
Hope this helps, let me know if you need any more information from me. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high |
Thanks for sharing your code @amiyatulu! Unfortunately, I wasn't able to observe much of a difference in memory usage between 1.71, 1.72 and current nightly: 1.71
1.72
1.74.0-nightly (59a8294 2023-08-30)
Even in 1.71, the build is right on the cusp of using ~32gb of RAM so perhaps it's just taking slightly more in 1.72 and getting OOM killed. |
@wesleywiser Thanks for checking out. Have you tried the commit. It works fine with |
I am having a similar problem when compiling scryer-prolog for wasm32-unknown-unknown at mthom/scryer-prolog#2413 (the linked PR is not directly related, all CI currently failes due to the wasm32 build)
On Windows 11 using WSL 2 |
Ah! That reproduces easily.
@rustbot label +A-LLVM +O-wasm |
Based on that it looks like this/my problem might be related to llvm/llvm-project#47793 |
I was using trunk serve in a yew app,
I have 32 GB of ram, running
trunk serve
consumes all and terminates without producing build.I am using rustc 1.72.0 (5680fa1 2023-08-23)
System: Ubuntu 20.04.2 LTS
Processor: 12th Gen Intel® Core™ i7-12650H × 16
Memory: 32 GiB
It also shows error in rustc 1.71.0
cargo build --release
successfully works, but error comes withtrunk build
ortrunk serve
or justcargo build
Reproducible code link
Please change the src/constants/auth.rs.bak to auth.rs
The text was updated successfully, but these errors were encountered: