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' #79839

Closed
daveriedstra opened this issue Dec 8, 2020 · 3 comments
Closed
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

@daveriedstra
Copy link

daveriedstra commented Dec 8, 2020

Code

I'm not sure which of my code is triggering this bug (and don't have the time to go through the recommended blog post in the issue template). However, the two most suspicious changes I made today are

  • switch from nightly-2020-11-27 to nightly-2020-12-08
  • start using #![feature(min_const_generics)] (in a separate library crate, which is used in the problem crate but compiles fine on its own)

This also looks similar to #79833

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (3d6705aa5 2020-12-07)
binary: rustc
commit-hash: 3d6705aa5abffe94c83bf09af8c3ba3c599845fc
commit-date: 2020-12-07
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

Error output

Backtrace

$ env RUST_BACKTRACE=1 cargo build --verbose
       Fresh autocfg v1.0.1
       Fresh cfg-if v0.1.10
       Fresh lazy_static v1.4.0
       Fresh scopeguard v1.1.0
       Fresh semver-parser v0.7.0
       Fresh futures v0.1.30
       Fresh slab v0.4.2
       Fresh cfg-if v1.0.0
       Fresh fnv v1.0.7
       Fresh semver v0.9.0
       Fresh lock_api v0.3.4
       Fresh tokio-sync v0.1.8
       Fresh libloading v0.6.6
       Fresh libc v0.2.80
       Fresh maybe-uninit v2.0.0
       Fresh rustc_version v0.2.3
       Fresh log v0.4.11
       Fresh byteorder v1.3.4
       Fresh crossbeam-utils v0.7.2
       Fresh iovec v0.1.4
       Fresh net2 v0.2.35
       Fresh num_cpus v1.13.0
       Fresh memoffset v0.5.6
       Fresh const_fn v0.4.3
       Fresh bitflags v1.2.1
       Fresh jack-sys v0.2.1
       Fresh tokio-executor v0.1.10
       Fresh bytes v0.4.12
       Fresh smallvec v0.6.13
       Fresh crossbeam-queue v0.2.3
       Fresh crossbeam-utils v0.8.1
       Fresh memoffset v0.6.1
       Fresh crossbeam-channel v0.4.4
       Fresh rosc v0.1.6
       Fresh mio v0.6.22
       Fresh crossbeam-epoch v0.8.2
       Fresh tokio-current-thread v0.1.7
       Fresh tokio-timer v0.2.13
       Fresh jack v0.6.5
       Fresh tokio-io v0.1.13
       Fresh crossbeam-epoch v0.9.1
       Fresh crossbeam-channel v0.5.0
       Fresh crossbeam-queue v0.3.1
       Fresh parking_lot_core v0.6.2
       Fresh crossbeam-deque v0.7.3
       Fresh tokio-codec v0.1.2
       Fresh mio-uds v0.6.8
       Fresh parking_lot v0.9.0
       Fresh tokio-threadpool v0.1.18
       Fresh crossbeam v0.7.3
       Fresh crossbeam-deque v0.8.0
       Fresh tokio-reactor v0.1.12
       Fresh tokio-fs v0.1.7
       Fresh crossbeam v0.8.0
       Fresh tokio-uds v0.2.7
       Fresh tokio-tcp v0.1.4
       Fresh tokio-udp v0.1.6
       Fresh tokio v0.1.22
       Fresh monome-rs v1.1.0
       Fresh arc v0.1.0 (/home/dried/Software/darc-rs/arc)
   Compiling darcrs-jack v0.1.0 (/home/dried/Software/darc-rs/darcrs-jack)
     Running `rustc --crate-name darcrs_jack --edition=2018 darcrs-jack/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=b36605a9ed9522cb -C extra-filename=-b36605a9ed9522cb --out-dir /home/dried/Software/darc-rs/target/debug/deps -C incremental=/home/dried/Software/darc-rs/target/debug/incremental -L dependency=/home/dried/Software/darc-rs/target/debug/deps --extern arc=/home/dried/Software/darc-rs/target/debug/deps/libarc-b4d7007595aad299.rlib --extern crossbeam=/home/dried/Software/darc-rs/target/debug/deps/libcrossbeam-6926fe359fd741df.rlib --extern jack=/home/dried/Software/darc-rs/target/debug/deps/libjack-750ae0e669e82843.rlib --extern monome=/home/dried/Software/darc-rs/target/debug/deps/libmonome-0bef62ceff3920ac.rlib`
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/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/3d6705aa5abffe94c83bf09af8c3ba3c599845fc/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 (3d6705aa5 2020-12-07) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
end of query stack
error: could not compile `darcrs-jack`

Caused by:
  process didn't exit successfully: `rustc --crate-name darcrs_jack --edition=2018 darcrs-jack/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=b36605a9ed9522cb -C extra-filename=-b36605a9ed9522cb --out-dir /home/dried/Software/darc-rs/target/debug/deps -C incremental=/home/dried/Software/darc-rs/target/debug/incremental -L dependency=/home/dried/Software/darc-rs/target/debug/deps --extern arc=/home/dried/Software/darc-rs/target/debug/deps/libarc-b4d7007595aad299.rlib --extern crossbeam=/home/dried/Software/darc-rs/target/debug/deps/libcrossbeam-6926fe359fd741df.rlib --extern jack=/home/dried/Software/darc-rs/target/debug/deps/libjack-750ae0e669e82843.rlib --extern monome=/home/dried/Software/darc-rs/target/debug/deps/libmonome-0bef62ceff3920ac.rlib` (exit code: 101)

@daveriedstra daveriedstra 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 8, 2020
@ghost
Copy link

ghost commented Dec 8, 2020

I did encounter the same/similar (panicking from the same file) bug on the x86_64-pc-windows-msvc toolchain too, but it went away when I did ran cargo clean so I couldn't file it (not that it really was reproducible because it apparently depended on possibly broken object files).

@daveriedstra
Copy link
Author

@Dark-Legion thanks for mentioning that, cargo clean then a fresh build worked for me too.

@camelid
Copy link
Member

camelid commented Dec 8, 2020

Looks like a duplicate of #79661.

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

2 participants