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

thread 'rustc' panicked at 'called Option::unwrap() on a None value', compiler/rustc_middle/src/ty/query/mod.rs:235:5 #79866

Closed
virtualritz opened this issue Dec 9, 2020 · 2 comments
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

@virtualritz
Copy link

Code

I am not able to nail this down to a specific line, unfortunately.

git clone https://github.com/virtualritz/polyhedron-ops.git
cd polyhedron-ops
git checkout 3138d1d
cargo build --example playground --features obj,tilings

Meta

Builds fine on stable and beta.

Kicks the bucket on nightly.
rustc --version --verbose:

rustc 1.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-apple-darwin

Error output

stack backtrace:
   0:        0x10dbab1fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hddf67b5e68ee5eac
   1:        0x10dc1299d - core::fmt::write::hae6418d3f135b639
   2:        0x10db9ce16 - std::io::Write::write_fmt::h822c37b1fbb805d3
   3:        0x10dbaee79 - std::panicking::default_hook::{{closure}}::hb8c76ec6b2b5fec2
   4:        0x10dbaea00 - std::panicking::default_hook::h9520f36dd50be056
   5:        0x1102dbd08 - rustc_driver::report_ice::hab08807b07bece61
   6:        0x10dbaf65e - std::panicking::rust_panic_with_hook::hbb70e1d25c7381a9
   7:        0x10dbaf139 - std::panicking::begin_panic_handler::{{closure}}::hb72eee9aad2e147c
   8:        0x10dbab6b8 - std::sys_common::backtrace::__rust_end_short_backtrace::h372ff87ecb2667f3
   9:        0x10dbaf0ca - _rust_begin_unwind
  10:        0x10dc39c1f - core::panicking::panic_fmt::h261fd45d36f74dfa
  11:        0x10dc39b77 - core::panicking::panic::hee3a097dbdc988d8
  12:        0x1143a85f6 - rustc_middle::ty::query::try_load_from_on_disk_cache::h79b5afe1c2e80cd7
  13:        0x1138c14d4 - rustc_query_system::dep_graph::graph::DepGraph<K>::exec_cache_promotions::h59848ff5959f2b25
  14:        0x1138d67e8 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h6b0f4f58f3fe4fa5
  15:        0x1138908a3 - rustc_incremental::persist::save::save_in::h95c4af985c810672
  16:        0x11388c79f - rustc_data_structures::sync::join::h28cbe6f4856b759a
  17:        0x1138d61ed - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps::h417a8e727abe81c6
  18:        0x11388f947 - rustc_incremental::persist::save::save_dep_graph::h5168ffbb71fa5484
  19:        0x1137acad3 - rustc_codegen_ssa::base::finalize_tcx::h27af4387e3fad8ad
  20:        0x11068cb60 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h672987f7a5956f16
  21:        0x11049e64d - rustc_session::utils::<impl rustc_session::session::Session>::time::hdde8570199d8b0d3
  22:        0x1104d6182 - rustc_interface::passes::QueryContext::enter::hd55f5917ee1869a7
  23:        0x11051bf30 - rustc_interface::queries::Queries::ongoing_codegen::hd9e56cbce1d99cdb
  24:        0x11028e49f - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hb3cbdf40d2d583ab
  25:        0x11030bc7e - rustc_span::with_source_map::h4f73b4651f1d8670
  26:        0x11028f414 - rustc_interface::interface::create_compiler_and_run::ha35d2af54e9355e8
  27:        0x110321fe9 - scoped_tls::ScopedKey<T>::set::h8cb1fe74bd062a4c
  28:        0x110328431 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8e2469a9116ebf76
  29:        0x110296af9 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hfc39034b1b021f49
  30:        0x10dbbbfdd - std::sys::unix::thread::Thread::new::thread_start::h93dd3097fa4fa219
  31:     0x7fff70e6b109 - __pthread_start

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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-fuse-ld=/usr/local/bin/zld --crate-type bin
@virtualritz virtualritz 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 Dec 9, 2020
@jounathaen
Copy link

I have probably the same bug but on a different architecture. I think it already happened with 2020-12-06.

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/query/mod.rs:235: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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unstable-options -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-Tutil/x86_64.ld

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

query stack during panic:
end of query stack
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `LLVMing`,
 right: `Codegenning`', /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/compiler/rustc_codegen_ssa/src/back/write.rs:1425:21

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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unstable-options -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-Tutil/x86_64.ld

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

And with a Backtrace but maybe not 100% the same error:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_middle/src/ty/query/mod.rs:235:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/1700ca07c6dd7becff85678409a5df6ad4cf4f47/library/core/src/panicking.rs:50:5
   3: rustc_middle::ty::query::try_load_from_on_disk_cache
   4: rustc_query_system::dep_graph::graph::DepGraph<K>::exec_cache_promotions
   5: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
   6: rustc_incremental::persist::save::save_in
   7: rustc_data_structures::sync::join
   8: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
   9: rustc_incremental::persist::save::save_dep_graph
  10: rustc_codegen_ssa::base::finalize_tcx
  11: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  12: rustc_session::utils::<impl rustc_session::session::Session>::time
  13: rustc_interface::passes::QueryContext::enter
  14: rustc_interface::queries::Queries::ongoing_codegen
  15: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  16: rustc_span::with_source_map
  17: rustc_interface::interface::create_compiler_and_run
  18: 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.50.0-nightly (1700ca07c 2020-12-08) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z unstable-options -C embed-bitcode=no -C debuginfo=2 -C incremental -C link-arg=-Tutil/x86_64.ld

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

query stack during panic:
end of query stack
error: could not compile `edu-kernel`

To learn more, run the command again with --verbose.

Only happens ocasionally

@camelid
Copy link
Member

camelid commented Dec 9, 2020

Duplicate of #79661.

The fix has been merged, the next nightly (2020-12-09) should have the fix.

@camelid camelid closed this as completed Dec 9, 2020
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

3 participants