Skip to content

bootstrap of cargo broken: assertion failed: sentinel == STR_SENTINEL, compiler/rustc_serialize/src/opaque.rs:669:9 #91663

Closed
@matthiaskrgr

Description

@matthiaskrgr

EDIT2:
should be fixed with nightly 2021-12-11

EDIT:
FOR EVERYONE THAT IS ALSO GETTING THIS:
Try cleaning your build artifacts: cargo clean, in most cases the crash should go away after a rebuild.


#91407 added an assertion that triggers on me doing a bootstrap and building cargo:

Updating only changed submodules
Submodules updated in 0.01 seconds
    Finished dev [unoptimized] target(s) in 0.14s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.20s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.20s
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Assembling stage1 compiler (x86_64-unknown-linux-gnu)
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.18s
Copying stage1 std from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.19s
Copying stage1 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building stage1 tool cargo (x86_64-unknown-linux-gnu)
   Compiling url v2.2.2
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `193`', /home/matthias/vcs/github/rust/compiler/rustc_serialize/src/opaque.rs:669:9

repo @ 11fb21f

Backtrace

Building stage1 tool cargo (x86_64-unknown-linux-gnu)
   Compiling url v2.2.2
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `0`,
 right: `193`', /home/matthias/vcs/github/rust/compiler/rustc_serialize/src/opaque.rs:669:9
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed::<u8, u8>
   4: <rustc_metadata::rmeta::decoder::DecodeContext as rustc_serialize::serialize::Decoder>::read_str
   5: <rustc_metadata::rmeta::Lazy<alloc::string::String, ()>>::decode::<&rustc_metadata::rmeta::decoder::MetadataBlob>
   6: <rustc_metadata::locator::CrateLocator>::extract_one
   7: <rustc_metadata::locator::CrateLocator>::extract_lib
   8: <rustc_metadata::locator::CrateLocator>::find_library_crate
   9: <rustc_metadata::locator::CrateLocator>::maybe_load_library_crate
  10: <rustc_metadata::creader::CrateLoader>::load
  11: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  12: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  13: <rustc_metadata::creader::CrateLoader>::resolve_crate
  14: <rustc_metadata::creader::CrateLoader>::process_extern_crate
  15: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
  16: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::visit_ast_fragment_with_placeholders
  17: <rustc_expand::expand::MacroExpander>::collect_invocations
  18: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  19: <rustc_expand::expand::MacroExpander>::expand_crate
  20: rustc_interface::passes::configure_and_expand
  21: <rustc_interface::queries::Queries>::expansion
  22: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
  23: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  24: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.59.0-dev running on x86_64-unknown-linux-gnu

note: compiler flags: -Z symbol-mangling-version=v0 -Z macro-backtrace -Z tls-model=initial-exec -Z binary-dep-depinfo -C opt-level=3 -C embed-bitcode=no -C codegen-units=4 -C debuginfo=0 -C link-args=-Wl,-rpath,$ORIGIN/../lib --crate-type rlib

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

query stack during panic:
end of query stack
error: could not compile `url`
Build completed unsuccessfully in 0:00:02

I'm using sccache in case that matters.

cc @the8472

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions