Skip to content

1.40.0 ICE while reporting ICE #68813

Closed
@TheBlueMatt

Description

@TheBlueMatt

rustc+cargo 1.40.0 Debian testing packages report the following ICE (which does not go away after a cargo clean):

It can be reproduced by trying to build https://github.com/TheBlueMatt/rust-lightning-bitcoinrpc/tree/2020-02-ice-demo against https://github.com/TheBlueMatt/rust-lightning/tree/2020-02-rustc-ice.

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
note: run with `RUST_BACKTRACE=1` environment variable to display a 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.40.0 running on x86_64-unknown-linux-gnu

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

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

error: could not compile `rust-lightning-bitcoinrpc`.

To learn more, run the command again with --verbose.
matt@cdev1:~/Documents/Projects/Bitcoin/rust-lightning-bitcoinrpc$ RUST_BACKTRACE=1 cargo build && RUST_BACKTRACE=1 ./target/debug/rust-lightning-bitcoinrpc __cookie__:f70ead21e4528ac6e74c8e182297a2b5f3041522ee55481175d4413ae552ab56@69.59.18.207:18332 `pwd`/toktest/
   Compiling rust-lightning-bitcoinrpc v0.0.1 (/home/matt/Documents/Projects/Bitcoin/rust-lightning-bitcoinrpc)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: rustc_driver::report_ice
   6: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
             at /usr/src/rustc-1.40.0/src/liballoc/boxed.rs:956
   7: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}
             at /usr/src/rustc-1.40.0/src/libproc_macro/bridge/client.rs:305
   8: std::panicking::rust_panic_with_hook
   9: <unknown>
  10: rust_begin_unwind
  11: core::panicking::panic_fmt
  12: core::panicking::panic
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_selection_error
  23: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_fulfillment_errors
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: rustc_typeck::collect::checked_type_of
  36: <unknown>
  37: <unknown>
  38: <unknown>
  39: <unknown>
  40: <unknown>
  41: <unknown>
  42: <unknown>
  43: <unknown>
  44: <unknown>
  45: <rustc_typeck::collect::CollectItemTypesVisitor as rustc::hir::intravisit::Visitor>::visit_item
  46: <unknown>
  47: <unknown>
  48: <unknown>
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: <unknown>
  53: <unknown>
  54: <unknown>
  55: rustc_typeck::check_crate
  56: <unknown>
  57: <unknown>
  58: <unknown>
  59: <unknown>
  60: <unknown>
  61: <unknown>
  62: <unknown>
  63: <unknown>
  64: <unknown>
  65: <unknown>
  66: <unknown>
  67: <unknown>
  68: __rust_maybe_catch_panic
  69: <unknown>
  70: <unknown>
  71: <unknown>
  72: <unknown>
  73: start_thread
  74: __clone
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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.40.0 running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [typeck_tables_of] processing `lightning_net_tokio::Connection::setup_outbound`
#1 [typeck_tables_of] processing `lightning_net_tokio::Connection::setup_outbound::{{closure}}#0`
#2 [typeck_tables_of] processing `main`
#3 [typeck_tables_of] processing `main::{{closure}}#0`
#4 [type_of] processing `main::{{closure}}#0`
#5 [collect_mod_item_types] collecting item types in top-level module
#6 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `rust-lightning-bitcoinrpc`.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ICEBreaker-Cleanup-CrewHelping to "clean up" bugs with minimal examples and bisectionsP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions