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

Very weird behavior when printing dep nodes #109676

Closed
Noratrieb opened this issue Mar 27, 2023 · 1 comment · Fixed by #109678
Closed

Very weird behavior when printing dep nodes #109676

Noratrieb opened this issue Mar 27, 2023 · 1 comment · Fixed by #109678
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Noratrieb
Copy link
Member

Noratrieb commented Mar 27, 2023

Like all good stories, this one starts with an ICE. I was investigating #108481 and turned on -Zincremental-verify-ich and I got an unstable fingerprint error. Beautiful.
#108481 (comment)

There is something very wrong with this error.

thread 'rustc' panicked at 'Found unstable fingerprints for ErrorGuaranteed(()): all-is-cubes/src/mesh/chunked_mesh.rs:40:71: 41:5 (#0)', /rustc/db0cbc48d4aaa300713a95d9b317a365a474490c/compiler/rustc_query_system/src/query/plumbing.rs:711:9

ErrorGuaranteed is not a dep node. This was on the latest nightly 2023-03-26. So then I tried my outdated-by-a-few-days master branch and got a normal error

thread 'rustc' panicked at 'Found unstable fingerprints for def_span(all_is_cubes[4f6c]::mesh::chunked_mesh::{impl#6}::{constant#0})`

I then turned on thin lto locally (because thin lto is pretty suspicious to me now) and it still showed the right error. I also tried building it with a less outdated local compiler with thin lto and no debug assertions and it showed ErrorGuaranteed again. But after some more cleaning and playing around with trying to bisect the ErrorGuaranteed change (I didn't try an old nightly at that point) even nightly showed the proper error message.

I then continued minimization and after some time I got ErrorGuaranteed again.

At one point I added a dbg of a dep node of the same type somewhere in interface, but it was printed normally (printing the key panicked as I was doing it wrong but the kind was shown correctly).

My current plan is to continue the ICE minimization as normal and then, once I hopefully have a smaller repro for the ICE, try it again.

I haven't played around with it too much and didn't have a consistent environment so it's hard to say more.

if someone had some spare time it would be neat if they could poke around with trying the repro and see what they get. I'm a little (maybe more than a little) worried that this is a sign of something very bad so I put up the issue for visibility.

I am on x86_64-unknown-linux-gnu and did not try other toolchains.

@Noratrieb Noratrieb added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 27, 2023
@Noratrieb
Copy link
Member Author

Noratrieb commented Mar 27, 2023

The relates code actually was touched recently which matches my observations
#109371

Looks like it was made to use dyn Debug. Is something wrong with our vtables again and is dispatching the debug impl to ErrorGuaranteed instead of DepNode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant