Stream: t-compiler/wg-prioritization/alerts

Topic: #80336 ICE: found unstable fingerprints for optimized_mir w…


triagebot (Dec 25 2020 at 18:21, on Zulip):

@WG-prioritization/alerts issue #80336 has been requested for prioritization.

Procedure

apiraino (Dec 30 2020 at 13:32, on Zulip):

I don't have enough context to judge this one, any opinion @WG-prioritization ? There's also a thorough analysis and a comment about not being easy to reduce it to an mcve.

apiraino (Dec 30 2020 at 13:33, on Zulip):

But it seems that this ICE is blocking a compilation of code pulled from that repo, so I feel this should be investigated closely. my uneducated guess would say P-high at least

lcnr (Dec 30 2020 at 13:34, on Zulip):

the explanation by @Aaron Hill seems to imply that the current eval cache is unsound, even if we don't yet know if that unsoundness can actually be triggered. P-high or P-critical imo

Ryan Levick (Dec 30 2020 at 13:35, on Zulip):

I would do P-high given that it’s seemingly not easy to actual trigger but it needs to be actively investigated

Léo Lanteri Thauvin (Dec 30 2020 at 13:41, on Zulip):

This only happens with O-wasm?

apiraino (Dec 30 2020 at 13:43, on Zulip):

that's another good question.

apiraino (Dec 30 2020 at 13:45, on Zulip):

Ill also mention the ICE group if anyone can have a look and try to reduce this a little bit
(maybe also try it on a different rust branch - no evidence yet the issue happening on other than nightly)

triagebot (Dec 30 2020 at 13:49, on Zulip):

Issue #80336's prioritization request has been removed.

Léo Lanteri Thauvin (Dec 30 2020 at 13:55, on Zulip):

if it also happen on other than nightlies

IIUC this ICE happens because of the -Z incremental-verify-ich? So trying to reproduce on e.g. stable is not going to work

apiraino (Dec 30 2020 at 14:01, on Zulip):

oh I see, is that because incremental-verify-ich is a nightly only flag? (tried to search for that flag but couldnt find anything useful...)

Léo Lanteri Thauvin (Dec 30 2020 at 14:04, on Zulip):

FWIW, the ICE is emitted here which gets called here if -Zincremental-verify-ich is specified

Léo Lanteri Thauvin (Dec 30 2020 at 14:04, on Zulip):

I think the question of whether it can reproduce on e.g. beta is important if it turns out this issue is unsound

matthiaskrgr (Dec 30 2020 at 14:42, on Zulip):

mh, I was able to reproduce in a different repo (rust analyzer) on x86, so probably unrelated to wasm in particular

matthiaskrgr (Dec 30 2020 at 14:43, on Zulip):

and yes, it also happens on beta

matthiaskrgr (Dec 30 2020 at 14:44, on Zulip):

if I force -Zincremental-verify-ich to be enabled

Léo Lanteri Thauvin (Dec 30 2020 at 14:45, on Zulip):

If you can post a comment on the issue with your findings, that would be great :heart:

matthiaskrgr (Dec 30 2020 at 14:50, on Zulip):

also happens on stable 1.48.0

matthiaskrgr (Dec 30 2020 at 14:51, on Zulip):
thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(4aebcd058ee1a9be-c5a25d2e61d4dbbb)', /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_query_system/src/query/plumbing.rs:555:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.48.0 (7eac88abb 2020-11-16) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z incremental-verify-ich=yes -C embed-bitcode=no -C debuginfo=0 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: could not compile `ide_db`
Léo Lanteri Thauvin (Dec 30 2020 at 14:52, on Zulip):

Can that happen in 1.47.0? If not we might be able to bisect the bug to a specific commit

matthiaskrgr (Dec 30 2020 at 14:52, on Zulip):

checking...

matthiaskrgr (Dec 30 2020 at 14:57, on Zulip):

also happens in 1.47 :(

matthiaskrgr (Dec 30 2020 at 15:03, on Zulip):

1.46 as well...
stopped going deeper now

Léo Lanteri Thauvin (Dec 30 2020 at 15:03, on Zulip):

Thanks a lot!

Léo Lanteri Thauvin (Dec 31 2020 at 00:38, on Zulip):

Hmm, I was wondering if this bug could deserve I-nominated

Léo Lanteri Thauvin (Dec 31 2020 at 00:38, on Zulip):

@apiraino IIRC you said tomorrow's agenda is quite light? Could we add this issue maybe?

Léo Lanteri Thauvin (Dec 31 2020 at 00:39, on Zulip):

The goal being to determine if this bug can cause actual unsoundness

apiraino (Dec 31 2020 at 00:45, on Zulip):

I see some investigation here :-) thanks a lot @matthiaskrgr great work!

apiraino (Dec 31 2020 at 00:49, on Zulip):

yes, I think we can ask the team is the -Z incremental-verify-ich flag rings a bell. perhaps the question they will have is, if that can be reproduced on a smaller case, but that can be investigated later (I think)

apiraino (Dec 31 2020 at 00:51, on Zulip):

by the way @matthiaskrgr on the issue I read RUSTFLAGS="-Zincremental-verify-ich=yes" cargo build instead of -Z incremental.... is that a typo or is that irrelevant to the compilation? (apologies for the stupidest question ever)

matthiaskrgr (Dec 31 2020 at 00:51, on Zulip):

you mean the space?

Léo Lanteri Thauvin (Dec 31 2020 at 00:52, on Zulip):

It doesn't matter, rustc parses both

apiraino (Dec 31 2020 at 00:52, on Zulip):

right, the space :point_up:

Léo Lanteri Thauvin (Dec 31 2020 at 01:07, on Zulip):

@apiraino wait, I'm confused. Does the -Z incremental-verify-ich actually perform optimizations?

apiraino (Dec 31 2020 at 01:08, on Zulip):

tried to gather infor on that flag earlier but failed to get some context :-(

Léo Lanteri Thauvin (Dec 31 2020 at 01:09, on Zulip):

The description for the flag in -Zhelp is:

verify incr. comp. hashes of green query instances (default: no)

Léo Lanteri Thauvin (Dec 31 2020 at 01:09, on Zulip):

I think it just verifies the cache

Léo Lanteri Thauvin (Dec 31 2020 at 01:09, on Zulip):

So the issue is not the flag, it's the way rustc caches stuff, with or without the flag

apiraino (Dec 31 2020 at 01:10, on Zulip):

ah right. but it's a nightly only flag, right?

Léo Lanteri Thauvin (Dec 31 2020 at 01:10, on Zulip):

Yes

Léo Lanteri Thauvin (Dec 31 2020 at 01:11, on Zulip):

But if, as I inferred from Aaron's analysis, rustc's handling of regions in the ICH is wrong, this issue will appear with or without the flag, and on stable as well

apiraino (Dec 31 2020 at 01:14, on Zulip):

with or without the flag

I don't follow this part: iiuc the issue is about that flag causing the ICE, correct?

Léo Lanteri Thauvin (Dec 31 2020 at 01:14, on Zulip):

Yes

Léo Lanteri Thauvin (Dec 31 2020 at 01:15, on Zulip):

But IIUC it doesn't change anything about the way the ICH is generated, it just verifies it by running checks

apiraino (Dec 31 2020 at 01:16, on Zulip):

so it's required to reproduce the issue. But it's also a nightly-only flag. so why matthiaskrgr reproduced also on "1.47 and 1.46"?

apiraino (Dec 31 2020 at 01:17, on Zulip):

confused :upside_down:

Léo Lanteri Thauvin (Dec 31 2020 at 01:17, on Zulip):

What I think is scary about this issue is not the ICE

Léo Lanteri Thauvin (Dec 31 2020 at 01:17, on Zulip):

It's the possibility that the incremental cache is not implemented correctly and could lead to unsoundness

apiraino (Dec 31 2020 at 01:20, on Zulip):

ok. I'm just asking because I think in the past "nightly-only" issues (caused by unstable features still far from being stabilized) were not high in priority (If I recall correctly)

Léo Lanteri Thauvin (Dec 31 2020 at 01:20, on Zulip):

Right

apiraino (Dec 31 2020 at 01:20, on Zulip):

but I agree with the general reasoning exposed here

Léo Lanteri Thauvin (Dec 31 2020 at 01:21, on Zulip):

Do you want me to write the agenda entry, if that can help you?

apiraino (Dec 31 2020 at 01:21, on Zulip):

please feel free to add what do you think is appropriate :)

matthiaskrgr (Dec 31 2020 at 18:01, on Zulip):

the ice also reproduces inside the regex crate (has only little deps and is smaller). I was able to trigger it by adding an empty line in some function :thinking:

matthiaskrgr (Dec 31 2020 at 18:17, on Zulip):

got it down to a couple of lines

Léo Lanteri Thauvin (Dec 31 2020 at 18:17, on Zulip):

Awesome :sparkles:

apiraino (Dec 31 2020 at 18:30, on Zulip):

guys what are you doing here?

get out and turn off the computer :D

matthiaskrgr (Dec 31 2020 at 18:53, on Zulip):

fireworks were cancelled here :P

Stu (Dec 31 2020 at 19:00, on Zulip):

Yes it’s also forbidden in Germany

Joshua Nelson (Dec 31 2020 at 19:00, on Zulip):

in florida it's allowed for farmers or anyone who says they're a farmer and has the money to pay for it :joy:

Joshua Nelson (Dec 31 2020 at 19:07, on Zulip):

oh wait I take it back, they just legalized it for holidays http://www.northescambia.com/2020/12/fireworks-are-legal-for-new-years-in-florida

Last update: Apr 11 2021 at 19:30UTC