-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
error: internal compiler error: src\librustc\ty\query\plumbing.rs:1195: Cannot force dep node: coherent_trait(core[b9cc]::ops[0]::drop[0]::Drop[0])
thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:635:9
stack backtrace:
0: std::sys_common::alloc::realloc_fallback
1: std::panicking::take_hook
2: std::panicking::take_hook
3: <syntax::attr::builtin::IntType as rustc::ty::util::IntTypeExt>::disr_incr
4: std::panicking::rust_panic_with_hook
5: <rustc_errors::snippet::Style as core::fmt::Debug>::fmt
6: rustc_errors::Handler::bug
7: rustc::util::bug::bug_fmt
8: <&rustc::mir::interpret::allocation::Allocation as rustc::ty::context::Lift>::lift_to_tcx
9: <&rustc::mir::interpret::allocation::Allocation as rustc::ty::context::Lift>::lift_to_tcx
10: <&rustc::mir::interpret::allocation::Allocation as rustc::ty::context::Lift>::lift_to_tcx
11: rustc::util::bug::bug_fmt
12: rustc::util::bug::bug_fmt
13: rustc::ty::query::plumbing::force_from_dep_node
14: rustc::dep_graph::graph::DepGraph::try_mark_green
15: rustc::dep_graph::graph::DepGraph::try_mark_green
16: rustc::dep_graph::graph::DepGraph::try_mark_green
17: rustc::dep_graph::graph::DepGraph::try_mark_green
18: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
19: rustc::traits::query::dropck_outlives::<impl rustc::infer::at::At>::dropck_outlives
20: <rustc_typeck::impl_wf_check::ImplWfCheck as rustc::hir::itemlikevisit::ItemLikeVisitor>::visit_item
21: <rustc_typeck::check::regionck::RegionCtxt as rustc::hir::intravisit::Visitor>::visit_expr
22: <rustc_typeck::check::regionck::RegionCtxt as rustc::hir::intravisit::Visitor>::visit_expr
23: <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt
24: <rustc_typeck::check::Diverges as core::fmt::Debug>::fmt
25: <rustc_typeck::check::regionck::RegionCtxt as rustc::hir::intravisit::Visitor>::visit_expr
26: <rustc_typeck::check::Diverges as core::fmt::Debug>::fmt
27: <rustc_typeck::check::regionck::RegionCtxt as rustc::hir::intravisit::Visitor>::visit_expr
28: <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt
29: rustc_typeck::check::regionck::<impl rustc_typeck::check::FnCtxt>::regionck_fn
30: <rustc_typeck::check::Diverges as core::fmt::Debug>::fmt
31: <rustc_typeck::check::CheckItemTypesVisitor as rustc::hir::itemlikevisit::ItemLikeVisitor>::visit_item
32: rustc::infer::unify_key::<impl ena::unify::UnifyKey for rustc::ty::sty::FloatVid>::index
33: rustc::dep_graph::graph::DepGraph::assert_ignored
34: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
35: rustc::ty::query::plumbing::force_from_dep_node
36: rustc::dep_graph::graph::DepGraph::try_mark_green
37: rustc::dep_graph::graph::DepGraph::try_mark_green
38: rustc::dep_graph::graph::DepGraph::try_mark_green
39: rustc::dep_graph::graph::DepGraph::try_mark_green
40: rustc::dep_graph::graph::DepGraph::try_mark_green_and_read
41: <rustc_typeck::collect::find_existential_constraints::ConstraintLocator as rustc::hir::intravisit::Visitor>::visit_trait_item
42: rustc_typeck::check_crate
43: rustc_interface::passes::BoxedResolver::to_expansion_result
44: rustc_driver::set_sigpipe_handler
45: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
46: <env_logger::fmt::WriteStyle as core::default::Default>::default
47: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
48: rustc_driver::set_sigpipe_handler
49: rustc_interface::interface::Compiler::output_file
50: rustc_driver::set_sigpipe_handler
51: rustc_driver::set_sigpipe_handler
52: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
53: <rustc_driver::Compilation as core::fmt::Debug>::fmt
54: rustc_driver::set_sigpipe_handler
55: _rust_maybe_catch_panic
56: rustc_driver::set_sigpipe_handler
57: <std::error::<impl core::convert::From<alloc::string::String> for alloc::boxed::Box<dyn +std::error::Error+core::marker::Sync+core::marker::Send>>::from::StringError as core::fmt::Display>::fmt
58: std::sys::windows::thread::Thread::new
59: BaseThreadInitThunk
60: RtlUserThreadStart
query stack during panic:
#0 [dropck_outlives] computing dropck types for `Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [Binder(TraitPredicate(<T as std::marker::Send>)), Binder(TraitPredicate(<T as my::prelude::ConnectionLike>)), Binder(TraitPredicate(<T as my::connection_like::ConnectionLike>)), Binder(TraitPredicate(<P as std::marker::Send>)), Binder(TraitPredicate(<P as my::prelude::Protocol>)), Binder(TraitPredicate(<P as my::queryable::Protocol>)), Binder(TraitPredicate(<TupleType as std::marker::Send>)), Binder(TraitPredicate(<TupleType as my::prelude::FromRow>)), Binder(TraitPredicate(<P as std::marker::Sized>)), Binder(TraitPredicate(<T as std::marker::Sized>)), Binder(TraitPredicate(<TupleType as std::marker::Sized>)), Binder(OutlivesPredicate(T, ReLateBound(DebruijnIndex(1), BrAnon(0)))), Binder(OutlivesPredicate(P, ReLateBound(DebruijnIndex(1), BrAnon(0)))), Binder(OutlivesPredicate(TupleType, ReLateBound(DebruijnIndex(1), BrAnon(0))))], reveal: UserFacing, def_id: None }, value: std::result::Result<std::vec::Vec<TupleType>, my::error::Error> } }`
#1 [typeck_tables_of] processing `get_all_results`
#2 [analysis] running analysis passes on this crate
end of query stack
note: rustc 1.35.0-nightly (acd8dd6a5 2019-04-05) running on x86_64-pc-windows-msvc
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib
It have something to do with incremental build :( query stack
seems to point to random function sometimes even in file that was not edited for weeks. Issue started today. Deleting target
folder help for few compilations.
I do not use latest compiler because some problems with crate upgrades and incompatibilities with async/await! so the issue is not caused by the compiler version, because I use same version for a while, but it is triggered by something in my code.
Is there anything I can look for in my code that could cause these issues?
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
hellow554 commentedon May 8, 2019
Remember what you've done between cleaning and ICEing. (maybe auto git commit every save or similar ^^).
In my case it was just renaming a variable from
map
toMap
which causes an ICE.xNxExOx commentedon May 8, 2019
when I think backward 🤔
it first appeared when I add crate slotmap, and with that crate I was able to reproduce it even with 2 lines edit to their simplest example, so at that point I think it is caused by the crate and removed it and it was fine for a while, I chose to use CHashMap that solve some problems for me.
🤔 I can not say after which change it reappear.
xNxExOx commentedon May 8, 2019
https://docs.rs/slotmap/0.3.0/slotmap/macro.new_key_type.html
I want to know if I could use
u32
as key because I already have uniqueu32
so I try to implementKey
trait for struct containing onlyu32
get error, so I tried to replace their key and still get the error, and when I commented out//struct EntityKey;
it compile, I tried few other combinations, but compiler panicked a lot, so I decided it is not the crate I want and removed it prom my project.nikomatsakis commentedon May 9, 2019
triage:
I'm going to mark this as P-high, but it might be more of a "medium" bug. It's a bit hard to say. I think there are few bits of info that would be useful:
xNxExOx commentedon May 9, 2019
For the first question:
I am on windows 10 Pro 1809, CPU 1950X, 64 GB RAM and steps to reproduce are simple for me:
slotmap = "0.3.0"
MyKey
as mentioned aboveMyKey
target
folderFor the second question yes it started recently when I tried this crate, but more importantly the issue persisted after I removed it, it is just much less common than every second build.
hellow554 commentedon May 9, 2019
Sadly I cannot reproduce it. Let me try to summarize it:
cargo new bar
sloptmap = "0.3.0"
as dependency in Cargo.tomlcargo build
cargo build
(hope it crashes)Am I correct? Please be as precice as possible and clarify "just rename
MyKey
". Do you want me to change lower/upper case? Remove one character? Add one?Your nightly seems kind of outdated. Is it still possible for you if you use the latest nightly? (I tried both, no luck)
hellow554 commentedon May 9, 2019
🎉 It seems that it has been fixed on latest nightly, but I'm now able to reproduce it 100% with nightly-2019-04-05 (acd8dd6).
sloptmap = "0.3.0"
as dependency in Cargo.toml//
in front ofstruct EntityKey
//
in front ofstruct EntityKey
again4 remaining items
michaelwoerister commentedon May 10, 2019
Thanks a lot for looking into this, @hellow554!
@xNxExOx, can you confirm that the crash doesn't occur anymore with the latest nightly compiler?
add regression test for rust-lang#60629
xNxExOx commentedon May 10, 2019
After a lot of effort I switched toolchain to
nightly-2019-05-09-x86_64-pc-windows-msvc
and it seems to work here (over 20 rebuilds without error)hellow554 commentedon May 10, 2019
@xNxExOx please do not close this issue. I created a PR which will automatically close this when it has been merged. Please reopen it
Zoxc commentedon May 10, 2019
This is likely caused by #59517 and fixed by #59723.
hellow554 commentedon May 10, 2019
Can confirm that the bug has been fixed in #59723 (bisecting ftw)
add regression test for rust-lang#60629
Rollup merge of rust-lang#60697 - hellow554:fix_60629, r=michaelwoeri…
Auto merge of #60708 - Centril:rollup-j5smdo0, r=Centril