-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
On nightly, dump ICE backtraces to disk #108714
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
These commits modify the If this was intentional then you can ignore this comment.
cc @davidtwco, @compiler-errors, @JohnTitor, @TaKO8Ki Some changes occurred in src/tools/clippy cc @rust-lang/clippy Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Example contents of an ICE dump:
|
This is a follow up to #106691. |
a74e9e5
to
18225d2
Compare
This comment has been minimized.
This comment has been minimized.
Does this mean we have to adapt tools that specifically provoke ICES, such as glacier, crater, compiletest or icemaker? |
@matthiaskrgr it writes to disk in addition to printing to stderr. This is so that even if you have the visible backtrace filing a report is simplified (instead of copy pasting you can attach the file) and the current cases where someone would have to rerun the command to get the backtrace, people won't need to do so anymore because the backtrace is always available. If you look at the screenshot I'm explicitly turning off the backtrace to show what the message on its own looks like. |
Right now, I can run Also is there a performance impact? (it sounds a bit weird, I know, but might be able to to crash rustc up to ~200 times a second, if that 10Xes suddenly it might be noticeable 😅 ) |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
The Miri subtree was changed cc @rust-lang/miri |
@@ -1,4 +1,5 @@ | |||
// compile-flags: -Ztreat-err-as-bug | |||
// rustc-env:RUSTC_ICE=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these ui tests use a different default setting for rustc_env? if not, this is unnecessary now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, for rustdoc tests it seems to be needed :-/
since some edits are needed anyway, squash acada0610d91b4b35efda012b5d06e2198d48ca4 into its parent and b0b9763 (plus my review comments) into the first commit. r=me with that |
Implement rust-lang/compiler-team#578. When an ICE is encountered on nightly releases, the new rustc panic handler will also write the contents of the backtrace to disk. If any `delay_span_bug`s are encountered, their backtrace is also added to the file. The platform and rustc version will also be collected.
@bors r=oli-obk |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a6cdd81): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 648.656s -> 649.527s (0.13%) |
aah, it sucks that the commit message now says |
With this PR (didn't bisected, but), slightly increased default binary size (checked on x86_64-pc-windows-msvc), the reason is now code rust/library/std/src/panicking.rs Lines 304 to 308 in a0c28cd
CreateFileW , GetFullPathNameW for rustc empty.rs -Copt-level=3 -Cdebuginfo=0 -Clto=yes -Ccodegen-units=1 -Cpanic=abort --edition=2018 where empty.rs is fn main(){}
|
Implement rust-lang/compiler-team#578.
When an ICE is encountered on nightly releases, the new rustc panic handler will also write the contents of the backtrace to disk. If any
delay_span_bug
s are encountered, their backtrace is also added to the file. The platform and rustc version will also be collected.The current behavior will always write to disk on nightly builds, regardless of whether the backtrace is printed to the terminal, unless the environment variable
RUSTC_ICE_DISK_DUMP
is set to0
. This is a compromise and can be changed.