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 "Encountered a freshend type with id 0 but our counter is only at 0": eclectic 0.11.0 #56865

Closed
matthiaskrgr opened this issue Dec 16, 2018 · 3 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Dec 16, 2018

Found via this crater experiment: https://crater.rust-lang.org/ex/pr-56550

cargo new crashtest
cd crashtest
echo "eclectic = \"0.11.0\"" >> Cargo.toml
RUST_BACKTRACE=Full cargo check
    Checking eclectic v0.11.0
error: internal compiler error: src/librustc/infer/freshen.rs:165: Encountered a freshend type with id 0 but our counter is only at 0

thread 'main' panicked at 'Box<Any>', src/librustc_errors/lib.rs:600:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:210
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:225
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:492
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::util::bug::opt_span_bug_fmt
  13: rustc::util::bug::bug_fmt
  14: <rustc::infer::freshen::TypeFreshener<'a, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  15: <smallvec::SmallVec<A> as core::iter::traits::FromIterator<<A as smallvec::Array>::Item>>::from_iter
  16: rustc::ty::fold::TypeFoldable::fold_with
  17: rustc::traits::select::SelectionContext::select
  18: rustc::infer::InferCtxt::commit_if_ok
  19: rustc::traits::project::opt_normalize_projection_type
  20: rustc::traits::project::normalize_projection_type
  21: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  22: <smallvec::SmallVec<A> as core::iter::traits::FromIterator<<A as smallvec::Array>::Item>>::from_iter
  23: rustc::ty::fold::TypeFoldable::fold_with
  24: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  25: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  26: <smallvec::SmallVec<A> as core::iter::traits::FromIterator<<A as smallvec::Array>::Item>>::from_iter
  27: rustc::ty::fold::TypeFoldable::fold_with
  28: rustc::ty::structural_impls::<impl rustc::ty::fold::TypeFoldable<'tcx> for &'tcx rustc::ty::TyS<'tcx>>::super_fold_with
  29: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  30: rustc::ty::fold::TypeFoldable::fold_with
  31: rustc::ty::fold::TypeFoldable::fold_with
  32: rustc::traits::project::normalize
  33: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
  34: <core::iter::FlatMap<I, U, F> as core::iter::iterator::Iterator>::next
  35: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  36: rustc::ty::wf::WfPredicates::normalize
  37: rustc::ty::wf::obligations
  38: <rustc_data_structures::obligation_forest::ObligationForest<O>>::process_obligations
  39: <rustc::traits::fulfill::FulfillmentContext<'tcx> as rustc::traits::engine::TraitEngine<'tcx>>::select_where_possible
  40: rustc_typeck::check::FnCtxt::select_obligations_where_possible
  41: rustc::ty::context::tls::with_related_context
  42: rustc::infer::InferCtxtBuilder::enter
  43: rustc_typeck::check::typeck_tables_of
  44: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_tables_of<'tcx>>::compute
  45: rustc::dep_graph::graph::DepGraph::with_task_impl
  46: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start
  47: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  48: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  49: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::ensure_query
  50: rustc::session::Session::track_errors
  51: rustc_typeck::check::typeck_item_bodies
  52: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::typeck_item_bodies<'tcx>>::compute
  53: rustc::dep_graph::graph::DepGraph::with_task_impl
  54: <rustc::ty::query::plumbing::JobOwner<'a, 'tcx, Q>>::start
  55: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  56: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  57: rustc::util::common::time
  58: rustc_typeck::check_crate
  59: rustc::ty::context::tls::enter_context
  60: <std::thread::local::LocalKey<T>>::with
  61: rustc::ty::context::TyCtxt::create_and_enter
  62: rustc_driver::driver::compile_input
  63: rustc_driver::run_compiler_with_pool
  64: <scoped_tls::ScopedKey<T>>::set
  65: rustc_driver::run_compiler
  66: rustc_driver::monitor::{{closure}}
  67: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  68: rustc_driver::run
  69: rustc_driver::main
  70: std::rt::lang_start::{{closure}}
  71: std::panicking::try::do_call
             at src/libstd/rt.rs:59
             at src/libstd/panicking.rs:307
  72: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  73: std::rt::lang_start_internal
             at src/libstd/panicking.rs:286
             at src/libstd/panic.rs:398
             at src/libstd/rt.rs:58
  74: main
  75: __libc_start_main
  76: <unknown>
query stack during panic:
#0 [typeck_tables_of] processing `assert_object_safe`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: aborting due to previous error


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.33.0-nightly (96d1334e5 2018-12-14) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C target-cpu=native --crate-type lib

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

error: Could not compile `eclectic`.

To learn more, run the command again with --verbose.
rustc 1.33.0-nightly (96d1334e5 2018-12-14)
binary: rustc
commit-hash: 96d1334e567237b1507cd277938e7ae2de75ff51
commit-date: 2018-12-14
host: x86_64-unknown-linux-gnu
release: 1.33.0-nightly
LLVM version: 8.0
@matthiaskrgr
Copy link
Member Author

This also crashes beta rustc (but not stable).

@Centril Centril added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Dec 16, 2018
@Mark-Simulacrum Mark-Simulacrum added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 16, 2018
@ExpHP
Copy link
Contributor

ExpHP commented Dec 17, 2018

Looks like #56288

@matthiaskrgr
Copy link
Member Author

Ah yeah. Not sure why I didn't find that....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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

4 participants