Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

ICE on compiling crate rayon #1558

Closed
norru opened this issue Sep 26, 2019 · 6 comments
Closed

ICE on compiling crate rayon #1558

norru opened this issue Sep 26, 2019 · 6 comments

Comments

@norru
Copy link

norru commented Sep 26, 2019

nightly on Ubuntu 18.04, see details below:

$ RUST_BACKTRACE=1 rls --cli
Initializing (look for `progress[done:true]` message)...
> 1: InitializeResult {
    capabilities: ServerCapabilities {
        text_document_sync: Some(
            Kind(
                Incremental,
            ),
        ),
        selection_range_provider: None,
        hover_provider: Some(
            true,
        ),
        completion_provider: Some(
            CompletionOptions {
                resolve_provider: Some(
                    true,
                ),
                trigger_characters: Some(
                    [
                        ".",
                        ":",
                    ],
                ),
            },
        ),
        signature_help_provider: None,
        definition_provider: Some(
            true,
        ),
        type_definition_provider: None,
        implementation_provider: Some(
            Simple(
                true,
            ),
        ),
        references_provider: Some(
            true,
        ),
        document_highlight_provider: Some(
            true,
        ),
        document_symbol_provider: Some(
            true,
        ),
        workspace_symbol_provider: Some(
            true,
        ),
        code_action_provider: Some(
            Simple(
                true,
            ),
        ),
        code_lens_provider: Some(
            CodeLensOptions {
                resolve_provider: Some(
                    false,
                ),
            },
        ),
        document_formatting_provider: Some(
            true,
        ),
        document_range_formatting_provider: Some(
            false,
        ),
        document_on_type_formatting_provider: None,
        rename_provider: Some(
            Simple(
                true,
            ),
        ),
        color_provider: None,
        folding_range_provider: None,
        execute_command_provider: Some(
            ExecuteCommandOptions {
                commands: [
                    "rls.applySuggestion-8150",
                    "rls.deglobImports-8150",
                ],
            },
        ),
        workspace: None,
    },
}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":null,"percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"cargo_metadata","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"gfx_core","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"tiff","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"rayon","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"build_script_build","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"build_script_build","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"build_script_build","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"gdk_pixbuf","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"build_script_build","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"log4rs","percentage":null,"title":"Building"}}
{"artifact":"/home/norru/Projects/ivt/parallax_testbed/target/rls/debug/deps/cargo_metadata-508e21f21c8a316a.d","emit":"dep-info"}
{"artifact":"/home/norru/Projects/ivt/parallax_testbed/target/rls/debug/deps/save-analysis/libcargo_metadata-508e21f21c8a316a.json","emit":"save-analysis"}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"gdk","percentage":null,"title":"Building"}}
{"artifact":"/home/norru/Projects/ivt/parallax_testbed/target/rls/debug/deps/libcargo_metadata-508e21f21c8a316a.rmeta","emit":"metadata"}
{"artifact":"/home/norru/Projects/ivt/parallax_testbed/target/rls/debug/deps/libcargo_metadata-508e21f21c8a316a.rlib","emit":"link"}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"skeptic","percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_1","message":"build_script_build","percentage":null,"title":"Building"}}
{"message":"src/librustc/ty/context.rs:211: node type <B>::Item (hir_id=HirId { owner: DefIndex(249), local_id: 15 }) with HirId::owner DefId(0:249 ~ rayon[8635]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:241 ~ rayon[8635]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0])","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":"error: internal compiler error: src/librustc/ty/context.rs:211: node type <B>::Item (hir_id=HirId { owner: DefIndex(249), local_id: 15 }) with HirId::owner DefId(0:249 ~ rayon[8635]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:241 ~ rayon[8635]::iter[0]::chain[0]::{{impl}}[2]::with_producer[0])\n\n"}
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
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::begin_panic
  13: rustc_errors::Handler::bug
  14: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  15: rustc::ty::context::tls::with_opt::{{closure}}
  16: rustc::ty::context::tls::with_context_opt
  17: rustc::ty::context::tls::with_opt
  18: rustc::util::bug::opt_span_bug_fmt
  19: rustc::util::bug::bug_fmt
  20: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
  21: rustc::ty::context::tls::with::{{closure}}
  22: rustc::ty::context::tls::with_context::{{closure}}
  23: rustc::ty::context::tls::with_context_opt
  24: rustc::ty::context::tls::with_context
  25: rustc::ty::context::tls::with
  26: rustc::ty::context::TypeckTables::qpath_res
  27: rustc_save_analysis::SaveContext::get_path_res
  28: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  29: rustc_save_analysis::dump_visitor::DumpVisitor::process_path
  30: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  31: rustc_save_analysis::dump_visitor::DumpVisitor::process_method::{{closure}}
  32: rustc_save_analysis::dump_visitor::DumpVisitor::process_method
  33: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  34: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  35: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  36: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  37: rustc::dep_graph::graph::DepGraph::with_ignore
  38: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
  39: rustc::util::common::time
  40: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  41: rustc_interface::passes::create_global_ctxt::{{closure}}
  42: rustc_interface::interface::run_compiler_in_existing_thread_pool
  43: std::thread::local::LocalKey<T>::with
  44: scoped_tls::ScopedKey<T>::set
  45: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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-nightly (1dd188489 2019-09-22) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
end of query stack
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}

> 
> {"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_1","message":null,"percentage":null,"title":"Building"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":null,"id":"progress_0","message":null,"percentage":null,"title":"Indexing"}}
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"message":"build failed\nerror: could not compile `rayon`.\n","range":{"end":{"character":0,"line":9999},"start":{"character":0,"line":0}},"severity":1}],"uri":"file:///home/norru/Projects/ivt/parallax_testbed/Cargo.toml"}}
{"jsonrpc":"2.0","method":"window/progress","params":{"done":true,"id":"progress_0","message":null,"percentage":null,"title":"Indexing"}}

@norru
Copy link
Author

norru commented Sep 26, 2019

Fuil backtrace:

stack backtrace:
   0:     0x7f61779f4b04 - backtrace::backtrace::libunwind::trace::he7981839ac0b42c5
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1:     0x7f61779f4b04 - backtrace::backtrace::trace_unsynchronized::hf090d51285f079af
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2:     0x7f61779f4b04 - std::sys_common::backtrace::_print_fmt::h907f2c8e326f667e
                               at src/libstd/sys_common/backtrace.rs:76
   3:     0x7f61779f4b04 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h478ea9fc7b88f220
                               at src/libstd/sys_common/backtrace.rs:60
   4:     0x7f6177a2d14c - core::fmt::write::h769bb2acff4a7f8a
                               at src/libcore/fmt/mod.rs:1030
   5:     0x7f61779e8d27 - std::io::Write::write_fmt::h67b12098257eb724
                               at src/libstd/io/mod.rs:1412
   6:     0x7f61779f9335 - std::sys_common::backtrace::_print::h2f0eb1c0390cc4d6
                               at src/libstd/sys_common/backtrace.rs:64
   7:     0x7f61779f9335 - std::sys_common::backtrace::print::h61bfa8962e628438
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x7f61779f9335 - std::panicking::default_hook::{{closure}}::h8dae4b8d7da1f32c
                               at src/libstd/panicking.rs:196
   9:     0x7f61779f9026 - std::panicking::default_hook::hd1d17741425c33c6
                               at src/libstd/panicking.rs:210
  10:     0x7f6177f2ee63 - rustc_driver::report_ice::hf23c612d15310580
  11:     0x7f61779f9b1c - std::panicking::rust_panic_with_hook::h16b7f2bc68b55377
                               at src/libstd/panicking.rs:477
  12:     0x7f6179ce0a5d - std::panicking::begin_panic::hfc820463b2423184
  13:     0x7f6179cf9259 - rustc_errors::Handler::bug::ha6f443febb07eedc
  14:     0x7f61795aba53 - rustc::util::bug::opt_span_bug_fmt::{{closure}}::hb1aa9bdd25a61970
  15:     0x7f61795a6ac3 - rustc::ty::context::tls::with_opt::{{closure}}::h373fe8ef82b066a2
  16:     0x7f61795a6a33 - rustc::ty::context::tls::with_context_opt::h720dd117bafe72f1
  17:     0x7f61795a6a77 - rustc::ty::context::tls::with_opt::h21e70ae09dbdfc4d
  18:     0x7f61795ab968 - rustc::util::bug::opt_span_bug_fmt::h32f042edb4f4d68c
  19:     0x7f61795ab8d2 - rustc::util::bug::bug_fmt::hb22caff23e194117
  20:     0x7f617979f736 - rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}::h6087d43080b15d8d
  21:     0x7f61797b43c9 - rustc::ty::context::tls::with::{{closure}}::hc991922edcffb30b
  22:     0x7f61797b2fd0 - rustc::ty::context::tls::with_context::{{closure}}::h747b8e60ff939494
  23:     0x7f61797b2f98 - rustc::ty::context::tls::with_context_opt::h6ac24502d1f55611
  24:     0x7f61797b2fa6 - rustc::ty::context::tls::with_context::h974d97c265817e96
  25:     0x7f61797b43b6 - rustc::ty::context::tls::with::h82d1ba6f6f885e42
  26:     0x7f61797a0113 - rustc::ty::context::TypeckTables::qpath_res::hec7b8ede2b15f3f5
  27:     0x7f6178e574d7 - rustc_save_analysis::SaveContext::get_path_res::h087411656757b95d
  28:     0x7f6178ea7ab6 - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty::h1eca1533781e9c8c
  29:     0x7f6178e9dfef - rustc_save_analysis::dump_visitor::DumpVisitor::process_path::h94626fbac95d6518
  30:     0x7f6178ea57b6 - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item::h1c8429e1fd3327e5
  31:     0x7f6178e9c62f - rustc_save_analysis::dump_visitor::DumpVisitor::process_method::{{closure}}::h48d9d50cf285a9bf
  32:     0x7f6178e9c1cc - rustc_save_analysis::dump_visitor::DumpVisitor::process_method::h04a3333e56f92fe8
  33:     0x7f6178ea5ac1 - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item::h1c8429e1fd3327e5
  34:     0x7f6178ea44fb - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item::h1c8429e1fd3327e5
  35:     0x7f6178ea44fb - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item::h1c8429e1fd3327e5
  36:     0x7f6178ea0e9a - <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod::h324493e37d983378
  37:     0x7f6177edce96 - rustc::dep_graph::graph::DepGraph::with_ignore::h17ac7169ff1aff65
  38:     0x7f6177ecd810 - rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}::hc5ed8541856bd598
  39:     0x7f6177ec68ae - rustc::util::common::time::h8c22723fbde18d9a
  40:     0x7f6177ef91d1 - rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}::h39f597f294270fd0
  41:     0x7f61780591ba - rustc_interface::passes::create_global_ctxt::{{closure}}::h12476fb4a268e092
  42:     0x7f6177efafef - rustc_interface::interface::run_compiler_in_existing_thread_pool::h5089cca56956b46e
  43:     0x7f6177f30ce2 - std::thread::local::LocalKey<T>::with::h2119e85fe8c20d30
  44:     0x7f6177f361ae - scoped_tls::ScopedKey<T>::set::he202e9e7c0c715bb
  45:     0x7f6177f56512 - syntax::with_globals::ha7f00b7f8bfea8da
  46:     0x7f6177ece240 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0c1de501262de57b
  47:     0x7f6177a0a26a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:80
  48:     0x7f6177eed9a9 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h49ad4fea1fe0520e
  49:     0x7f61779db20f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h6b46042aa190f65b
                               at /rustc/1dd1884891636d0eb51157d137230076bcf20627/src/liballoc/boxed.rs:922
  50:     0x7f6177a08f10 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::ha7d6ea47b8bafc0e
                               at /rustc/1dd1884891636d0eb51157d137230076bcf20627/src/liballoc/boxed.rs:922
  51:     0x7f6177a08f10 - std::sys_common::thread::start_thread::h84f88cd24e69f375
                               at src/libstd/sys_common/thread.rs:13
  52:     0x7f6177a08f10 - std::sys::unix::thread::Thread::new::thread_start::h564faa00f251d4bc
                               at src/libstd/sys/unix/thread.rs:79
  53:     0x7f61773696db - start_thread
  54:     0x7f6176e7a88f - __clone
  55:                0x0 - <unknown>

@norru
Copy link
Author

norru commented Sep 26, 2019

I've sampled a few releases:

Toolchains confirmed affected:
nightly-2019-09-25
nightly-2019-09-20

Toolchains not affected:
nightly-2019-09-03
stable (1.37.0)

@jeromegn
Copy link

jeromegn commented Oct 4, 2019

Getting the same on rustc 1.39.0-beta.5

@benesch
Copy link

benesch commented Oct 7, 2019

Looks like a rustc bug: rust-lang/rust#64659

@norru
Copy link
Author

norru commented Oct 14, 2019

Will close once rust-lang/rust#65353 pushes through.

@norru
Copy link
Author

norru commented Oct 23, 2019

Confirmed fixed in nightly-2019-10-20. Thanks!

@norru norru closed this as completed Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants