-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Enable debug assertions on alt builds #131077
base: master
Are you sure you want to change the base?
Conversation
@bors try |
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
☀️ Try build successful - checks-actions |
Assertions seem to be enabled in the CI log, and CI time doesn't seem to be regressed almost at all. No concerns from me. I'll ask on Zulip, but otherwise LGTM. |
I don’t expect CI times to change that much. Assertions will make the compiler slightly slower though. Do we run tests on the opt-dist alt builds? If so, then some of the codegen tests will fail. |
We don't, because they're not PGO/BOLT optimized. |
Ah cool. Mark said before some tier1 targets already have assertions enabled, I’m not sure how any using $DEPLOY can make it work but I don’t know the CI script workflow all that well. PR CI and some test builders already have them enabled so we should be covered at least there. |
Didn't see any objections/concerns, let's try this. @bors r+ |
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
We're evidently PGOBOLTing the alt builds :3 |
I'll try to look into the tests soon @rustbot author |
Maybe I just looked at try builds before? 🤔 Sorry. |
@bors r- |
@bors r- Bors got confused. |
Something is afoot with those tests. Some are failing because though they are (correctly) ignore-debug because std's debug assertions interfere with the tested-for optimization, but the tests weren't ignored. But also we've changed how this ignoring system works since the test failure happened. So let's assess what happens now. @bors try |
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
☀️ Try build successful - checks-actions |
The try build passed, so I think this would merge?
While I agree this is not ideal, should it hold up this PR? I checked the job times, and it looks like this adds about 2 minutes do the dist-x86_64-linux-alt job and about 31 minutes to the dist-x86_64-msvc-alt job 😬 |
I think it's fine that we do PGO on the alt builds, I don't think that was done by accident (I just forgot about it). Let's do another try build to see how long is the MSVC job with cache. @bors try |
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
(This PR wasn't blocked on that, but on me looking at the test failures.) Unless we've disabled |
I don't think we can be sure of anything regarding |
llvm assertions are already enabled and debug assertions are also useful
243d35c
to
5f7cdcc
Compare
Right, let's re-run the try builds and actually run tests. @bors try |
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Ok so this looks like in the context of opt-dist running tests as "stage0", bootstrap doesn't see that debug assertions are turned on for rustc and std, doesn't notify compiletest that it is the case and the |
Unfortunately that sounds about right -- Maybe |
☔ The latest upstream changes (presumably #136185) made this pull request unmergeable. Please resolve the merge conflicts. |
Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions.
We've discussed that this would be useful a few times in the past, most recently in this zulip thread, for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence.
In another thread we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work.
I don't believe this needs an MCP, but am not sure.
To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to.
try-job: dist-x86_64-linux-alt
try-job: dist-x86_64-msvc-alt