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

ICE: /checkout/src/librustc/ich/impls_ty.rs:78: TypeIdHasher: unexpected region ReLateBound(DebruijnIndex { depth: 1 }, "BrEnv") #45161

Closed
CraZySacX opened this issue Oct 10, 2017 · 6 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@CraZySacX
Copy link

Received the ICE in the title when compilng rsjni

output.txt

This only occurred on the x86_64-unknown-linux-gnu nightly build. I was able to successfully build and test with i686-unknown-linux-gnu and x86_64-pc-windows-msvc nightlies.

Meta

rustc --version --verbose

rustc 1.22.0-nightly (692b94a 2017-10-09)
binary: rustc
commit-hash: 692b94a
commit-date: 2017-10-09
host: x86_64-unknown-linux-gnu
release: 1.22.0-nightly
LLVM version: 4.0

Backtrace:

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:492:8
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:69
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:58
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::bug
   7: rustc::session::opt_span_bug_fmt::{{closure}}
   8: rustc::session::opt_span_bug_fmt
   9: rustc::session::bug_fmt
  10: rustc::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'gcx>> for rustc::ty::sty::RegionKind>::hash_stable
  11: rustc::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'gcx>> for rustc::ty::sty::TypeVariants<'gcx>>::hash_stable
  12: rustc::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'gcx>> for rustc::ty::sty::Binder<T>>::hash_stable
  13: rustc::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc::ich::hcx::StableHashingContext<'gcx>> for rustc::ty::sty::TypeVariants<'gcx>>::hash_stable
  14: <T as rustc::dep_graph::dep_node::DepNodeParams<'a, 'gcx, 'tcx>>::to_fingerprint
  15: rustc::dep_graph::dep_node::DepNode::new
  16: rustc::ty::maps::<impl rustc::ty::maps::queries::is_sized_raw<'tcx>>::try_get
  17: rustc::ty::maps::TyCtxtAt::is_sized_raw
  18: rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::is_sized
  19: rustc_trans::callee::get_fn
  20: rustc_trans::mir::block::<impl rustc_trans::mir::MirContext<'a, 'tcx>>::trans_terminator
  21: rustc_trans::mir::trans_mir
  22: rustc_trans::base::trans_instance
  23: rustc_trans::base::compile_codegen_unit
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::force
  25: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::try_get
  26: rustc::ty::maps::TyCtxtAt::compile_codegen_unit
  27: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::compile_codegen_unit
  28: rustc_trans::base::trans_crate
  29: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  30: rustc_driver::driver::compile_input::{{closure}}
  31: rustc::ty::context::TyCtxt::create_and_enter
  32: rustc_driver::driver::compile_input
  33: rustc_driver::run_compiler

error: Could not compile `rsjni`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rsjni src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg feature="default" --cfg feature="nine" -C metadata=6f62d2c5bbcca5bb -C extra-filename=-6f62d2c5bbcca5bb --out-dir /data/projects/rust-lang/rsjni/target/debug/deps -L dependency=/data/projects/rust-lang/rsjni/target/debug/deps --extern error_chain=/data/projects/rust-lang/rsjni/target/debug/deps/liberror_chain-07f6a9232ac6c576.rlib --extern getset=/data/projects/rust-lang/rsjni/target/debug/deps/libgetset-16d8a528ec0c58f1.so -Zincremental=/data/projects/rust-lang/rsjni/target/debug/incremental -L /opt/java/lib/server -l jvm -L native=/data/projects/rust-lang/rsjni/target/debug/build/backtrace-sys-09fe0c7e20aa4b64/out/.libs` (exit code: 101)
@vorner
Copy link
Contributor

vorner commented Oct 10, 2017

Hello

I'm getting a similar backtrace with my project (gitlab.labs.nic.cz/turris/pakon-aggregator). However, I get it only with CARGO_INCREMENTAL=1, if I set it to 0, the build goes through.

@CraZySacX
Copy link
Author

I am also seeing the same behavior. Setting CARGO_INCREMENTAL to 0 causes the ICE to disappear.

@michaelwoerister
Copy link
Member

Thanks for the bug report, @CraZySacX!

@michaelwoerister michaelwoerister added A-incr-comp Area: Incremental compilation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Oct 10, 2017
@TimNN TimNN added the C-bug Category: This is a bug. label Oct 10, 2017
@alexander-irbis
Copy link

The same error for me. I don't know if this is the same bug, but the minimal code to reproduce below

enum Enum { A }

fn fail() {
    let x: Vec<_> = [Enum::A].iter().map(|e| e).collect();
}

@vorner
Copy link
Contributor

vorner commented Oct 12, 2017

I think it is the same one. I definitely have code something like this in the project.

@michaelwoerister
Copy link
Member

A fix for this is already in the queue: #45176

bors added a commit that referenced this issue Oct 12, 2017
…er, r=nikomatsakis

incr.comp.: Fix HashStable for ty::RegionKind and trans item order

Fixes #45161 and the failing rust-icci tests.

r? @nikomatsakis
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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

5 participants