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

ICE on cargo doc: no resolutions for a doc link #111462

Closed
wucke13 opened this issue May 11, 2023 · 3 comments
Closed

ICE on cargo doc: no resolutions for a doc link #111462

wucke13 opened this issue May 11, 2023 · 3 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

@wucke13
Copy link

wucke13 commented May 11, 2023

Code

Caused by the code in https://github.com/rosenpass/rosenpass/tree/d5b2a9414fd6f5f3bf550fddb79e5c684ba461cf

Meta

rustc 1.69.0 (84c898d65 2023-04-16) running on x86_64-unknown-linux-gnu

Error output

thread 'rustc' panicked at 'no resolutions for a doc link', compiler/rustc_metadata/src/rmeta/encoder.rs:2228:18
Backtrace

Run RUSTDOCFLAGS="-D warnings" cargo doc --document-private-items
  RUSTDOCFLAGS="-D warnings" cargo doc --document-private-items
  shell: /usr/bin/bash -e {0}
    Updating crates.io index
 Downloading crates ...
  Downloaded rle-decode-fast v1.0.3
  Downloaded libflate_lz77 v1.2.0
  Downloaded shlex v1.1.0
  Downloaded adler v1.0.2
  Downloaded autocfg v1.1.0
  Downloaded bitflags v1.3.2
  Downloaded peeking_take_while v0.1.2
  Downloaded cfg-if v1.0.0
  Downloaded atty v0.2.14
  Downloaded which v4.4.0
  Downloaded minisign-verify v0.2.1
  Downloaded thiserror-impl v1.0.38
  Downloaded adler32 v1.2.0
  Downloaded cmake v0.1.49
  Downloaded rustc-demangle v0.1.21
  Downloaded memoffset v0.6.5
  Downloaded strsim v0.10.0
  Downloaded xattr v0.2.3
  Downloaded rustc-hash v1.1.0
  Downloaded unicode-ident v1.0.6
  Downloaded quote v1.0.23
  Downloaded clap_lex v0.2.4
  Downloaded filetime v0.2.20
  Downloaded io-lifetimes v1.0.5
  Downloaded cexpr v0.6.0
  Downloaded crc32fast v1.3.2
  Downloaded build-deps v0.1.4
  Downloaded textwrap v0.16.0
  Downloaded addr2line v0.19.0
  Downloaded pkg-config v0.3.26
  Downloaded proc-macro2 v1.0.51
  Downloaded anyhow v1.0.70
  Downloaded is-terminal v0.4.4
  Downloaded linked-hash-map v0.5.6
  Downloaded termcolor v1.2.0
  Downloaded yaml-rust v0.4.5
  Downloaded tar v0.4.38
  Downloaded cc v1.0.79
  Downloaded static_assertions v1.1.0
  Downloaded lazy_static v1.4.0
  Downloaded env_logger v0.9.3
  Downloaded thiserror v1.0.38
  Downloaded env_logger v0.10.0
  Downloaded backtrace v0.3.67
  Downloaded indexmap v1.9.2
  Downloaded clang-sys v1.6.0
  Downloaded base64 v0.13.1
  Downloaded humantime v2.1.0
  Downloaded either v1.8.1
  Downloaded os_str_bytes v6.4.1
  Downloaded log v0.4.17
  Downloaded glob v0.3.1
  Downloaded rustix v0.36.8
  Downloaded lazycell v1.3.0
  Downloaded paste v1.0.11
  Downloaded libloading v0.7.4
  Downloaded libflate v1.3.0
  Downloaded miniz_oxide v0.6.2
  Downloaded nom v7.1.3
  Downloaded memchr v2.5.0
  Downloaded aho-corasick v0.7.20
  Downloaded minimal-lexical v0.2.1
  Downloaded hashbrown v0.12.3
  Downloaded syn v1.0.109
  Downloaded regex v1.7.1
  Downloaded clap v3.2.23
  Downloaded bindgen v0.60.1
  Downloaded regex-syntax v0.6.28
  Downloaded object v0.30.3
  Downloaded libc v0.2.139
  Downloaded gimli v0.27.2
  Downloaded linux-raw-sys v0.1.4
  Downloaded libsodium-sys-stable v1.19.27
  Downloaded oqs-sys v0.7.2
   Compiling memchr v2.5.0
   Compiling libc v0.2.139
   Compiling proc-macro2 v1.0.51
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling quote v1.0.23
   Compiling cc v1.0.79
   Compiling indexmap v1.9.2
   Compiling log v0.4.17
   Compiling unicode-ident v1.0.6
   Compiling glob v0.3.1
 Documenting libc v0.2.139
   Compiling clang-sys v1.6.0
   Compiling io-lifetimes v1.0.5
   Compiling aho-corasick v0.7.20
   Compiling atty v0.2.14
   Compiling minimal-lexical v0.2.1
   Compiling hashbrown v0.12.3
   Compiling crc32fast v1.3.2
   Compiling syn v1.0.109
   Compiling os_str_bytes v6.4.1
   Compiling termcolor v1.2.0
   Compiling regex-syntax v0.6.28
    Checking bitflags v1.3.2
   Compiling clap_lex v0.2.4
   Compiling nom v7.1.3
   Compiling regex v1.7.1
   Compiling libloading v0.7.4
   Compiling textwrap v0.16.0
   Compiling rustix v0.36.8
   Compiling either v1.8.1
   Compiling bindgen v0.60.1
   Compiling strsim v0.10.0
   Compiling rle-decode-fast v1.0.3
   Compiling humantime v2.1.0
   Compiling env_logger v0.9.3
   Compiling libflate_lz77 v1.2.0
   Compiling clap v3.2.23
   Compiling which v4.4.0
   Compiling cexpr v0.6.0
   Compiling filetime v0.2.20
   Compiling xattr v0.2.3
 Documenting memchr v2.5.0
   Compiling rustc-hash v1.1.0
   Compiling lazy_static v1.4.0
    Checking linux-raw-sys v0.1.4
   Compiling peeking_take_while v0.1.2
   Compiling adler32 v1.2.0
    Checking gimli v0.27.2
    Checking adler v1.0.2
   Compiling lazycell v1.3.0
   Compiling shlex v1.1.0
   Compiling libflate v1.3.0
   Compiling tar v0.4.38
   Compiling build-deps v0.1.4
   Compiling backtrace v0.3.67
   Compiling cmake v0.1.49
   Compiling minisign-verify v0.2.1
 Documenting unicode-ident v1.0.6
   Compiling pkg-config v0.3.26
   Compiling libsodium-sys-stable v1.19.27
   Compiling oqs-sys v0.7.2
 Documenting proc-macro2 v1.0.51
    Checking addr2line v0.19.0
    Checking miniz_oxide v0.6.2
    Checking object v0.30.3
 Documenting bitflags v1.3.2
   Compiling anyhow v1.0.70
    Checking rustc-demangle v0.1.21
    Checking linked-hash-map v0.5.6
 Documenting cfg-if v1.0.0
 Documenting quote v1.0.23
 Documenting io-lifetimes v1.0.5
   Compiling memoffset v0.6.5
 Documenting gimli v0.27.2
   Compiling thiserror v1.0.38
 Documenting adler v1.0.2
   Compiling paste v1.0.11
 Documenting linux-raw-sys v0.1.4
 Documenting rustix v0.36.8
thread 'rustc' panicked at 'no resolutions for a doc link', compiler/rustc_metadata/src/rmeta/encoder.rs:2228:18
stack backtrace:
   0:     0x7fc18205031a - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fc18205031a - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fc18205031a - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fc18205031a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fc1820b3b6e - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x7fc1820432c5 - std::io::Write::write_fmt::h4bc1f301cb9e9cce
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15
   6:     0x7fc1820500e5 - std::sys_common::backtrace::_print::h5fcdc36060f177e8
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fc1820500e5 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fc182052e5f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x7fc182052b9b - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x7fc1852b48b5 - <rustc_driver_impl[fb92b3e21ac03dce]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[911a585bea10363d]::ops::function::FnOnce<(&core[911a585bea10363d]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fc18205369d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h6507bddc3eebb4a5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:2001:9
  12:     0x7fc18205369d - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:696:13
  13:     0x7fc182053419 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  14:     0x7fc182050786 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7fc182053122 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  16:     0x7fc1820afec3 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
  17:     0x7fc1820b0031 - core::panicking::panic_display::ha103dd28e5023b08
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:147:5
  18:     0x7fc1820affdb - core::panicking::panic_str::h940bf021f492dc8c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:131:5
  19:     0x7fc1820afc46 - core::option::expect_failed::h09b982639336e7ea
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:2045:5
  20:     0x7fc18577fb77 - <rustc_metadata[29cf5a64f33334d8]::rmeta::encoder::provide::{closure#0} as core[911a585bea10363d]::ops::function::FnOnce<(rustc_middle[1a4ce3311a146f18]::ty::context::TyCtxt, rustc_span[fab0eb11f1fed58d]::def_id::DefId)>>::call_once
  21:     0x7fc185b883ad - rustc_query_system[caf472e4bac2b2b6]::query::plumbing::try_execute_query::<rustc_query_impl[a4bd04fc7a0236b8]::queries::doc_link_resolutions, rustc_query_impl[a4bd04fc7a0236b8]::plumbing::QueryCtxt>
  22:     0x7fc185c097cd - <rustc_query_impl[a4bd04fc7a0236b8]::Queries as rustc_middle[1a4ce3311a146f18]::ty::query::QueryEngine>::doc_link_resolutions
  23:     0x55a1297a2498 - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  24:     0x55a1297a274e - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector>::resolve
  25:     0x55a1297a6364 - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector as rustdoc[483c6e22976f34cb]::visit::DocVisitor>::visit_item
  26:     0x55a1297af67a - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector as rustdoc[483c6e22976f34cb]::visit::DocVisitor>::visit_inner_recur
  27:     0x55a1297a9a7c - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector as rustdoc[483c6e22976f34cb]::visit::DocVisitor>::visit_item
  28:     0x55a1297af67a - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector as rustdoc[483c6e22976f34cb]::visit::DocVisitor>::visit_inner_recur
  29:     0x55a1297a9a7c - <rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::LinkCollector as rustdoc[483c6e22976f34cb]::visit::DocVisitor>::visit_item
  30:     0x55a1297a10a2 - rustdoc[483c6e22976f34cb]::passes::collect_intra_doc_links::collect_intra_doc_links
  31:     0x55a1296e932e - <rustc_session[b87ece769e9b9511]::session::Session>::time::<rustdoc[483c6e22976f34cb]::clean::types::Crate, rustdoc[483c6e22976f34cb]::core::run_global_ctxt::{closure#7}>
  32:     0x55a129814dd0 - rustdoc[483c6e22976f34cb]::core::run_global_ctxt
  33:     0x55a1296e95b9 - <rustc_session[b87ece769e9b9511]::session::Session>::time::<(rustdoc[483c6e22976f34cb]::clean::types::Crate, rustdoc[483c6e22976f34cb]::config::RenderOptions, rustdoc[483c6e22976f34cb]::formats::cache::Cache), rustdoc[483c6e22976f34cb]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  34:     0x55a1295e7d57 - <rustc_middle[1a4ce3311a146f18]::ty::context::GlobalCtxt>::enter::<rustdoc[483c6e22976f34cb]::main_args::{closure#1}::{closure#0}::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>
  35:     0x55a129652fce - rustc_span[fab0eb11f1fed58d]::with_source_map::<core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>, rustc_interface[bd8390756bd7a52a]::interface::run_compiler<core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>, rustdoc[483c6e22976f34cb]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  36:     0x55a1295c5474 - <scoped_tls[473f62cd2eff9842]::ScopedKey<rustc_span[fab0eb11f1fed58d]::SessionGlobals>>::set::<rustc_interface[bd8390756bd7a52a]::interface::run_compiler<core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>, rustdoc[483c6e22976f34cb]::main_args::{closure#1}>::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>
  37:     0x55a1297009a0 - std[685882fd5f6d52e5]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[bd8390756bd7a52a]::util::run_in_thread_pool_with_globals<rustc_interface[bd8390756bd7a52a]::interface::run_compiler<core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>, rustdoc[483c6e22976f34cb]::main_args::{closure#1}>::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>
  38:     0x55a1297cb1dd - <<std[685882fd5f6d52e5]::thread::Builder>::spawn_unchecked_<rustc_interface[bd8390756bd7a52a]::util::run_in_thread_pool_with_globals<rustc_interface[bd8390756bd7a52a]::interface::run_compiler<core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>, rustdoc[483c6e22976f34cb]::main_args::{closure#1}>::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[911a585bea10363d]::result::Result<(), rustc_span[fab0eb11f1fed58d]::ErrorGuaranteed>>::{closure#1} as core[911a585bea10363d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7fc18205d593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h39990b24eedef2ab
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:1987:9
  40:     0x7fc18205d593 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h01a027258444143b
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/alloc/src/boxed.rs:1987:9
  41:     0x7fc18205d593 - std::sys::unix::thread::Thread::new::thread_start::ha4f1cdd9c25884ba
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7fc181d80b43 - <unknown>
  43:     0x7fc181e12a00 - <unknown>
  44:                0x0 - <unknown>

error: 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.69.0 (84c898d65 2023-04-16) 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:
#0 [doc_link_resolutions] resolutions for documentation links for a module
end of query stack
error: could not document `rustix`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name rustix /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.36.8/src/lib.rs --cap-lints allow -o /home/runner/work/rosenpass/rosenpass/target/doc --cfg 'feature="default"' --cfg 'feature="io-lifetimes"' --cfg 'feature="libc"' --cfg 'feature="std"' --cfg 'feature="termios"' --cfg 'feature="use-libc-auxv"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=586203394ab39b18 -L dependency=/home/runner/work/rosenpass/rosenpass/target/debug/deps --extern bitflags=/home/runner/work/rosenpass/rosenpass/target/debug/deps/libbitflags-1a1c34f79f6e612c.rmeta --extern io_lifetimes=/home/runner/work/rosenpass/rosenpass/target/debug/deps/libio_lifetimes-cd6be4f8fe3b4bc6.rmeta --extern libc=/home/runner/work/rosenpass/rosenpass/target/debug/deps/liblibc-25f8caa1cd741fae.rmeta --extern linux_raw_sys=/home/runner/work/rosenpass/rosenpass/target/debug/deps/liblinux_raw_sys-a98848148f479f38.rmeta -D warnings --crate-version 0.36.8 --cfg linux_raw --cfg asm` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

@wucke13 wucke13 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 May 11, 2023
@y21
Copy link
Member

y21 commented May 11, 2023

I can reproduce this on stable but not on nightly, so it's probably fixed already? Looks like a dupe of #110626, which is fixed in 1.70

@sunfishcode
Copy link
Member

Yep. It's also worked around in rustix 0.36.13 and 0.37.

@clubby789 clubby789 changed the title ICE on cargo doc ICE on cargo doc: no resolutions for a doc link May 12, 2023
str4d added a commit to flipperzero-rs/flipperzero that referenced this issue Jun 8, 2023
Includes an update to the `rustix` crate which works around this ICE:
rust-lang/rust#111462
str4d added a commit to flipperzero-rs/flipperzero that referenced this issue Jun 9, 2023
Includes an update to the `rustix` crate which works around this ICE:
rust-lang/rust#111462
str4d added a commit to flipperzero-rs/flipperzero that referenced this issue Jun 9, 2023
Includes an update to the `rustix` crate which works around this ICE:
rust-lang/rust#111462
@Enselic
Copy link
Member

Enselic commented Aug 17, 2023

Triage: Closing as duplicate of #110626 as suggested in #111462 (comment)

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
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

4 participants