-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Release build taking forever on 1.34.1 #60548
Comments
@fizyk20 Can you reproduce this frequently? |
It happens every time I try to build this specific crate using 1.34.1. I haven't encountered the problem with any other piece of code yet, though. I'm not sure if I answered the question. |
I've given the crate a cursory look and nothing stood out as being particularly difficult for the compiler (except a few nom parsers perhaps?). Build is stuck somewhere in LLVM, probably running module passes on a cgu. I'll try to bisect, but it's likely that it will just point us to an LLVM upgrade. |
Good: 1.33.0 Good: Commits in range: 097c04c...00aae71 Likely cause: #57609 (since it touches MIR lowering) |
It's something in |
@jonas-schievink |
This is a proper hang, my build is still running after >5 hours. |
Yeah, I ran the build for the crate on EC2 and that's running for > 6 hours |
#60174 appears to fix this. Probably the issue is broken debug info. I'll try a build with llvm assertions tomorrow to see if that's really the case. Smallish repro (pretty hard to meaning fully reduce further)lib.rs: use nom::sp;
use nom::types::CompleteStr;
use nom::Convert;
use nom::InputIter;
use nom::{need_more, Compare};
use nom::{Err, IResult, Needed};
pub fn float(i: CompleteStr) -> IResult<CompleteStr, f64> {
regex::Regex::new("");
Ok((i, 0.0))
}
pub struct TemperatureAt {
pub start_h: f64,
pub start_t: f64,
}
pub fn temperature_at(i: CompleteStr) -> IResult<CompleteStr, TemperatureAt> {
match {
let mut sep_res = sp(i);
match sep_res {
Ok((i1, _)) => {
let res: IResult<CompleteStr, TemperatureAt> = match {
let sep_res = sp(i1);
match sep_res {
Ok((i2, _)) => {
i2.compare("");
let res2: IResult<_, CompleteStr> = need_more(i2, Needed::Size(0));
res2
}
Err(e07) => Err(Err::convert(e07)),
}
} {
Err(e06) => Err(e06),
Ok(_) => match match sep_res {
Ok(_) => {
let res2: IResult<_, char> = match i1.iter_elements().next() {
Some('A') => {
let e05 = nom::ErrorKind::Char;
Err(Err::Error(nom::Context::Code(i1, e05)))
}
_ => need_more(i1, Needed::Size(1)),
};
res2
}
Err(e08) => Err(e08),
} {
Err(e09) => Err(e09),
_ => match {
sep_res = sp(i);
match sep_res {
Err(e10) => Err(e10),
_ => {
let res = float(i1);
res
}
}
} {
Err(e11) => Err(e11),
Ok((i7, o)) => match {
sep_res = sp(i7);
match sep_res {
Ok((i5, _)) => {
let res =
need_more::<_, CompleteStr, u32>(i5, Needed::Size(1));
res
}
Err(e12) => Err(Err::convert(e12)),
}
} {
Err(e01) => Err(e01),
_ => match {
sep_res = sp(i7);
sep_res
} {
Err(e02) => Err(e02),
_ => Ok((
i,
TemperatureAt {
start_h: 0.0,
start_t: 0.0,
},
)),
},
},
},
},
};
drop(&res);
res
}
Err(e03) => Err(e03),
}
} {
Err(e04) => Err(e04),
Ok((i6, o01)) => loop {},
}
} Cargo.toml [package]
name = ""
version = "0.1.0"
authors = [""]
edition = "2018"
[dependencies]
nom = "4.1"
regex = "1.0" |
This is fixed by d38eeacc86179a37e2bf35c1bd336df306b6edde. |
@matthewjasper should we put "Fixes" on that PR for this issue? |
triage: P-high Regression -- assigning to @matthewjasper, who seems to have a pending fix |
I'd rather not use "Fixes" with no test and no idea what the actual problem is here. |
Changed labels now that this compiles successfully on beta. |
I don't think this is worth keeping open in the hopes of finding a test case. |
I'm trying to build my crate at this commit: https://github.com/fizyk20/atm-refraction/tree/a7f38e582d507345f0f6bddbf769244caee0fe70
cargo build --release
ran on Rust 1.34.1 doesn't finish for at least a few minutes (I admit I haven't been too patient with letting it run for a long time, as I knew it used to compile quite quickly, but I can safely say that it wasn't able to finish for me in at least 5 minutes). A debug build (cargo build
) finishes in about 15 seconds.I checked on another Rust version to make sure that it's different, and indeed, compilation of the same commit on 1.31.0 in release mode takes 24 seconds. Nightly 1.36.0 2019-05-03 can't finish just like 1.34.1.
I haven't tried versions other than 1.31.0, 1.34.1 and 1.36.0 nightly so far, but I can do so if needed.
I'm on Gentoo Linux on x86_64. All tested Rust versions installed via
rustup
.If any other information is required, please let me know.
The text was updated successfully, but these errors were encountered: