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 while compiling async/await code #67087

Open
NeoLegends opened this issue Dec 6, 2019 · 6 comments
Open

ICE while compiling async/await code #67087

NeoLegends opened this issue Dec 6, 2019 · 6 comments

Comments

@NeoLegends
Copy link

@NeoLegends NeoLegends commented Dec 6, 2019

Got an ICE while compiling some async/await code. Here's the backtrace:


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.39.0 (4560ea788 2019-11-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 --crate-type bin

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

query stack during panic:
#0 [typeck_tables_of] processing `tokio::net::tcp::stream::TcpStream::connect`
#1 [typeck_tables_of] processing `tokio::net::tcp::stream::TcpStream::connect::{{closure}}#0`
#2 [typeck_tables_of] processing `sender::send_to`
#3 [typeck_tables_of] processing `sender::send_to::{{closure}}#0`
#4 [type_of] processing `sender::send_to::{{closure}}#0`
#5 [collect_mod_item_types] collecting item types in module `sender`
#6 [analysis] running analysis passes on this crate
end of query stack
error: failed to compile `aqm-test v0.1.0 (/home/inp/gunz/aqm-test)`, intermediate artifacts can be found at `/home/inp/gunz/aqm-test/target`

Caused by:
  could not compile `aqm-test`.

To learn more, run the command again with --verbose.
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
stack backtrace:
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:76
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:60
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1030
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:64
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:196
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:210
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  12: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:380
  13: rust_begin_unwind
             at src/libstd/panicking.rs:307
  14: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  15: core::panicking::panic
             at src/libcore/panicking.rs:49
  16: rustc_typeck::check::typeck_tables_of
  17: rustc::ty::query::__query_compute::typeck_tables_of
  18: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  19: rustc::dep_graph::graph::DepGraph::with_task_impl
  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  21: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  22: rustc::dep_graph::graph::DepGraph::with_task_impl
  23: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  24: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::note_obligation_cause
  25: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_selection_error
  26: rustc::traits::error_reporting::<impl rustc::infer::InferCtxt>::report_fulfillment_errors
  27: rustc_typeck::check::FnCtxt::check_argument_types
  28: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  29: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  30: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  31: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  32: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  33: rustc_typeck::check::check_fn
  34: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  35: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  36: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  37: rustc_typeck::check::FnCtxt::check_argument_types
  38: rustc_typeck::check::FnCtxt::check_method_argument_types
  39: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  40: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  41: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  42: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  43: rustc_typeck::check::FnCtxt::check_decl_initializer
  44: rustc_typeck::check::FnCtxt::check_decl_local
  45: rustc_typeck::check::FnCtxt::check_stmt
  46: rustc_typeck::check::FnCtxt::check_block_with_expected
  47: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  48: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  49: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  50: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  51: rustc_typeck::check::FnCtxt::check_block_with_expected
  52: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  53: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  54: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  55: rustc_typeck::check::check_fn
  56: rustc_typeck::check::closure::<impl rustc_typeck::check::FnCtxt>::check_expr_closure
  57: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  58: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  59: rustc_typeck::check::FnCtxt::check_argument_types
  60: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::confirm_builtin_call
  61: rustc_typeck::check::callee::<impl rustc_typeck::check::FnCtxt>::check_call
  62: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_kind
  63: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_expr_with_expectation_and_needs
  64: rustc_typeck::check::expr::<impl rustc_typeck::check::FnCtxt>::check_return_expr
  65: rustc_typeck::check::check_fn
  66: rustc::ty::context::GlobalCtxt::enter_local
  67: rustc_typeck::check::typeck_tables_of
  68: rustc::ty::query::__query_compute::typeck_tables_of
  69: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  70: rustc::dep_graph::graph::DepGraph::with_task_impl
  71: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  72: rustc::ty::query::__query_compute::typeck_tables_of
  73: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::typeck_tables_of>::compute
  74: rustc::dep_graph::graph::DepGraph::with_task_impl
  75: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  76: rustc_typeck::collect::checked_type_of
  77: rustc_typeck::collect::type_of
  78: rustc::ty::query::__query_compute::type_of
  79: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::type_of>::compute
  80: rustc::dep_graph::graph::DepGraph::with_task_impl
  81: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  82: rustc::hir::intravisit::walk_expr
  83: rustc::hir::intravisit::Visitor::visit_fn
  84: rustc::hir::intravisit::walk_item
  85: <rustc_typeck::collect::CollectItemTypesVisitor as rustc::hir::intravisit::Visitor>::visit_item
  86: rustc::hir::map::Map::visit_item_likes_in_module
  87: rustc_typeck::collect::collect_mod_item_types
  88: rustc::ty::query::__query_compute::collect_mod_item_types
  89: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::collect_mod_item_types>::compute
  90: rustc::dep_graph::graph::DepGraph::with_task_impl
  91: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  92: rustc_typeck::check_crate::{{closure}}::{{closure}}
  93: rustc::util::common::time
  94: rustc_typeck::check_crate
  95: rustc_interface::passes::analysis
  96: rustc::ty::query::__query_compute::analysis
  97: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  98: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  99: rustc_interface::passes::create_global_ctxt::{{closure}}
 100: rustc_interface::interface::run_compiler_in_existing_thread_pool
 101: std::thread::local::LocalKey<T>::with
 102: scoped_tls::ScopedKey<T>::set
 103: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

rustc --version --verbose:

binary: rustc
commit-hash: 4560ea788cb760f0a34127156c78e2552949f734
commit-date: 2019-11-04
host: x86_64-unknown-linux-gnu
release: 1.39.0
LLVM version: 9.0```
@jonas-schievink

This comment has been minimized.

Copy link
Member

@jonas-schievink jonas-schievink commented Dec 6, 2019

Please retry this with the current Rust nightly. If it still happens there, can you provide the code needed to reproduce this?

@Centril Centril changed the title Compiler error while compiling async/await code ICE while compiling async/await code Dec 6, 2019
@JohnTitor JohnTitor added the C-bug label Dec 8, 2019
@NeoLegends

This comment has been minimized.

Copy link
Author

@NeoLegends NeoLegends commented Dec 8, 2019

Will do ASAP. :)

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

@nikomatsakis nikomatsakis commented Dec 10, 2019

Visit for async-await triage: Without an example, pretty hard to tell what's the problem here unfortunately. Going to leave as "untriaged" for another week.

@NeoLegends

This comment has been minimized.

Copy link
Author

@NeoLegends NeoLegends commented Dec 10, 2019

I‘m sorry this takes so long. I know the issue in and of itself isn‘t very helpful. Quite busy atm. :)

@pnkfelix

This comment has been minimized.

Copy link
Member

@pnkfelix pnkfelix commented Dec 12, 2019

triage: removing nomination and not going to prioritize. Feel free to renominate for triage after you have provided code to reproduce the issue (preferably a Minimal Complete Verifiable Example, MCVE).

@tmandry

This comment has been minimized.

Copy link
Contributor

@tmandry tmandry commented Dec 17, 2019

Marking as triaged. We'll revisit this again if we can get a reproducer (feel free to remove the Triaged label at that point).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.