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

miri test of crate: thread 'rustc' panicked at 'assertion failed: sentinel == STR_SENTINEL' #91768

Closed
turboladen opened this issue Dec 11, 2021 · 2 comments
Labels
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.

Comments

@turboladen
Copy link

turboladen commented Dec 11, 2021

I'm not exactly sure what code is causing this; I run my ci against stable rust (1.57.0 right now) and then run miri test against whatever the current nightly is. Up until today (?) both were fine; now stable is fine but the miri test fails. Here's the GH workflow: https://github.com/turboladen/overkill-nvim/runs/4490451726?check_suite_focus=true. There are 3 crates in that repo, one of which is an ffi wrapper of sorts over neovim's exported symbols (neovim_sys)--this is the crate that looks to be failing with miri.

After poking around some other issues that seem similar, it could be that my miri builds started failing after adding a new proc-macro crate dependency...

Let me know if there's anything else I can provide to help!

Code

<code>

Meta

rustc --version --verbose:

rustc 1.59.0-nightly (0b42deacc 2021-12-09) running on x86_64-unknown-linux-gnu

Error output

Run actions-rs/cargo@v1
  with:
    toolchain: nightly
    command: miri
    args: test --all-features --workspace
    use-cross: false
  env:
    CACHE_ON_FAILURE: false
    CARGO_INCREMENTAL: 0
/home/runner/.cargo/bin/cargo +nightly miri test --all-features --workspace
 Downloading crates ...
  Downloaded unicode-width v0.1.8
  Downloaded adler v0.2.3
  Downloaded cfg-if v0.1.10
  Downloaded addr2line v0.16.0
  Downloaded rustc-demangle v0.1.21
  Downloaded miniz_oxide v0.4.0
  Downloaded memchr v2.4.1
  Downloaded hashbrown v0.11.0
  Downloaded object v0.26.2
  Downloaded getopts v0.2.21
  Downloaded libc v0.2.108
  Downloaded gimli v0.25.0
  Downloaded compiler_builtins v0.1.55
  Downloaded cc v1.0.69
   Compiling compiler_builtins v0.1.55
    Checking core v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.108
   Compiling cc v1.0.69
   Compiling memchr v2.4.1
   Compiling std v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
   Compiling unwind v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind)
    Checking rustc-std-workspace-core v1.99.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
    Checking alloc v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
    Checking cfg-if v0.1.10
    Checking adler v0.2.3
    Checking rustc-demangle v0.1.21
    Checking rustc-std-workspace-alloc v1.99.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
    Checking panic_unwind v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_unwind)
    Checking panic_abort v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)
    Checking gimli v0.25.0
    Checking std_detect v0.1.5 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
    Checking object v0.26.2
    Checking miniz_oxide v0.4.0
    Checking hashbrown v0.11.0
    Checking addr2line v0.16.0
    Finished release [optimized] target(s) in 24.38s
    Checking rustc-std-workspace-std v1.99.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-std)
    Checking proc_macro v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/proc_macro)
    Checking unicode-width v0.1.8
    Checking getopts v0.2.21
    Checking test v0.0.0 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test)
    Finished release [optimized] target(s) in 2.03s
   Compiling proc-macro2 v1.0.33
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling log v0.4.14
   Compiling autocfg v1.0.1
   Compiling cfg-if v1.0.0
   Compiling neovim_sys v0.1.0 (/home/runner/work/overkill-nvim/overkill-nvim/neovim_sys)
   Compiling libc v0.2.109
   Compiling itoa v0.4.8
   Compiling lazy_static v1.4.0
   Compiling time-macros v0.2.3
   Compiling num-traits v0.2.14
   Compiling quote v1.0.10
   Compiling atty v0.2.14
   Compiling time v0.3.5
   Compiling approx v0.5.0
   Compiling colored v1.9.3
   Compiling simple_logger v1.15.1
   Compiling thiserror-impl v1.0.30
   Compiling nvim_test-proc_macro v0.1.0 (/home/runner/work/overkill-nvim/overkill-nvim/nvim_test-proc_macro)
   Compiling thiserror v1.0.30
thread 'rustc' panicked at 'assertion failed: sentinel == STR_SENTINEL', /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/compiler/rustc_serialize/src/opaque.rs:669:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic
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-nightly (0b42deacc 2021-12-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C link-arg=-Wl,-undefined -C link-arg=-Wl,dynamic_lookup --crate-type cdylib --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 `neovim_sys`
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Backtrace

stack backtrace:
   0: rust_begin_unwind
             at /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/library/core/src/panicking.rs:107:14
   2: core::panicking::panic
             at /rustc/0b42deaccc2cbe17a68067aa5fdb76104369e1fd/library/core/src/panicking.rs:48:5
   3: <alloc::string::String as rustc_serialize::serialize::Decodable<rustc_metadata::rmeta::decoder::DecodeContext>>::decode
   4: <rustc_metadata::locator::CrateLocator>::extract_one
   5: <rustc_metadata::locator::CrateLocator>::extract_lib
   6: <rustc_metadata::locator::CrateLocator>::find_library_crate
   7: <rustc_metadata::locator::CrateLocator>::maybe_load_library_crate
   8: <rustc_metadata::creader::CrateLoader>::load
   9: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  10: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
  11: <rustc_metadata::creader::CrateLoader>::maybe_process_path_extern
  12: <rustc_resolve::Resolver>::extern_prelude_get
  13: <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  14: <rustc_resolve::Resolver>::resolve_path_with_ribs
  15: <rustc_resolve::Resolver>::resolve_macro_path
  16: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_derives
  17: <rustc_builtin_macros::derive::Expander as rustc_expand::base::MultiItemModifier>::expand
  18: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  19: <rustc_expand::expand::MacroExpander>::expand_crate
  20: <rustc_session::session::Session>::time::<core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorReported>, rustc_interface::passes::configure_and_expand::{closure#1}>
  21: rustc_interface::passes::configure_and_expand
  22: <rustc_interface::queries::Queries>::expansion
  23: <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>>
  24: 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}>
  25: <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.

@turboladen turboladen 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 Dec 11, 2021
@turboladen
Copy link
Author

turboladen commented Dec 11, 2021

Looks like this might be a dupe of #91689.

@jyn514
Copy link
Member

jyn514 commented Dec 11, 2021

Looks like this might be a dupe of #91689.

Yup, going to close it - thanks for the report, though!

@jyn514 jyn514 closed this as completed Dec 11, 2021
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) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants