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 on rustc 2018-03-26: librustc_typeck/check/mod.rs:2119: no type for node 3435: type failure::Error (id=3435) in fcx 0x7f5b281f1110 #49408

Closed
PaulGrandperrin opened this issue Mar 27, 2018 · 1 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.

Comments

@PaulGrandperrin
Copy link

Hi,
I hit an ICE on the latest nightly (but it panics the same on a month old rustc).

I'm sorry I will not have the time to investigate or reduce the cause before Thursday but here are the steps to reproduce:

cd /tmp
git clone https://github.com/PaulGrandperrin/reactfs.git
cd reactfs/
git checkout rustc-bug
cargo test

This is the latest commit of this branch that triggered the ICE:
PaulGrandperrin/reactfs@408050f

This bug also looks similar to this one which was closed 6 month ago.
#44957

The trace:

error[E0244]: wrong number of type arguments: expected 1, found 2
   --> src/reactor/tests.rs:120:45
    |
120 | fn write_fibonacci_rec(h:Handle, n: u64) -> Result<(), failure::Error> {
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error: internal compiler error: librustc_typeck/check/mod.rs:2119: no type for node 3435: type failure::Error (id=3435) in fcx 0x7f203eff1110

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:543:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:207
   3: std::panicking::default_hook
             at libstd/panicking.rs:223
   4: core::ops::function::Fn::call
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:403
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::session::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: <std::thread::local::LocalKey<T>>::try_with
  11: <std::thread::local::LocalKey<T>>::with
  12: rustc::ty::context::tls::with
  13: rustc::ty::context::tls::with_opt
  14: rustc::session::opt_span_bug_fmt
  15: rustc::session::bug_fmt
  16: rustc_typeck::check::FnCtxt::node_ty
  17: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  18: rustc::hir::intravisit::walk_path
  19: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
  20: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_local
  21: rustc::hir::intravisit::walk_expr
  22: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  23: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  24: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  25: rustc::hir::intravisit::walk_expr
  26: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  27: rustc::hir::intravisit::walk_expr
  28: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  29: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
  30: rustc_typeck::check::writeback::<impl rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx>>::resolve_type_vars_in_body
  31: rustc::ty::context::tls::enter
  32: rustc::infer::InferCtxtBuilder::enter
  33: rustc_typeck::check::typeck_tables_of
  34: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  35: rustc::dep_graph::graph::DepGraph::with_task_impl
  36: rustc_errors::Handler::track_diagnostics
  37: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  38: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  39: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  40: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  41: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  42: rustc_typeck::check::typeck_tables_of
  43: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute_result
  44: rustc::dep_graph::graph::DepGraph::with_task_impl
  45: rustc_errors::Handler::track_diagnostics
  46: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  47: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::force
  48: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  49: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  50: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  51: rustc_typeck::collect::type_of
  52: rustc::ty::maps::<impl rustc::ty::maps::queries::type_of<'tcx>>::compute_result
  53: rustc::dep_graph::graph::DepGraph::with_task_impl
  54: rustc_errors::Handler::track_diagnostics
  55: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::cycle_check
  56: rustc::ty::maps::<impl rustc::ty::maps::queries::type_of<'tcx>>::force
  57: rustc::ty::maps::<impl rustc::ty::maps::queries::type_of<'tcx>>::try_get
  58: rustc::ty::maps::TyCtxtAt::type_of
  59: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::type_of
  60: <rustc_typeck::collect::CollectItemTypesVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
  61: rustc::hir::intravisit::walk_expr
  62: rustc::hir::intravisit::walk_expr
  63: <rustc_typeck::collect::CollectItemTypesVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
  64: rustc::hir::Crate::visit_all_item_likes
  65: rustc::session::Session::track_errors
  66: rustc_typeck::check_crate
  67: <std::thread::local::LocalKey<T>>::with
  68: <std::thread::local::LocalKey<T>>::with
  69: rustc::ty::context::TyCtxt::create_and_enter
  70: rustc_driver::driver::compile_input
  71: rustc_driver::run_compiler_impl
  72: syntax::with_globals
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0244`.

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.26.0-nightly (188e693b3 2018-03-26) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental -C target-cpu=native

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

error: Could not compile `reactfs`.

Caused by:
  process didn't exit successfully: `rustc --crate-name reactfs src/lib.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=a4378fc48e876319 -C extra-filename=-a4378fc48e876319 --out-dir /home/paulg/Projects/reactfs/target/debug/deps -C incremental=/home/paulg/Projects/reactfs/target/debug/incremental -L dependency=/home/paulg/Projects/reactfs/target/debug/deps --extern fuzztest=/home/paulg/Projects/reactfs/target/debug/deps/libfuzztest-603a0f73781fdfc9.rlib --extern itertools=/home/paulg/Projects/reactfs/target/debug/deps/libitertools-ae7e11dc73978612.rlib --extern honggfuzz=/home/paulg/Projects/reactfs/target/debug/deps/libhonggfuzz-f9690f6976112529.rlib --extern byteorder=/home/paulg/Projects/reactfs/target/debug/deps/libbyteorder-2e68936298558628.rlib --extern quickcheck=/home/paulg/Projects/reactfs/target/debug/deps/libquickcheck-b13ae83d4af82929.rlib --extern num_traits=/home/paulg/Projects/reactfs/target/debug/deps/libnum_traits-339b1dcebeafbc73.rlib --extern bytes=/home/paulg/Projects/reactfs/target/debug/deps/libbytes-0f6540c8f2bd3d8e.rlib --extern failure=/home/paulg/Projects/reactfs/target/debug/deps/libfailure-56cfb5eb344cfbde.rlib --extern futures=/home/paulg/Projects/reactfs/target/debug/deps/libfutures-d1d381ee82e06c10.rlib --extern proptest=/home/paulg/Projects/reactfs/target/debug/deps/libproptest-f947597be759960a.rlib --extern futures_await=/home/paulg/Projects/reactfs/target/debug/deps/libfutures_await-4bc42efbd81842c4.rlib --extern slab=/home/paulg/Projects/reactfs/target/debug/deps/libslab-eb9ebfead6660e38.rlib --extern quickcheck_macros=/home/paulg/Projects/reactfs/target/debug/deps/libquickcheck_macros-bba0f1803993bef3.so --extern enum_primitive_derive=/home/paulg/Projects/reactfs/target/debug/deps/libenum_primitive_derive-d6dba77af7f301a9.so -C target-cpu=native -L native=/home/paulg/Projects/reactfs/target/debug/build/backtrace-sys-8fe5af3a91516e29/out/.libs` (exit code: 101)
@oli-obk oli-obk added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Mar 27, 2018
@XAMPPRocky XAMPPRocky added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jun 29, 2018
@PaulGrandperrin
Copy link
Author

I'm closing because I'm not able to reproduce on recent compiler.

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