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

Internal Compiler Error when compiling the ring crate after updating to the 11-27 nightly #79487

Closed
HTGAzureX1212 opened this issue Nov 28, 2020 · 11 comments · Fixed by #79511
Closed
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@HTGAzureX1212
Copy link
Contributor

Code

// I am not sure whether this is related to my code or not, but it seems to be related to the `ring` crate

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (6a889570e 2020-11-27)
binary: rustc
commit-hash: 6a889570e46c03d7b156ec08f3f4cb4d145924a3
commit-date: 2020-11-27
host: x86_64-pc-windows-msvc
release: 1.50.0-nightly

Error output

thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `DefId(0:1268 ~ ring[904c]::digest::sha2::)`,
 right: `DefId(0:1269 ~ ring[904c]::digest::sha2::::GFp_sha256_block_data_order)`', compiler\rustc_middle\src\hir\map\collector.rs:227:13
Backtrace

stack backtrace:
   0:     0x7ff83f67b05e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h106ca6f8fb6a294d
   1:     0x7ff83f6a69db - core::fmt::write::h6390b994d95aebdb
   2:     0x7ff83f66c798 - <std::io::IoSlice as core::fmt::Debug>::fmt::hd713332ae62141f3
   3:     0x7ff83f67f48d - std::panicking::take_hook::h78f8a454f3a4df82
   4:     0x7ff83f67ee84 - std::panicking::take_hook::h78f8a454f3a4df82
   5:     0x7ff802c85817 - rustc_driver::report_ice::h27930066f0b6c963
   6:     0x7ff83f67ffa0 - std::panicking::rust_panic_with_hook::h931fd6f26be82856
   7:     0x7ff83f67fa71 - rust_begin_unwind
   8:     0x7ff83f67b9bf - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h106ca6f8fb6a294d
   9:     0x7ff83f67f9c9 - rust_begin_unwind
  10:     0x7ff83f6a2a30 - core::panicking::panic_fmt::h45da916c710b88f7
  11:     0x7ff807125409 - rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::can_reconstruct_query_key::h454ec4401096b476
  12:     0x7ff806e64e25 - ZN12rustc_middle2ty10adjustment114_DERIVE_rustc_data_structures_stable_hasher_HashStable_rustc_middle_ich_StableHashingContext_ctx_FOR_AllowTwoPhase174_$LT$impl$u20$rustc_data_structures..stable_hasher..HashStable$LT$rustc_middle..ich..hcx..StableHashingC
  13:     0x7ff8071259a7 - <rustc_middle::hir::map::collector::NodeCollector as rustc_hir::intravisit::Visitor>::visit_item::he31beb884892d2b5
  14:     0x7ff806e64d7b - ZN12rustc_middle2ty10adjustment114_DERIVE_rustc_data_structures_stable_hasher_HashStable_rustc_middle_ich_StableHashingContext_ctx_FOR_AllowTwoPhase174_$LT$impl$u20$rustc_data_structures..stable_hasher..HashStable$LT$rustc_middle..ich..hcx..StableHashingC
  15:     0x7ff8071259a7 - <rustc_middle::hir::map::collector::NodeCollector as rustc_hir::intravisit::Visitor>::visit_item::he31beb884892d2b5
  16:     0x7ff806e64d7b - ZN12rustc_middle2ty10adjustment114_DERIVE_rustc_data_structures_stable_hasher_HashStable_rustc_middle_ich_StableHashingContext_ctx_FOR_AllowTwoPhase174_$LT$impl$u20$rustc_data_structures..stable_hasher..HashStable$LT$rustc_middle..ich..hcx..StableHashingC
  17:     0x7ff8071259a7 - <rustc_middle::hir::map::collector::NodeCollector as rustc_hir::intravisit::Visitor>::visit_item::he31beb884892d2b5
  18:     0x7ff806f747e8 - rustc_middle::hir::map::Map::node_to_string::h354b899733670106
  19:     0x7ff80734b1b6 - <rustc_middle::ty::instance::InstanceDef as core::fmt::Debug>::fmt::h806f777c4a1eb6e2
  20:     0x7ff80701edd0 - rustc_middle::ty::context::TyCtxt::_intern_place_elems::hf379b6ef10105517
  21:     0x7ff8071d45a0 - <rustc_middle::ty::instance::InstanceDef as core::fmt::Debug>::fmt::h806f777c4a1eb6e2
  22:     0x7ff807030497 - rustc_middle::ty::context::TyCtxt::_intern_place_elems::hf379b6ef10105517
  23:     0x7ff80734b1b6 - <rustc_middle::ty::instance::InstanceDef as core::fmt::Debug>::fmt::h806f777c4a1eb6e2
  24:     0x7ff807022a00 - rustc_middle::ty::context::TyCtxt::_intern_place_elems::hf379b6ef10105517
  25:     0x7ff80720b7ba - <rustc_middle::ty::instance::InstanceDef as core::fmt::Debug>::fmt::h806f777c4a1eb6e2
  26:     0x7ff806f716e1 - rustc_middle::hir::map::Map::expect_item::h130d74b7476148c4
  27:     0x7ff80588046e - <rustc_ast_lowering::item::ItemLowerer as rustc_ast::visit::Visitor>::visit_foreign_item::h33e789780841946a
  28:     0x7ff805898eff - rustc_passes::hir_id_validator::check_crate::hc7fe342e481759ec
  29:     0x7ff802ec8ce1 - rustc_interface::passes::QueryContext::print_stats::h111e3ccef43c470d
  30:     0x7ff802c42c4b - <rustc_passes::hir_id_validator::HirIdValidator as rustc_hir::intravisit::Visitor>::visit_impl_item_ref::h62d872efb7c4ac68
  31:     0x7ff802cd1e4f - <rustc_driver::args::Error as core::fmt::Debug>::fmt::hf55ca14dd762783a
  32:     0x7ff802cdffa6 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h0da38a96661182e5
  33:     0x7ff802c69fe6 - <rustc_span::symbol::SymbolStr as core::fmt::Display>::fmt::h1e11975ae1f0450a
  34:     0x7ff802c4517c - <rustc_passes::hir_id_validator::HirIdValidator as rustc_hir::intravisit::Visitor>::visit_impl_item_ref::h62d872efb7c4ac68
  35:     0x7ff802cdcc70 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h0da38a96661182e5
  36:     0x7ff802cab44c - <rustc_driver::Compilation as core::fmt::Debug>::fmt::h58e11818aaa38e5f
  37:     0x7ff802cd8835 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::hf55ca14dd762783a
  38:     0x7ff802ce0a17 - rustc_ast::util::parser::prec_let_scrutinee_needs_par::h0da38a96661182e5
  39:     0x7ff802c4d68d - <rustc_mir::shim::DropShimElaborator as core::fmt::Debug>::fmt::ha62d93e959102f79
  40:     0x7ff83f68ec77 - std::sys::windows::thread::Thread::new::h05d768f6146b61f1
  41:     0x7ff8967b7034 - BaseThreadInitThunk
  42:     0x7ff8978dcec1 - RtlUserThreadStart

@HTGAzureX1212 HTGAzureX1212 added 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. labels Nov 28, 2020
@HTGAzureX1212 HTGAzureX1212 changed the title Internal Compiler Error when compiling the ring crate after updating to the latest nightly Internal Compiler Error when compiling the ring crate after updating to the 11-27 nightly Nov 28, 2020
@theashguy
Copy link

I'm seeing this one as well. Host is a standard ubuntu-latest Github Actions container. Not sure if the below information is helpful but its additional to the above posted by HYG-YT.

note: rustc 1.50.0-nightly (6a889570e 2020-11-27) running on x86_64-unknown-linux-gnu
note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib
note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [index_hir] index HIR
#1 [hir_owner] HIR owner of `{misc#0}`
end of query stack
error: could not compile `ring`

@HTGAzureX1212
Copy link
Contributor Author

I have to temporarily degrade the version of my nightly installation to 11-24 to make sure everything is functional (it's a discord bot made with twilight-rs)

@theashguy
Copy link

Similarly, I'm attempting to knock my version back a couple of days as well-- yet to succeed but that's mostly me wrestling with my actions configuration.

@ZettaScript
Copy link

I have the same on my Raspberry Pi 3 (Debian 10, Linux 4.19.66):

note: rustc 1.50.0-nightly (6a889570e 2020-11-27) running on armv7-unknown-linux-gnueabihf
note: compiler flags: -C opt-level=3 -C embed-bitcode=no --crate-type lib

@jonas-schievink jonas-schievink added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Nov 28, 2020
@LeSeulArtichaut
Copy link
Contributor

I can reproduce with cargo check on ring.

searched toolchains 72da5a9 through 6a88957
regression in c922857

Regressed in #79318, cc @cjgillot @lcnr

@LeSeulArtichaut LeSeulArtichaut removed the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Nov 28, 2020
@SNCPlay42
Copy link
Contributor

MCVE:

mod sha2 {
    extern "C" {
        pub(super) fn GFp_sha512_block_data_order();
    }
}

@LeSeulArtichaut LeSeulArtichaut added P-critical Critical priority and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Nov 28, 2020
@LeSeulArtichaut
Copy link
Contributor

Assigning P-critical as discussed as part of the Prioritization WG procedure.

bors added a commit to rust-lang-ci/rust that referenced this issue Nov 28, 2020
Do not visit ForeignItemRef for HIR indexing and validation.

Similarly to what is done for ImplItemRef and TraitItemRef.

Fixes rust-lang#79487

r? `@lcnr`
@bors bors closed this as completed in 5bd1979 Nov 29, 2020
@HTGAzureX1212
Copy link
Contributor Author

I updated to the latest nightly (2020-11-29) and it still fails.

@tesuji
Copy link
Contributor

tesuji commented Nov 29, 2020

Wait for next nightly. The current one doesn't contain the fix PR.

@HTGAzureX1212
Copy link
Contributor Author

Got it! 👍

@lcnr
Copy link
Contributor

lcnr commented Nov 29, 2020

you can also try the latest master using https://github.com/kennytm/rustup-toolchain-install-master

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) ❄️ P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants