Skip to content

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

Closed

Description

@HTGAzureX1212

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

Activity

  1. added
    C-bugCategory: This is a bug.
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Nov 28, 2020
  2. 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[/+] on Nov 28, 2020
  3. theashguy commented on Nov 28, 2020

    @theashguy

    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`
    
  4. HTGAzureX1212 commented on Nov 28, 2020

    @HTGAzureX1212
    ContributorAuthor

    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)

  5. theashguy commented on Nov 28, 2020

    @theashguy

    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.

  6. ZettaScript commented on Nov 28, 2020

    @ZettaScript

    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
    
  7. added
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Nov 28, 2020
  8. LeSeulArtichaut commented on Nov 28, 2020

    @LeSeulArtichaut
    Contributor

    I can reproduce with cargo check on ring.

    searched toolchains 72da5a9 through 6a88957
    regression in c922857

    Regressed in #79318, cc @cjgillot @lcnr

  9. removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    on Nov 28, 2020
  10. SNCPlay42 commented on Nov 28, 2020

    @SNCPlay42
    Contributor

    MCVE:

    mod sha2 {
        extern "C" {
            pub(super) fn GFp_sha512_block_data_order();
        }
    }
  11. added and removed
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Nov 28, 2020
  12. LeSeulArtichaut commented on Nov 28, 2020

    @LeSeulArtichaut
    Contributor
  13. added a commit that references this issue on Nov 28, 2020
    5bd1979
  14. added a commit that references this issue on Nov 28, 2020
    914d07a
  15. HTGAzureX1212 commented on Nov 29, 2020

    @HTGAzureX1212
    ContributorAuthor

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

  16. tesuji commented on Nov 29, 2020

    @tesuji
    Contributor

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

  17. HTGAzureX1212 commented on Nov 29, 2020

    @HTGAzureX1212
    ContributorAuthor

    Got it! 👍

  18. lcnr commented on Nov 29, 2020

    @lcnr
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions