-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler runs out of memory in nested async/await calls since 1.46 #77628
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
Comments
What's the Rust version in the Docker container? |
@jonas-schievink It is |
Does it still use 16 GB if you use that Rust version outside of the container? |
@sakex: Is it possible for you to upload your repository? If not, does the high RAM usage occur when building dependencies, or when building your repository? |
How recently have you |
@jonas-schievink, @Aaron1011, @sfackler I actually tried to compile with @Aaron1011 I can make give you access to my repo but I'd rather not share it. The code is quite complicated/messy actually. @sfackler Given my discovery, I will not try to docker pull unless you really need some insights. Are there any ways I could assist you in finding the regression? |
Update:I tried with Is it something you are aware of? |
Update 2:I have found the exact line that creates the problem The original function was:
By removing chunks of code one by one, I isolated the offending line of code as being:
Which is a call to the |
Update 3Lifting the code out of the function inside a
It is of course not so great to do that, but I hope it will help you in finding the bug |
How long is your normal compile time in 1.44 ? |
probably related to #75992, currently waiting for an MVCE for that issue |
@lzutao It takes around 1:45 minutes (in debug with dependencies cached) I will run the bisection now |
Took much longer than I thought, so bisection is possible, but you might not want |
@lzutao I need to go anyway, so I'll let it run for a few hours, I'll report if I find something The command: |
Regression in 0a49057 searched nightlies: from nightly-2020-08-13 to nightly-2020-08-14 bisected with cargo-bisect-rustc v0.5.2Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2020-08-13 --end=2020-08-14 |
Thank you very much @sakex for taking the time to bisect this! |
Duplicate of #75992. |
Hmm, I thought that would mark it in GitHub... |
I have a fairly small program (around 5k lines of code), with some heavy dependencies such as Tokio, Actix, Serde and Tokio-Tungstenite. I can't get it to compile outside of Docker because it eats all my RAM + Swap (I have 16Gb.) However, when I compile in Docker with a two steps compilation process, it takes only 1Gb.
My Cargo.toml
My Dockerfile:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: