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

Issue: Internal Compiler Error #89539

Closed
alexandre-roulin opened this issue Oct 5, 2021 · 3 comments
Closed

Issue: Internal Compiler Error #89539

alexandre-roulin opened this issue Oct 5, 2021 · 3 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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.

Comments

@alexandre-roulin
Copy link

alexandre-roulin commented Oct 5, 2021

Code

code from bevy but I don't know where it come from.

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (f03eb6bef 2021-10-02)
binary: rustc
commit-hash: f03eb6bef8ced8a243858b819e013b9caf83d757
commit-date: 2021-10-02
host: x86_64-unknown-linux-gnu
release: 1.57.0-nightly
LLVM version: 13.0.0

Error output

<output>
Backtrace

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f03eb6bef8ced8a243858b819e013b9caf83d757/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f03eb6bef8ced8a243858b819e013b9caf83d757/library/std/src/panicking.rs:517:5
   1: core::panicking::panic_fmt
             at /rustc/f03eb6bef8ced8a243858b819e013b9caf83d757/library/core/src/panicking.rs:100:14
   2: core::panicking::panic
             at /rustc/f03eb6bef8ced8a243858b819e013b9caf83d757/library/core/src/panicking.rs:50:5
   3: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
   4: rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover
   5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
   6: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   8: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
   9: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  10: rustc_query_system::query::plumbing::ensure_must_run
  11: rustc_query_system::query::plumbing::get_query
  12: rustc_session::session::Session::track_errors
  13: rustc_typeck::check_crate
  14: rustc_interface::passes::analysis
  15: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  16: rustc_data_structures::stack::ensure_sufficient_stack
  17: rustc_query_system::query::plumbing::try_execute_query
  18: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  19: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  20: rustc_span::with_source_map
  21: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.57.0-nightly (f03eb6bef 2021-10-02) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

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

query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack

@alexandre-roulin alexandre-roulin 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 Oct 5, 2021
@Alexendoo Alexendoo added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Oct 5, 2021
@th1000s
Copy link
Contributor

th1000s commented Oct 16, 2021

I could reproduce this by first running cargo check with stable / 1.55.0 (c8dfcfe04 2021-09-06), then switching to 1.57.0-nightly (e1e9319 2021-10-14) and running cargo check sequentially over a few commits (via git rebase --exec) until rustc panics.

Shell commands and backtrace:

The commits are from dandavison/delta#515

$ git clone 'https://github.com/th1000s/delta' --single-branch -b ice ice && cd ice
    (commit b73c4729034985b2ddf6f767d18f6f779726a442)
$ rustup default stable                                                                                                                                                          
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.55.0 (c8dfcfe04 2021-09-06)
$ cargo check
[ check output ]
$ rustup default nightly                                                                                                                                                         
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.57.0-nightly (e1e9319d9 2021-10-14)
$ git rebase HEAD~9 --exec 'RUST_BACKTRACE=1 cargo check' 

[ check output ]

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
  0: rust_begin_unwind
            at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:517:5
  1: core::panicking::panic_fmt
            at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/core/src/panicking.rs:100:14
  2: core::panicking::panic
            at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/core/src/panicking.rs:50:5
  3: <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id
  4: rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover
  5: rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node
  6: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  7: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  8: rustc_data_structures::stack::ensure_sufficient_stack
  9: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::type_of
  10: <rustc_typeck::outlives::implicit_infer::InferVisitor as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item
  11: rustc_typeck::outlives::inferred_outlives_crate
  12: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  14: rustc_data_structures::stack::ensure_sufficient_stack
  15: rustc_query_system::query::plumbing::try_execute_query
  16: rustc_query_system::query::plumbing::force_query_impl
  17: rustc_query_system::query::plumbing::force_query
  18: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  19: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  20: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  21: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  22: rustc_query_system::query::plumbing::ensure_must_run
  23: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_mod_item_types
  24: rustc_middle::hir::map::Map::for_each_module
  25: rustc_session::session::Session::track_errors
  26: rustc_typeck::check_crate
  27: rustc_interface::passes::analysis
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  29: rustc_data_structures::stack::ensure_sufficient_stack
  30: rustc_query_system::query::plumbing::try_execute_query
  31: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  32: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  33: rustc_span::with_source_map
  34: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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.57.0-nightly (e1e9319d9 2021-10-14) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-fuse-ld=lld --crate-type bin

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

query stack during panic:
#0 [type_of] computing type of `config::Config::side_by_side_data`
#1 [inferred_outlives_crate] computing the inferred outlives predicates for items in this crate
#2 [analysis] running analysis passes on this crate

$ RUST_BACKTRACE=full cargo check                                                           130 
    Checking git-delta v0.8.4 (ice)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/compiler/rustc_hir/src/definitions.rs:452:14
stack backtrace:
  0:     0x7faaf77fd44c - std::backtrace_rs::backtrace::libunwind::trace::hc6c3491277866fea
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
  1:     0x7faaf77fd44c - std::backtrace_rs::backtrace::trace_unsynchronized::h4524f073368a5b13
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
  2:     0x7faaf77fd44c - std::sys_common::backtrace::_print_fmt::h0d0cace6159902af
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys_common/backtrace.rs:67:5
  3:     0x7faaf77fd44c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e6af6f05919a7fc
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys_common/backtrace.rs:46:22
  4:     0x7faaf785a72c - core::fmt::write::h72801a82c94e6ff1
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/core/src/fmt/mod.rs:1163:17
  5:     0x7faaf77edd75 - std::io::Write::write_fmt::ha4f5d34aaccbac84
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/io/mod.rs:1696:15
  6:     0x7faaf78006c0 - std::sys_common::backtrace::_print::heed69f5ce9a8e189
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys_common/backtrace.rs:49:5
  7:     0x7faaf78006c0 - std::sys_common::backtrace::print::h5f3918bd80c09252
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys_common/backtrace.rs:36:9
  8:     0x7faaf78006c0 - std::panicking::default_hook::{{closure}}::h5af30648530eb3d0
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:210:50
  9:     0x7faaf780026b - std::panicking::default_hook::he88d5fb1ba1b4c19
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:227:9
  10:     0x7faaf7fe0981 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h01d22289cd0772f5
  11:     0x7faae61f3273 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h66c6ab1840c5c2ba
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/alloc/src/boxed.rs:1705:9
  12:     0x7faae61e5ccd - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::h40f134d55d54f9a9
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/proc_macro/src/bridge/client.rs:320:21
  13:     0x7faaf7800ed9 - std::panicking::rust_panic_with_hook::h01febc308b2b313b
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:628:17
  14:     0x7faaf7800962 - std::panicking::begin_panic_handler::{{closure}}::h24a6d13f5560b71f
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:519:13
  15:     0x7faaf77fd8f4 - std::sys_common::backtrace::__rust_end_short_backtrace::h3e2917f0da9fbc5c
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys_common/backtrace.rs:139:18
  16:     0x7faaf78008f9 - rust_begin_unwind
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/panicking.rs:517:5
  17:     0x7faaf77c5ef1 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/core/src/panicking.rs:100:14
  18:     0x7faaf77c5e3d - core::panicking::panic::h50b51d19800453c0
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/core/src/panicking.rs:50:5
  19:     0x7faaf9998057 - <rustc_query_impl::on_disk_cache::OnDiskCache as rustc_middle::ty::context::OnDiskCache>::def_path_hash_to_def_id::hacdd1a12c8a6a919
  20:     0x7faaf9e53ef1 - rustc_middle::dep_graph::dep_node::<impl rustc_query_system::dep_graph::dep_node::DepNodeParams<rustc_middle::ty::context::TyCtxt> for rustc_span::def_id::LocalDefId>::recover::h9b4ed204aad02f54
  21:     0x7faafa45c59c - rustc_query_impl::query_callbacks::hir_owner::force_from_dep_node::hac77ceacdae08323
  22:     0x7faaf99776c6 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  23:     0x7faaf99771cd - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  24:     0x7faaf9946557 - rustc_data_structures::stack::ensure_sufficient_stack::hafe87d1a6faa563f
  25:     0x7faaf995e58a - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::type_of::h78280c6111c52f3e
  26:     0x7faaf94b3e7e - <rustc_typeck::outlives::implicit_infer::InferVisitor as rustc_hir::itemlikevisit::ItemLikeVisitor>::visit_item::h85b69c060ebe6ddb
  27:     0x7faaf94a560b - rustc_typeck::outlives::inferred_outlives_crate::hc16e9d378d63edb8
  28:     0x7faaf8981b90 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h88f68bd692f20f92
  29:     0x7faaf89e6653 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::hb49b30d8909e8156
  30:     0x7faaf8958c30 - rustc_data_structures::stack::ensure_sufficient_stack::hccd285c0595e014c
  31:     0x7faafa36e34b - rustc_query_system::query::plumbing::try_execute_query::h6c98ef42fc0ad51b
  32:     0x7faaf8857fc0 - rustc_query_system::query::plumbing::force_query_impl::h0ce81e59427dd1d3
  33:     0x7faaf884dda6 - rustc_query_system::query::plumbing::force_query::h441c44db9f6bbbba
  34:     0x7faaf99776c6 - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  35:     0x7faaf99771cd - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  36:     0x7faaf99771cd - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  37:     0x7faaf99771cd - rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green::h3ba808691f329dfd
  38:     0x7faaf98b1572 - rustc_query_system::query::plumbing::ensure_must_run::hc0f23e1a74914208
  39:     0x7faafa4698e0 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_mod_item_types::h65aac55f25c191e9
  40:     0x7faafa16fcdb - rustc_middle::hir::map::Map::for_each_module::h3729cd5d6b536616
  41:     0x7faafa167cfa - rustc_session::session::Session::track_errors::h9613463c5bf049fd
  42:     0x7faafa153fd5 - rustc_typeck::check_crate::h2194fe45371ced07
  43:     0x7faaf9ef3257 - rustc_interface::passes::analysis::h62e7bd7224bf65bf
  44:     0x7faafa48ea62 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::h69b35833458a5cba
  45:     0x7faafa428599 - rustc_data_structures::stack::ensure_sufficient_stack::h71e49e4b6dcbe9b3
  46:     0x7faafa35746f - rustc_query_system::query::plumbing::try_execute_query::h065f8ec640f176e0
  47:     0x7faafa4683e2 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis::ha51e35996b6bca8d
  48:     0x7faaf9ed8d64 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hbc256b5f150b9d90
  49:     0x7faaf9ec915f - rustc_span::with_source_map::hbb982f7b14586300
  50:     0x7faaf9ed85c0 - scoped_tls::ScopedKey<T>::set::h5abc4b94401f97a1
  51:     0x7faaf9ec9945 - std::sys_common::backtrace::__rust_begin_short_backtrace::h03408d15258e4f5e
  52:     0x7faaf9eec1d2 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hfeb27cab59932043
  53:     0x7faaf780c1e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hd81bd86213781012
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/alloc/src/boxed.rs:1691:9
  54:     0x7faaf780c1e3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7b3e346f5d8f6d6a
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/alloc/src/boxed.rs:1691:9
  55:     0x7faaf780c1e3 - std::sys::unix::thread::Thread::new::thread_start::ha575792f17151d60
                              at /rustc/e1e9319d93aea755c444c8f8ff863b0936d7a4b6/library/std/src/sys/unix/thread.rs:106:17
  56:     0x7faaf7718ea7 - start_thread
                              at ./nptl/./nptl/pthread_create.c:477:8
  57:     0x7faaf7635def - clone
                              at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
  58:                0x0 - <unknown>

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.57.0-nightly (e1e9319d9 2021-10-14) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-fuse-ld=lld --crate-type bin

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

query stack during panic:
#0 [type_of] computing type of `config::Config::side_by_side_data`
#1 [inferred_outlives_crate] computing the inferred outlives predicates for items in this crate
#2 [analysis] running analysis passes on this crate

@BGR360
Copy link
Contributor

BGR360 commented Dec 21, 2021

Possible dupe of #91696. Hopefully fixed by #91919.

@rustbot label +A-incr-comp

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label Dec 21, 2021
@workingjubilee
Copy link
Member

Closing assuming the previous "it's a duplicate" is correct, because it seems so to my eyes. Should be fixed by either that or #93064

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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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.
Projects
None yet
Development

No branches or pull requests

6 participants