-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Benchmark hang with lto = true
and target-cpu=native
#49766
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
It doesn't seem to happen when using |
I'm trying to find a minimal code example. |
Turns out it actually happens with a totally empty project:
|
I have also experienced this issue.
|
@neachdainn what is your microarchitecture? |
Core i7-4770HQ (Haswell) |
Could you also test with a couple other target CPUs? |
Specifically Sandy Bridge and Westmere. |
Here's some tests on a different system:
Core i5-2500k (Sandybridge) I am not seeing the bug on this system, so it may be macOS specific. I'll be able to test this on my Mac on Monday. |
Can someone post a minimal example with code? Or at least some example? This is probably a case of #50422. |
As I mentioned here #49766 (comment), it happens with a totally empty project. fn main() {
println!("Hello, world!");
} |
I've confirmed I cannot reproduce on linux. I believe the hang occurs here, but I've not tracked this down further.
|
Confirm it does not happen with $ RUSTFLAGS='-C target-cpu=native -C lto=thin' cargo bench |
|
I'm seeing a more general problem as well, where a binary running in an benchmark almost always hangs with I haven't investigated yet. |
I'm on Windows, but I cannot reproduce this today. |
Compiling from x86_64-unknown-linux-gnu to
No repro with |
I first posted this in Cargo at rust-lang/cargo#5312
I'm benchmarking some code and often get hangs with
$ RUSTFLAGS='-C target-cpu=native' cargo bench
.My
Cargo.toml
:It only happens when both LTO and target-cpu=native are enabled.
A typical output looks like this, where it hangs for as long as I've left it:
I'm using
cargo 1.26.0-nightly (b70ab13b3 2018-04-04)
. The code requires nightly so I can't test whether this happens on stable.$ rustc --print target-cpus says my processor is sandybridge.
Meta
The text was updated successfully, but these errors were encountered: