Closed
Description
(Apologies if I've done this wrong. I've used the Bug template and not the ICE one because I'm not getting the "Internal Compiler Error" error message. I've also had a bit of a search and not seen anyone else reporting this at all, but I can't see anything unusual that I'm doing.)
I have a project that recently stopped building, and it's taken me a while to work out why. I still don't know everything - sorry! - but what I do know is this:
- I'm using Nightly. It does not affect Stable. Additionally, it does not affect Nightly from before 2020-08-13. The very first version that breaks is:
-> % rustc --version --verbose
rustc 1.47.0-nightly (81dc88f88 2020-08-13)
binary: rustc
commit-hash: 81dc88f88f92ba8ad7465f9cba10c12d3a7b70f1
commit-date: 2020-08-13
host: x86_64-apple-darwin
release: 1.47.0-nightly
LLVM version: 10.0
- I'm getting this on macOS but it also affects Linux. I know because I first caught it on my Github Actions CI build.
- When it happens, I can got to Activity Monitor and see the memory usage of rustc going up. I caught this one because the OS complained about running out of memory on one test when it reached 15GB of memory used by the compiler.
- I'm using a Cargo Workspace to keep different components in my system isolated from each other. However, I can't see any reason why that would be the problem. The error I'm seeing happens deterministically in exactly one of the crates, and all of the others are fine.
- I have one single line of code that I can comment out that will stop the problem happening. However, it's not anything special.
The error happens in the method:
#[get("/authentication/{provider}/complete")]
#[tracing::instrument(
fields(http_method = "GET", http_path = "/authentication/:provider/complete"),
skip(authentication_service, authorization_service)
)]
pub async fn complete(
path: Path<(ProviderId,)>,
query: Query<HashMap<String, String>>,
authentication_service: Data<AuthenticationService>,
authorization_service: Data<AuthorizationService>,
) -> HttpResponse {
let user = authentication_service
.complete_authentication(&path.0, &query.0)
.await;
todo!()
}
If I remove the .await
call in there then the build completes. If I leave the .await
in then it breaks.
However, I've got other Actix endpoints that use async/await and they work perfectly well.
Cheers
Metadata
Metadata
Assignees
Labels
Area: Async & AwaitAsync-await issues that have been triaged during a working group meeting.Category: This is a bug.Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.Helping to "clean up" bugs with minimal examples and bisectionsRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.
Type
Projects
Status
Done