Skip to content

thread 'rustc' panicked at 'called Option::unwrap() on a None value', compiler/rustc_metadata/src/rmeta/decoder.rs:1565:75 #80054

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

Closed
haraldh opened this issue Dec 15, 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

@haraldh
Copy link
Contributor

haraldh commented Dec 15, 2020

Only happen rarely. We are building crates from within build.rs. Yeah, I know... but we are including the binary in the final binary.

Repo: https://github.com/enarx/enarx-keepldr/

Command:

$ cargo +nightly test --no-run --all-features
   Compiling shim-sev v0.1.0 (/home/harald/git/enarx/enarx-keepldr/internal/shim-sev)                                                                       
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_metadata/src/rmeta/decoder.rs:1565:75
stack backtrace:
   0: rust_begin_unwind
             at /rustc/f0f68778f798d6d34649745b41770829b17ba5b8/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/f0f68778f798d6d34649745b41770829b17ba5b8/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/f0f68778f798d6d34649745b41770829b17ba5b8/library/core/src/panicking.rs:50:5
   3: core::lazy::OnceCell<T>::get_or_init
   4: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc_middle::middle::cstore::CrateStore for rustc_metadata::creader::CStore>::def_path_hash_to_def_id
   5: rustc_middle::ty::query::on_disk_cache::OnDiskCache::def_path_hash_to_def_id
   6: rustc_middle::ty::query::force_from_dep_node
   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::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  11: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  12: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  14: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  15: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  16: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  17: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  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::dep_graph::graph::DepGraph<K>::try_mark_previous_green
  23: rustc_query_system::dep_graph::graph::DepGraph<K>::try_mark_green_and_read
  24: rustc_query_system::query::plumbing::ensure_query_impl
  25: rustc_session::utils::<impl rustc_session::session::Session>::time
  26: rustc_interface::passes::analysis
  27: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::analysis>::compute
  28: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  29: rustc_query_system::dep_graph::graph::DepGraph<K>::with_eval_always_task
  30: rustc_data_structures::stack::ensure_sufficient_stack
  31: rustc_query_system::query::plumbing::get_query_impl
  32: rustc_interface::passes::QueryContext::enter
  33: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  34: rustc_span::with_source_map
  35: rustc_interface::interface::create_compiler_and_run
  36: 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 (f0f68778f 2020-12-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C panic=abort -C embed-bitcode=no -C debuginfo=2 -C incremental -C relocation-model=pic -C link-args=-Wl,--sort-section=alignment -nostartfiles -C link-self-contained=no -C force-frame-pointers=yes --crate-type bin

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
@haraldh haraldh 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 15, 2020
@Aaron1011
Copy link
Member

This should be fixed in the latest nightly

@Aaron1011
Copy link
Member

I'm going to close this - the backtrace is identical to other issues that have been fixed (e.g. #79661), and some of the relevant code was rewritten in #80177. If this re-occurs, feel free to reopen the issue.

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