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

Internal Compiler Error: unexpected panic #74603

Closed
shamil-gadelshin opened this issue Jul 21, 2020 · 1 comment
Closed

Internal Compiler Error: unexpected panic #74603

shamil-gadelshin opened this issue Jul 21, 2020 · 1 comment
Labels
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.

Comments

@shamil-gadelshin
Copy link

Code

Tried to build this project:

https://github.com/smartcontractkit/chainlink-polkadot

Using this video:

https://www.youtube.com/watch?v=0rZghy0TIOQ

The exact package that breaks the compiler:

Compiling sp-arithmetic v2.0.0 (https://github.com/paritytech/substrate.git?rev=3e651110aa06aa835790df63410a29676243fc54#3e651110)

Meta

rustc --version --verbose:

rustc 1.46.0-nightly (346aec9b0 2020-07-11)
binary: rustc
commit-hash: 346aec9b02f3c74f3fce97fd6bda24709d220e49
commit-date: 2020-07-11
host: x86_64-apple-darwin
release: 1.46.0-nightly
LLVM version: 10.0

Error output

error: internal compiler error: unexpected panic
thread 'rustc' panicked at 'if we got here, it must be const', src/librustc_mir/transform/const_prop.rs:1010:34
stack backtrace:
Backtrace

shamixs-MacBook-Pro:chainlink-polkadot shamix$ RUST_BACKTRACE=1 make run-chain
cd substrate-node-example; cargo run --release -- --dev
   Compiling node-runtime v2.0.0 (/Users/shamix/rust/chainlink-polkadot/substrate-node-example/runtime)
   Compiling ring v0.16.15
   Compiling snow v0.6.2
   Compiling schnorrkel v0.8.5
   Compiling x25519-dalek v0.5.2
   Compiling sp-arithmetic v2.0.0 (https://github.com/paritytech/substrate.git?rev=3e651110aa06aa835790df63410a29676243fc54#3e651110)
   Compiling fork-tree v2.0.0 (https://github.com/paritytech/substrate.git?rev=3e651110aa06aa835790df63410a29676243fc54#3e651110)
   Compiling finality-grandpa v0.10.3
   Compiling primitive-types v0.6.2
   Compiling librocksdb-sys v6.7.4
thread 'rustc' panicked at 'if we got here, it must be const', src/librustc_mir/transform/const_prop.rs:1010:34
stack backtrace:
   Compiling rocksdb v0.13.0
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::option::expect_failed
  10: <rustc_mir::transform::const_prop::ConstPropagator as rustc_middle::mir::visit::MutVisitor>::visit_terminator::{{closure}}
  11: <rustc_mir::transform::const_prop::ConstPropagator as rustc_middle::mir::visit::MutVisitor>::visit_terminator
  12: <rustc_mir::transform::const_prop::ConstPropagator as rustc_middle::mir::visit::MutVisitor>::visit_body
  13: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
  14: rustc_mir::transform::run_passes
  15: rustc_mir::transform::run_optimization_passes
  16: rustc_mir::transform::optimized_mir
  17: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::optimized_mir>::compute
  18: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  19: rustc_data_structures::stack::ensure_sufficient_stack
  20: rustc_query_system::query::plumbing::get_query_impl
  21: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::instance_mir
  22: rustc_mir::monomorphize::collector::collect_neighbours
  23: rustc_mir::monomorphize::collector::collect_items_rec
  24: rustc_session::utils::<impl rustc_session::session::Session>::time
  25: rustc_mir::monomorphize::collector::collect_crate_mono_items
  26: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  27: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::collect_and_partition_mono_items>::compute
  28: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  29: rustc_query_system::query::plumbing::get_query_impl
  30: rustc_codegen_ssa::base::codegen_crate
  31: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  32: rustc_session::utils::<impl rustc_session::session::Session>::time
  33: rustc_interface::passes::start_codegen
  34: rustc_middle::ty::context::tls::enter_global
  35: rustc_interface::queries::Queries::ongoing_codegen
  36: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  37: rustc_span::with_source_map
  38: rustc_interface::interface::create_compiler_and_run
  39: 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.46.0-nightly (346aec9b0 2020-07-11) running on x86_64-apple-darwin

note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

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

query stack during panic:
#0 [optimized_mir] optimizing MIR for `<fixed64::Fixed64 as std::ops::Div>::div`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `sp-arithmetic`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

@shamil-gadelshin shamil-gadelshin 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 Jul 21, 2020
@jonas-schievink
Copy link
Contributor

Duplicate of #73993, please update your Rust version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

No branches or pull requests

2 participants