Skip to content

ICE when running stage 0 library/alloc doctests, stage 1 passes #89564

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

Closed
the8472 opened this issue Oct 5, 2021 · 1 comment
Closed

ICE when running stage 0 library/alloc doctests, stage 1 passes #89564

the8472 opened this issue Oct 5, 2021 · 1 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.

Comments

@the8472
Copy link
Member

the8472 commented Oct 5, 2021

Running ./x.py test library/alloc/ --stage 0 --doc on commit 25ec827 leads to the the ICE below. The tests pass without error when running the tests under stage 1 instead.

Does that mean some beta backport is missing?

Error output

---- src/string.rs - string::String (line 168) stdout ----
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs:696:81
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.56.0-beta.1 (e784c962e 2021-09-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z force-unstable-if-unmarked -C codegen-units=1 -C embed-bitcode=no -C target-cpu=native -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--threads=1 -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--threads=1 --crate-type bin

query stack during panic:
#0 [typeck] type-checking `main::_doctest_main_src_string_rs_168_0`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at  <snip>

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.56.0-beta.1 (e784c962e 2021-09-07) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z crate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/") -Z force-unstable-if-unmarked -C codegen-units=1 -C embed-bitcode=no -C target-cpu=native -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--threads=1 -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--threads=1 --crate-type bin

query stack during panic:
end of query stack
thread panicked while panicking. aborting.
Some expected error codes were not found: ["E0277"]

failures:
    src/string.rs - string::String (line 168)

test result: FAILED. 598 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 2.76s

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/home/the8472/workspace/cargo/target/release/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "48" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/home/the8472/workspace/rust/library/test/Cargo.toml" "-p" "alloc" "--" "--quiet"
expected success, got: exit status: 101
Backtrace

 0: rustc_errors::Handler::delay_good_path_bug
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: rustc_data_structures::stack::ensure_sufficient_stack
             3: rustc_query_system::query::plumbing::get_query_impl
             4: rustc_query_system::query::plumbing::get_query
             5: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::Printer>::print_def_path
             6: rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type
             7: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::sty::TypeAndMut>::print
             8: rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type
             9: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::TraitPredicate>::print
            10: rustc_middle::ty::print::pretty::<impl rustc_middle::ty::print::Print<P> for rustc_middle::ty::PredicateKind>::print
            11: <rustc_middle::ty::print::pretty::FmtPrinter<F> as rustc_middle::ty::print::pretty::PrettyPrinter>::in_binder
            12: rustc_middle::ty::print::pretty::<impl core::fmt::Display for rustc_middle::ty::Predicate>::fmt
            13: core::fmt::write
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:1150:17
            14: core::fmt::Write::write_fmt
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:186:9
            15: alloc::fmt::format
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/fmt.rs:583:5
            16: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
            17: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
            18: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
            19: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_argument_types
            20: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::confirm_builtin_call
            21: rustc_typeck::check::callee::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_call
            22: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
            23: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            24: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
            25: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
            26: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
            27: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
            28: rustc_typeck::check::check::check_fn
            29: rustc_infer::infer::InferCtxtBuilder::enter
            30: rustc_typeck::check::typeck
            31: rustc_query_system::query::plumbing::get_query_impl
            32: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck
            33: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::par_body_owners
            34: rustc_typeck::check::typeck_item_bodies
            35: rustc_query_system::query::plumbing::get_query_impl
            36: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::typeck_item_bodies
            37: rustc_session::utils::<impl rustc_session::session::Session>::time
            38: rustc_typeck::check_crate
            39: rustc_interface::passes::analysis
            40: rustc_query_system::query::plumbing::get_query_impl
            41: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
            42: rustc_interface::passes::QueryContext::enter
            43: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
            44: rustc_span::with_source_map
            45: scoped_tls::ScopedKey<T>::set
            46: std::sys_common::backtrace::__rust_begin_short_backtrace
            47: core::ops::function::FnOnce::call_once{{vtable.shim}}
            48: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
            49: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
            50: std::sys::unix::thread::Thread::new::thread_start
                       at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys/unix/thread.rs:106:17
            51: start_thread
            52: __GI___clone
          

thread 'rustc' panicked at 'no warnings or errors encountered even though `delayed_good_path_bugs` issued', compiler/rustc_errors/src/lib.rs:1166:13
stack backtrace:
   0:     0x7ff60ab994fc - std::backtrace_rs::backtrace::libunwind::trace::h51faa62df48810e4
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7ff60ab994fc - std::backtrace_rs::backtrace::trace_unsynchronized::h91de4d8e16d607e4
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff60ab994fc - std::sys_common::backtrace::_print_fmt::h71b0935f97e4322c
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7ff60ab994fc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9a78218788c14e18
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7ff60abf720c - core::fmt::write::h3381b3176fe2b3d3
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/core/src/fmt/mod.rs:1150:17
   5:     0x7ff60ab8a435 - std::io::Write::write_fmt::h1d5220480c7a2437
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/io/mod.rs:1667:15
   6:     0x7ff60ab9ca60 - std::sys_common::backtrace::_print::h4b77abc4d907ed0e
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7ff60ab9ca60 - std::sys_common::backtrace::print::hb170c60b542377ad
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7ff60ab9ca60 - std::panicking::default_hook::{{closure}}::h12bbda9af8901ee3
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:210:50
   9:     0x7ff60ab9c617 - std::panicking::default_hook::h8c6c66d3f3ba6768
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:227:9
  10:     0x7ff60b370861 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::h5d5f6bcd40777e95
  11:     0x7ff60ab9d279 - std::panicking::rust_panic_with_hook::h36f2fa0bb09f4069
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:628:17
  12:     0x7ff60ab9cd30 - std::panicking::begin_panic_handler::{{closure}}::h9c42b65a42d06a7a
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:521:13
  13:     0x7ff60ab999c4 - std::sys_common::backtrace::__rust_end_short_backtrace::hc791bddfe31e532c
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7ff60ab9cc99 - rust_begin_unwind
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:517:5
  15:     0x7ff60ab6181b - std::panicking::begin_panic_fmt::h32ac317c038a272d
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/panicking.rs:460:5
  16:     0x7ff60d8cd54e - rustc_errors::HandlerInner::flush_delayed::hc1a0dc2a3b52b7c5
  17:     0x7ff60d8cbe41 - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h6b6fa9db3b176321
  18:     0x7ff60ce8fb16 - core::ptr::drop_in_place<rustc_session::parse::ParseSess>::h0f64c3a6d9ae48b4
  19:     0x7ff60ce91b0e - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h38ccacfabbb0cd9a
  20:     0x7ff60ce63a8d - core::ptr::drop_in_place<rustc_interface::interface::Compiler>::he462bcfe0a585c06
  21:     0x7ff60ce6376c - rustc_span::with_source_map::h42000c6d4d4801a0
  22:     0x7ff60ce75858 - scoped_tls::ScopedKey<T>::set::h9c4e59a22d2be862
  23:     0x7ff60ce649db - std::sys_common::backtrace::__rust_begin_short_backtrace::hb112af792d752f1d
  24:     0x7ff60ce61b95 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h9bf5ff18e54ee278
  25:     0x7ff60aba98c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hbbbb32ef11ea0ad2
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
  26:     0x7ff60aba98c3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h3b8ef23699fc5385
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/alloc/src/boxed.rs:1636:9
  27:     0x7ff60aba98c3 - std::sys::unix::thread::Thread::new::thread_start::ha57f5cba35f709b7
                               at /rustc/e784c962ea252f0874a4305168077e7048cb39e9/library/std/src/sys/unix/thread.rs:106:17
  28:     0x7ff60aab3259 - start_thread
  29:     0x7ff60a9c85e3 - __GI___clone
  30:                0x0 - <unknown>

@the8472 the8472 added 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. C-bug Category: This is a bug. labels Oct 5, 2021
@the8472
Copy link
Member Author

the8472 commented Oct 14, 2021

Fixed by #89785

@the8472 the8472 closed this as completed Oct 14, 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

1 participant