-
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
rustc compiler crashed when using async in loop #67893
Comments
If you could provide an example that ICEs in e.g. the playground that would be helpful towards fixing the issue. :) |
Provided example is pretty small, but it is dependent on tokio and actix-web. I do not know how to create such an example in playground, I do know know how I can replace async tokio::sync::mpsc with standard library which does not have async alternative as far as i know. I have tried to simplify code but then crash disappear. Just putting everything into one file |
Visiting from triage.. we decided that as the first step we should reduce this reproducer to a more self-contained one. |
Can repro. Will try and min. |
Reduced version so far is here: https://github.com/gilescope/rust-async |
This no longer ICEs on the latest nightly. |
Let's see if we can shrink https://github.com/gilescope/rust-async further so that we can add a test. @rustbot ping cleanup |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @KarlK90 @LeSeulArtichaut @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke |
I’ve reduced it quite a bit. Down to dependencies on my_crate/src/main.rs fn g(_: impl Send) {}
fn main() {
g(my_crate::run())
} my_crate/src/lib.rs use std::sync::{Arc, Mutex};
pub async fn f(_: ()) {}
pub async fn run() {
let x: Arc<Mutex<()>> = unimplemented!();
f(*x.lock().unwrap()).await;
}
|
…Simulacrum Add some regression tests Closes rust-lang#24843 Closes rust-lang#28575 Closes rust-lang#54067 Closes rust-lang#67893 Closes rust-lang#68813 I'm not sure who's the best person to ask to review since Centril is taking a break now.
…Simulacrum Add some regression tests Closes rust-lang#24843 Closes rust-lang#28575 Closes rust-lang#54067 Closes rust-lang#67893 Closes rust-lang#68813 I'm not sure who's the best person to ask to review since Centril is taking a break now.
When learning async/await feature I was struggling with running multiple tasks simultaneously.
Loop
while let Some....
causes compiler to crashhttps://github.com/fbucek/rust-async/blob/f6cc831c817a6b9d2f1c79182c5415b877f0da1e/actix-async/src/lib.rs#L30
Github Action crash output:
https://github.com/fbucek/rust-async/commit/f6cc831c817a6b9d2f1c79182c5415b877f0da1e/checks?check_suite_id=384856246
I expected to see this happen: Error message if something goes wrong.
Instead, this happened: Compiler crashed
Meta
Crash happens on macOS rustc 1.40 / Linux rustc 1.40 / Linux rustc 1.39 ( github actions )
rustc --version --verbose
:macOS
Linux
The text was updated successfully, but these errors were encountered: