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

cargo doc panic on Polkadot build #98032

Closed
nuke-web3 opened this issue Jun 12, 2022 · 4 comments
Closed

cargo doc panic on Polkadot build #98032

nuke-web3 opened this issue Jun 12, 2022 · 4 comments
Assignees
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nuke-web3
Copy link

Originally reported: paritytech/polkadot#5665

Meta

rustc --version --verbose:

rustc 1.61.0 (fe5b13d68 2022-05-18)
binary: rustc
commit-hash: fe5b13d681f25ee6474be29d748c65adcd91f69e
commit-date: 2022-05-18
host: x86_64-unknown-linux-gnu
release: 1.61.0
LLVM version: 14.0.0

Error output

Documenting polkadot-node-subsystem v0.9.23 (./polkadot/node/subsystem)
thread 'rustc' panicked at 'no entry found for key', src/librustdoc/passes/collect_intra_doc_links.rs:977:16
stack backtrace:
   0:     0x7ff97869e1cd - std::backtrace_rs::backtrace::libunwind::trace::h22893a5306c091b4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7ff97869e1cd - std::backtrace_rs::backtrace::trace_unsynchronized::h29c3bc6f9e91819d
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff97869e1cd - std::sys_common::backtrace::_print_fmt::he497d8a0ec903793
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7ff97869e1cd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9c2a9d2774d81873
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7ff9786f801c - core::fmt::write::hba4337c43d992f49
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/fmt/mod.rs:1194:17
   5:     0x7ff97868f7c1 - std::io::Write::write_fmt::heb73de6e02cfabed
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/io/mod.rs:1655:15
   6:     0x7ff9786a12b5 - std::sys_common::backtrace::_print::h63c8b24acdd8e8ce
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7ff9786a12b5 - std::sys_common::backtrace::print::h426700d6240cdcc2
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7ff9786a12b5 - std::panicking::default_hook::{{closure}}::hc9a76eed0b18f82b
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:295:22
   9:     0x7ff9786a0f69 - std::panicking::default_hook::h2e88d02087fae196
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:314:9
  10:     0x7ff978ead1d1 - rustc_driver[413d55b6344850e3]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7ff9786a1a00 - std::panicking::rust_panic_with_hook::habfdcc2e90f9fd4c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:702:17
  12:     0x7ff9786a1837 - std::panicking::begin_panic_handler::{{closure}}::he054b2a83a51d2cd
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:588:13
  13:     0x7ff97869e684 - std::sys_common::backtrace::__rust_end_short_backtrace::ha48b94ab49b30915
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18
  14:     0x7ff9786a1569 - rust_begin_unwind
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
  15:     0x7ff9786656b3 - core::panicking::panic_fmt::h366d3a309ae17c94
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
  16:     0x7ff9786f4e31 - core::panicking::panic_display::hd3e89d99fb893792
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:72:5
  17:     0x7ff9786f4ddb - core::panicking::panic_str::h98ed104b0c03a108
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:56:5
  18:     0x7ff978665526 - core::option::expect_failed::h58d487f78ae9d247
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/option.rs:1874:5
  19:     0x55bbb44799c9 - rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::resolve_associated_trait_item
  20:     0x55bbb44781de - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector>::resolve_associated_item
  21:     0x55bbb44753c5 - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector>::resolve
  22:     0x55bbb447b6ae - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_item
  23:     0x55bbb44872ca - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_inner_recur
  24:     0x55bbb447e880 - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_item
  25:     0x55bbb44872ca - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_inner_recur
  26:     0x55bbb447e880 - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_item
  27:     0x55bbb44872ca - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_inner_recur
  28:     0x55bbb447e880 - <rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::LinkCollector as rustdoc[2368e8ab35c11ae8]::visit::DocVisitor>::visit_item
  29:     0x55bbb4473bbc - rustdoc[2368e8ab35c11ae8]::passes::collect_intra_doc_links::collect_intra_doc_links
  30:     0x55bbb42ccf54 - <rustc_session[8df92abe178df33c]::session::Session>::time::<rustdoc[2368e8ab35c11ae8]::clean::types::Crate, rustdoc[2368e8ab35c11ae8]::core::run_global_ctxt::{closure#8}>
  31:     0x55bbb452d90d - rustdoc[2368e8ab35c11ae8]::core::run_global_ctxt
  32:     0x55bbb42cd3c2 - <rustc_session[8df92abe178df33c]::session::Session>::time::<(rustdoc[2368e8ab35c11ae8]::clean::types::Crate, rustdoc[2368e8ab35c11ae8]::config::RenderOptions, rustdoc[2368e8ab35c11ae8]::formats::cache::Cache), rustdoc[2368e8ab35c11ae8]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  33:     0x55bbb4588be6 - <rustc_interface[550884b2b179878f]::passes::QueryContext>::enter::<rustdoc[2368e8ab35c11ae8]::main_options::{closure#0}::{closure#0}::{closure#1}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>
  34:     0x55bbb448e41b - rustc_interface[550884b2b179878f]::interface::create_compiler_and_run::<core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>, rustdoc[2368e8ab35c11ae8]::main_options::{closure#0}>
  35:     0x55bbb43007d3 - rustdoc[2368e8ab35c11ae8]::main_options
  36:     0x55bbb4313d2b - <scoped_tls[7ed3ce20ede545d8]::ScopedKey<rustc_span[7238ca7210ca999e]::SessionGlobals>>::set::<rustdoc[2368e8ab35c11ae8]::main_args::{closure#0}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>
  37:     0x55bbb445d93f - std[3b302b3c9093c22]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[550884b2b179878f]::util::run_in_thread_pool_with_globals<rustdoc[2368e8ab35c11ae8]::main_args::{closure#0}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>::{closure#0}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>
  38:     0x55bbb454c869 - <<std[3b302b3c9093c22]::thread::Builder>::spawn_unchecked_<rustc_interface[550884b2b179878f]::util::run_in_thread_pool_with_globals<rustdoc[2368e8ab35c11ae8]::main_args::{closure#0}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>::{closure#0}, core[a3420257622cd381]::result::Result<(), rustc_errors[a7dbbf867eaca825]::ErrorGuaranteed>>::{closure#1} as core[a3420257622cd381]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7ff9786abbf3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha99802c2c52ada61
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/boxed.rs:1861:9
  40:     0x7ff9786abbf3 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha39aea1c57e28a15
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/boxed.rs:1861:9
  41:     0x7ff9786abbf3 - std::sys::unix::thread::Thread::new::thread_start::h9f8e3d72b1f7662f
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7ff978385b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  43:     0x7ff978417a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  44:                0x0 - <unknown>

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.61.0 (fe5b13d68 2022-05-18) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib

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

query stack during panic:
end of query stack
error: could not document `polkadot-node-subsystem`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name polkadot_node_subsystem node/subsystem/src/lib.rs -o ./polkadot/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=49b872d20c6cb053 -L dependency=./polkadot/target/debug/deps --extern polkadot_node_jaeger=./polkadot/target/debug/deps/libpolkadot_node_jaeger-7a85134452f9ab9b.rmeta --extern polkadot_node_subsystem_types=./polkadot/target/debug/deps/libpolkadot_node_subsystem_types-ee48f2698c5c4dc1.rmeta --extern polkadot_overseer=./polkadot/target/debug/deps/libpolkadot_overseer-891b0bfc52420e3b.rmeta --crate-version 0.9.23` (exit status: 101)
Backtrace

same as above

@nuke-web3 nuke-web3 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 Jun 12, 2022
@bkchr
Copy link
Contributor

bkchr commented Jun 13, 2022

Did you try the latest nightly?

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 17, 2022
@GuillaumeGomez
Copy link
Member

cc @petrochenkov

@VictorKoenders
Copy link

This seems to still be an issue in rustc 1.62.0 (a8314ef7d 2022-06-27) running on x86_64-pc-windows-msvc

@petrochenkov
Copy link
Contributor

I cannot reproduce this issue on Rust 1.62.1 or on Rust Nightly, closing the issue.
I didn't bisect in more detail because polkadot requires enormous amount of time to document (its dependency tree is about 2000 crates).

If you have a specific commit of polkadot and Rust version that reproduce this issue, please reopen it (or create a new one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants
@VictorKoenders @GuillaumeGomez @bkchr @petrochenkov @nuke-web3 and others