-
Notifications
You must be signed in to change notification settings - Fork 13k
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
LLVM assertion failure when building Servo release version with debug symbols on #34434
Comments
Sadly, the error still occurs with the newer rustc version (2016-06-24) |
@aturon Is there any work going on with making debug info work better for release builds? We've had to leave it disabled in Servo due to per-platform breakage for a long time (March of 2015 - servo/servo@fda3791). Thanks! |
cc @rust-lang/compiler as well, thoughts on debug info in release builds? (@larsbergstrom's previous comment) |
The big thing that this makes challenging is doing any sort of profiling. Since it's only meaningful on release builds, we need to turn it on. I often get lucky on linux or android, but macOS and Windows seem less reliable. |
|
@michaelwoerister how do I use the |
@rzambre You'd have to find the code that adds to |
I tried this and get "error: -g and -C debuginfo both provided" reported from several of our (and upstream) crates. I'm not sure what's causing that yet. |
I think release+debuginfo should be a tested Rust compiler code path. Do we need to file a separate bug from this to propose that Rust CI start doing this? |
@metajack We have |
@eddyb Then it sounds like my proposal is to enable tests on the existing debug-opt. I assume they are disabled because these code paths don't currently pass? |
I don't know the exact details. cc @rust-lang/tools |
#27010 has discussion why debug-opt does not run tests. |
We would probably also like to test at least compiling on ARM32 or ARM64 (hopefully both), as those ICE even more often, or at least have over the last couple of years. |
I just ran |
To clarify what we build today:
I believe we have no builders that build tests with debug info. |
@alexcrichton is it debuginfo or the debug asserts that cause the slowdown when running tests? |
I don't personally know, but enabling them both causes the compiler to take just about as long to build as a no-debug-assertions and no-debug-info compiler takes to build and run tests. |
Seems like turning off the asserts would help then at least. If we had a (new) release + no-asserts + debuginfo builder we could probably get some amount of testing done in time. |
This assertion failure is no longer occurring, when building Servo with the compile flags in the original bug report. |
Do you think that we should try turning on debuginfo for Servo by default? I'd LOVE to have it there all the time, but I'm also afraid that it'll cause us to open random high-pri bugs against rustc for random platforms if e.g., there's an ICE in arm32 debuginfo. |
I think Rust people would like to learn about debug-opt problems, but realistically can't guarantee that they will be fixed promptly. Is @rust-lang/compiler team willing to investigate debug-opt problems as high priority as they are found? I think we must do this at some point, but am unsure whether we should right now. |
Unfortunately, only @michaelwoerister has any idea how debuginfo works. |
That's a bit of an overstatement. There are others too and it's not more complicated than other parts of the compiler.
It's really a question of resources and prioritization (as you say). Debuginfo in optimized builds has historically been a rather brittle affair where things could break at every minor LLVM update, especially with LTO enabled, and investigating and fixing these issues can be rather time-consuming.
That's pretty accurate, at least from my point of view. |
Hrm, then it sounds like a good plan of action here is:
|
@larsbergstrom Could you give an update here? I don't see anything related to debuginfo in the Cargo.toml; and from my own experience release + debuginfo seems to work locally.. though I cannot be certain. |
You can close this now, from my perspective. Release+debuginfo still breaks occasionally, but there are enough high-profile consumers at this point that the bugs are pretty quickly identified and fixed. |
Platform: Mac OSX 10.11
Servo issue: servo/servo#11828
After commenting out lines 30 and 31 in the Cargo.toml under components/servo,
./mach build -r
compiles all the way until layout_thread but returns this LLVM assertion failure:This is most likely an existing rustc bug that got exposed after some recent commits (not precisely sure which one but possibly servo/servo#11804) in Servo. The release version with debug symbols on was compiling successfully a couple of days ago.
The text was updated successfully, but these errors were encountered: