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/infer/mod.rs:573 #43350

Closed
nrxus opened this issue Jul 20, 2017 · 2 comments
Closed

ICE: /checkout/src/librustc/infer/mod.rs:573 #43350

nrxus opened this issue Jul 20, 2017 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@nrxus
Copy link

nrxus commented Jul 20, 2017

I updated my nightly toolchain tonight and got this error when attempting to compile:

Compiling sdl2 v0.30.0
error: internal compiler error: /checkout/src/librustc/infer/mod.rs:573: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<CB as audio::AudioCallback>)),depth=0),Unimplemented)]` resolving bounds after type-checking

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.20.0-nightly (582af6e1a 2017-07-19) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:437:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `sdl2`.

I did a bit of digging by overriding my toolchain manually, and found that as of yesterday's nightly (83c659e 2017-07-18) my code compiles fine:

$ rustup override set nightly-2017-07-19
info: using existing install for 'nightly-2017-07-19-x86_64-unknown-linux-gnu'
info: override toolchain for '<redacted>' set to 'nightly-2017-07-19-x86_64-unknown-linux-gnu'

  nightly-2017-07-19-x86_64-unknown-linux-gnu unchanged - rustc 1.20.0-nightly (83c659ef6 2017-07-18)

$ cargo check
   Compiling duck_husky_wedding v0.1.0 (<redacted>)
warning: unused variable: `flip`
  --> src/duck_husky_wedding/body.rs:16:57
   |
16 |     pub fn new(rect: &glm::DVec4, body: &[data::Shape], flip: bool) -> Self {
   |                                                         ^^^^
   |
   = note: #[warn(unused_variables)] on by default

warning: unused variable: `interpolation`
   --> src/duck_husky_wedding/mod.rs:107:17
    |
107 |             let interpolation = delta.subsec_nanos() as f64 / update_duration.subsec_nanos() as f64;
    |                 ^^^^^^^^^^^^^

    Finished dev [unoptimized + debuginfo] target(s) in 1.13 secs

Switching the toolchain to the day after though, produces the ICE:

$ rustup override set nightly-2017-07-20
info: using existing install for 'nightly-2017-07-20-x86_64-unknown-linux-gnu'
info: override toolchain for '<redacted>' set to 'nightly-2017-07-20-x86_64-unknown-linux-gnu'

  nightly-2017-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.20.0-nightly (582af6e1a 2017-07-19)

$ cargo check
   Compiling sdl2 v0.30.0
error: internal compiler error: /checkout/src/librustc/infer/mod.rs:573: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<CB as audio::AudioCallback>)),depth=0),Unimplemented)]` resolving bounds after type-checking

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.20.0-nightly (582af6e1a 2017-07-19) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:437:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `sdl2`.

To learn more, run the command again with --verbose.

For reference, here is a full stack trace:

$ RUST_BACKTRACE=full cargo check
   Compiling sdl2 v0.30.0
error: internal compiler error: /checkout/src/librustc/infer/mod.rs:573: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<CB as audio::AudioCallback>)),depth=0),Unimplemented)]` resolving bounds after type-checking

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.20.0-nightly (582af6e1a 2017-07-19) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:437:8
stack backtrace:
   0:     0x7f0ac943da03 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h0155dbb6ca59ce6e
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f0ac94380e4 - std::sys_common::backtrace::_print::h5f4f2ec19ff00311
                               at /checkout/src/libstd/sys_common/backtrace.rs:71
   2:     0x7f0ac944b883 - std::panicking::default_hook::{{closure}}::hafc0eefa360df4ab
                               at /checkout/src/libstd/sys_common/backtrace.rs:60
                               at /checkout/src/libstd/panicking.rs:380
   3:     0x7f0ac944b578 - std::panicking::default_hook::h83538a8b6a433831
                               at /checkout/src/libstd/panicking.rs:390
   4:     0x7f0ac944bd87 - std::panicking::rust_panic_with_hook::hae3224b5f6b814fd
                               at /checkout/src/libstd/panicking.rs:611
   5:     0x7f0ac60fceb8 - std::panicking::begin_panic_new::h6672f948a100c2a1
   6:     0x7f0ac60e72a1 - rustc_errors::Handler::span_bug::hc43628812f7bb545
   7:     0x7f0ac63254e3 - rustc::session::opt_span_bug_fmt::{{closure}}::h36f1c23dee0ab88c
   8:     0x7f0ac6325202 - rustc::session::opt_span_bug_fmt::hb3234649816b9313
   9:     0x7f0ac63250d3 - rustc::session::span_bug_fmt::h7088a0e5e41c572a
  10:     0x7f0ac63dd45f - <&'gcx rustc::ty::TyS<'gcx> as rustc::infer::TransNormalize<'gcx>>::trans_normalize::hf754271ad7f5ecb6
  11:     0x7f0ac629f07d - rustc::infer::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'tcx>>::normalize_associated_type_in_env::h302f650510c2da58
  12:     0x7f0ac637f5e1 - rustc::ty::layout::Layout::compute_uncached::h7f115120b7e746d8
  13:     0x7f0ac63a35ca - rustc::ty::util::layout_raw::h8e132d2c99ca2da6
  14:     0x7f0ac644a819 - rustc::ty::maps::<impl rustc::ty::maps::queries::layout_raw<'tcx>>::try_get::h00900307c9b08a50
  15:     0x7f0ac64575ff - rustc::ty::maps::TyCtxtAt::layout_raw::hc104cf8d0b71516c
  16:     0x7f0ac645270d - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::layout_raw::had53de086a1553d2
  17:     0x7f0ac6cc0784 - rustc_const_eval::eval::eval_const_expr_partial::{{closure}}::hdf1b1c1933b44d19
  18:     0x7f0ac6cba933 - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
  19:     0x7f0ac6cba5fb - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
  20:     0x7f0ac6cba5fb - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
  21:     0x7f0ac6cbdf72 - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
  22:     0x7f0ac6cb9ca0 - rustc_const_eval::eval::ConstContext::eval::h383a143d122477ef
  23:     0x7f0ac8b8b740 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
  24:     0x7f0ac8b8b5d5 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
  25:     0x7f0ac8b8b1ce - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
  26:     0x7f0ac8b8b3c7 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
  27:     0x7f0ac8b8b5d5 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
  28:     0x7f0ac8b8a0b9 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body::hefec5d46b6b699fa
  29:     0x7f0ac8b8bddc - rustc_passes::consts::check_crate::h923f5bb61e5540fc
  30:     0x7f0ac97ed4a5 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h60b971f27694dab9
  31:     0x7f0ac97e5bc3 - rustc_driver::driver::phase_3_run_analysis_passes::hd1ef7181394c7568
  32:     0x7f0ac97c6ecd - rustc_driver::driver::compile_input::h0c538d591196658d
  33:     0x7f0ac980c195 - rustc_driver::run_compiler::h00b9147f2ffd288b
  34:     0x7f0ac9725247 - std::sys_common::backtrace::__rust_begin_short_backtrace::hefa140dc360bd2e2
  35:     0x7f0ac947b2cc - __rust_maybe_catch_panic
                               at /checkout/src/libpanic_unwind/lib.rs:98
  36:     0x7f0ac975c9b0 - <F as alloc::boxed::FnBox<A>>::call_box::haaadeb4d67112a83
  37:     0x7f0ac944a77b - std::sys::imp::thread::Thread::new::thread_start::heb3ab1fa2e79a8b9
                               at /checkout/src/liballoc/boxed.rs:661
                               at /checkout/src/libstd/sys_common/thread.rs:21
                               at /checkout/src/libstd/sys/unix/thread.rs:84
  38:     0x7f0ac45cf6b9 - start_thread
  39:     0x7f0ac90f13dc - clone
  40:                0x0 - <unknown>

error: Could not compile `sdl2`.

To learn more, run the command again with --verbose.

I saw this other bug (#42950) that might be related but it seems to be much older, while this one just appeared on the latest nightly.

Hope I provided enough info!

@SpaceManiac
Copy link

Same as #43394

@Mark-Simulacrum Mark-Simulacrum added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Jul 26, 2017
@nrxus
Copy link
Author

nrxus commented Aug 4, 2017

Looks like it was fixed in #43505.

@nrxus nrxus closed this as completed Aug 4, 2017
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) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants