Skip to content
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

ICE after renaming trait on nightly 1.80 #126181

Open
tower120 opened this issue Jun 9, 2024 · 10 comments
Open

ICE after renaming trait on nightly 1.80 #126181

tower120 opened this issue Jun 9, 2024 · 10 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tower120
Copy link

tower120 commented Jun 9, 2024

I got an ICE after renamed MaybeEmpty trait on crate root into Empty.
cargo clean solved an issue.
Project is on public github https://github.com/tower120/hi_sparse_array/blob/5910c9352d3494084514f68d6a0f684324dea83a/src/lib.rs#L115.

rustc-ice-2024-06-09T04_06_53-9792.txt
rustc-ice-2024-06-09T04_07_09-12764.txt

@tower120 tower120 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 9, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 9, 2024
@fmease fmease added A-incr-comp Area: Incremental compilation A-resolve Area: Name/path resolution done by `rustc_resolve` specifically S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed A-resolve Area: Name/path resolution done by `rustc_resolve` specifically needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 9, 2024
@fmease
Copy link
Member

fmease commented Jun 9, 2024

Hey, thanks for your report! This seems to be an incremental compilation bug.
Unfortunately I'm unable to reproduce this as is. Below are my exact steps.
If you are able to consistently reproduce this ICE when renaming the trait,
please tell us the reproduction steps in as much detail as possible. Thanks! :)

git clone https://github.com/tower120/hi_sparse_array.git
cd hi_sparse_array
git checkout 5910c9352d3494084514f68d6a0f684324dea83a
rustup install nightly-2024-05-07 --profile minimal
cargo +nightly-2024-05-07 build
sed -i 's/\bMaybeEmpty\b/Empty/g' **/*.rs
cargo +nightly-2024-05-07 build

@fmease
Copy link
Member

fmease commented Jun 9, 2024

I also tried

  • \b(?<!\[)MaybeEmpty\bEmpty with VS Code search & replace, i.e., every occurrence except intra-doc links like [MaybeEmpty]
  • rust-analyzer's rename
  • sed -i 's/\bMaybeEmpty\b/Empty/g' src/lib.rs (crate root only)

to no avail

@tower120
Copy link
Author

tower120 commented Jun 10, 2024

I used RustRover for rename. And compiled with CTRL+F9. Also cargo test --tests.

I get such ICE's from time to time, but not consistently. I also CONSTANTLY loose debug capabilities in random files of project. Both VSCode and RustRover says something like "debuggable file does not have debug info" or that it mismatch.

There is bench.bat in project, It compiles and run project with target-cpu=native. Maybe that is the reason? Maybe build system somehow mess with different build configs?

I also have several chains - nightly, stable, and some 1.7x. Project requires nightly mode (but not nightly chain), and I think I changed default chain previously...

@tower120
Copy link
Author

Maybe you could walk several revision back from master, and then incrementally one-by-one go forth and try to compile, bench and test at each revision. That rename is in master branch now.

@pacak
Copy link
Contributor

pacak commented Jun 13, 2024

I couldn't reproduce it either, but I think #126409 might help to deal with that.

@pacak
Copy link
Contributor

pacak commented Jun 21, 2024

Can you check if you can reproduce it in current nightly?

@tower120
Copy link
Author

I sorry, but that was not reproducible for me from the start.
I just get ICE after CTRL+F9 and saw generated ice report in the project root.
I get ICEs after that, but I can't tell what I did to encounter them.

My guess is that RustRover use some nightly flags for better warning/error messages that could cause that,
since as soon as I disabled them and switched to 1.79 stable - I did not saw ICEs anymore.

@pacak
Copy link
Contributor

pacak commented Jun 21, 2024

Can you try to enable those nightly flags again and see if this happens before current nightly but not after so we can close this ticket?

@tower120
Copy link
Author

I don't know how to get that ICE. I thought that happened due to rename - but I was wrong.

I checked on nightly that I had and it compiled just fine.
I tried current nightly - and no ICE as well.

@tower120
Copy link
Author

I think you may close this. I reopen issue if I encounter that again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants