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

rustdoc ICE: no resolutions for a doc link #109424

Closed
kyp44 opened this issue Mar 21, 2023 · 8 comments · Fixed by #109500
Closed

rustdoc ICE: no resolutions for a doc link #109424

kyp44 opened this issue Mar 21, 2023 · 8 comments · Fixed by #109500
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) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@kyp44
Copy link

kyp44 commented Mar 21, 2023

Code

Panic occurs when running cargo doc on my project here. This is specifically on the current transfer branch of the project with commit hash c1d04db7977d2de43d69ea9f8795905f60b3b8ba. Note that this project does include the Cargo.lock file, and that the project compiles normally (i.e. with cargo build) just fine.

Meta

cargo --version --verbose:

cargo 1.70.0-nightly (4a3c588b1 2023-03-14)
release: 1.70.0-nightly
commit-hash: 4a3c588b1f0a8e2dc8dd8789dbf3b6a71b02ed49
commit-date: 2023-03-14
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Ubuntu 22.04 (jammy) [64-bit]

rustc --version --verbose:

rustc 1.70.0-nightly (44f518058 2023-03-20)
binary: rustc
commit-hash: 44f5180584404d18058cbbf224c55255db4fdcbb
commit-date: 2023-03-20
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7

Error output

There are numerous panics when running cargo doc, but the first one seems to happen while Checking serde_json v1.0.94:

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

stack backtrace:
   0:     0x7f04c0d66bfa - std::backtrace_rs::backtrace::libunwind::trace::h02b863e4bfcd5ee4
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f04c0d66bfa - std::backtrace_rs::backtrace::trace_unsynchronized::h00a2c275504a104d
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f04c0d66bfa - std::sys_common::backtrace::_print_fmt::h026a22e05cf38896
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f04c0d66bfa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h34a8f50cf2d025fa
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f04c0dca21e - core::fmt::write::h5b51ab21f7d1e0b3
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/core/src/fmt/mod.rs:1254:17
   5:     0x7f04c0d59a85 - std::io::Write::write_fmt::hf4fa62cadc893d5c
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/io/mod.rs:1698:15
   6:     0x7f04c0d669c5 - std::sys_common::backtrace::_print::ha17a326a77d0900c
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f04c0d669c5 - std::sys_common::backtrace::print::h4547d3fae20fb79a
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f04c0d6973f - std::panicking::default_hook::{{closure}}::hc37cfbcbf13dea2f
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/panicking.rs:271:22
   9:     0x7f04c0d6947b - std::panicking::default_hook::h68329187d8716430
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/panicking.rs:290:9
  10:     0x7f04c3fb53f5 - <rustc_driver_impl[e865fcce65453e97]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[e92a6e72e88848e6]::ops::function::FnOnce<(&core[e92a6e72e88848e6]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f04c0d69f7d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::he6b1b104583416f4
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/alloc/src/boxed.rs:2002:9
  12:     0x7f04c0d69f7d - std::panicking::rust_panic_with_hook::h89588635866984f2
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/panicking.rs:696:13
  13:     0x7f04c0d69cf9 - std::panicking::begin_panic_handler::{{closure}}::haf7e5802c3a8728c
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/panicking.rs:583:13
  14:     0x7f04c0d67066 - std::sys_common::backtrace::__rust_end_short_backtrace::h8100acaef4dcb737
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7f04c0d69a02 - rust_begin_unwind
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/panicking.rs:579:5
  16:     0x7f04c0dc6573 - core::panicking::panic_fmt::h176c535e62b8ef16
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/core/src/panicking.rs:64:14
  17:     0x7f04c0dc66e1 - core::panicking::panic_display::h59bc55a12419d24e
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/core/src/panicking.rs:147:5
  18:     0x7f04c0dc668b - core::panicking::panic_str::hf7a9b345df0273a6
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/core/src/panicking.rs:131:5
  19:     0x7f04c0dc62f6 - core::option::expect_failed::ha547da0b831768e9
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/core/src/option.rs:2091:5
  20:     0x7f04c447cb4a - <rustc_metadata[d1c7680efe9369f1]::rmeta::encoder::provide::{closure#0} as core[e92a6e72e88848e6]::ops::function::FnOnce<(rustc_middle[20900d4515e9a17b]::ty::context::TyCtxt, rustc_span[f138f19c2ce8dad]::def_id::DefId)>>::call_once
  21:     0x7f04c487ae5d - rustc_query_system[17296292601d89b2]::query::plumbing::try_execute_query::<rustc_query_impl[f65bb69a3c105d87]::queries::doc_link_resolutions, rustc_query_impl[f65bb69a3c105d87]::plumbing::QueryCtxt>
  22:     0x7f04c490a807 - <rustc_query_impl[f65bb69a3c105d87]::Queries as rustc_middle[20900d4515e9a17b]::ty::query::QueryEngine>::doc_link_resolutions
  23:     0x556b8ea2aeab - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  24:     0x556b8ea2eeab - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector as rustdoc[6fdc5879a6c0809c]::visit::DocVisitor>::visit_item
  25:     0x556b8ea37b6a - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector as rustdoc[6fdc5879a6c0809c]::visit::DocVisitor>::visit_inner_recur
  26:     0x556b8ea31d54 - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector as rustdoc[6fdc5879a6c0809c]::visit::DocVisitor>::visit_item
  27:     0x556b8ea37b6a - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector as rustdoc[6fdc5879a6c0809c]::visit::DocVisitor>::visit_inner_recur
  28:     0x556b8ea31d54 - <rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::LinkCollector as rustdoc[6fdc5879a6c0809c]::visit::DocVisitor>::visit_item
  29:     0x556b8ea29a9f - rustdoc[6fdc5879a6c0809c]::passes::collect_intra_doc_links::collect_intra_doc_links
  30:     0x556b8e9f166e - <rustc_session[ae3e11cc9a6ced82]::session::Session>::time::<rustdoc[6fdc5879a6c0809c]::clean::types::Crate, rustdoc[6fdc5879a6c0809c]::core::run_global_ctxt::{closure#7}>
  31:     0x556b8eab9390 - rustdoc[6fdc5879a6c0809c]::core::run_global_ctxt
  32:     0x556b8e9f18f9 - <rustc_session[ae3e11cc9a6ced82]::session::Session>::time::<(rustdoc[6fdc5879a6c0809c]::clean::types::Crate, rustdoc[6fdc5879a6c0809c]::config::RenderOptions, rustdoc[6fdc5879a6c0809c]::formats::cache::Cache), rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  33:     0x556b8e9541c7 - <rustc_middle[20900d4515e9a17b]::ty::context::GlobalCtxt>::enter::<rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}::{closure#0}::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>
  34:     0x556b8e8cb450 - <rustc_interface[cef7fd7d041aab20]::interface::Compiler>::enter::<rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>
  35:     0x556b8e9f0c0b - rustc_span[f138f19c2ce8dad]::with_source_map::<core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>, rustc_interface[cef7fd7d041aab20]::interface::run_compiler<core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>, rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  36:     0x556b8e8cd1e4 - <scoped_tls[99df3e36d6c94ca5]::ScopedKey<rustc_span[f138f19c2ce8dad]::SessionGlobals>>::set::<rustc_interface[cef7fd7d041aab20]::interface::run_compiler<core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>, rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}>::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>
  37:     0x556b8e9ff600 - std[f90515c7d1e58fcd]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[cef7fd7d041aab20]::util::run_in_thread_pool_with_globals<rustc_interface[cef7fd7d041aab20]::interface::run_compiler<core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>, rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}>::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>
  38:     0x556b8eaad69d - <<std[f90515c7d1e58fcd]::thread::Builder>::spawn_unchecked_<rustc_interface[cef7fd7d041aab20]::util::run_in_thread_pool_with_globals<rustc_interface[cef7fd7d041aab20]::interface::run_compiler<core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>, rustdoc[6fdc5879a6c0809c]::main_args::{closure#1}>::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e92a6e72e88848e6]::result::Result<(), rustc_span[f138f19c2ce8dad]::ErrorGuaranteed>>::{closure#1} as core[e92a6e72e88848e6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7f04c0d73e53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h75ab31ff38cd6fd4
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/alloc/src/boxed.rs:1988:9
  40:     0x7f04c0d73e53 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h2ba977e91260a719
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/alloc/src/boxed.rs:1988:9
  41:     0x7f04c0d73e53 - std::sys::unix::thread::Thread::new::thread_start::h132d174660c69668
                               at /rustc/44f5180584404d18058cbbf224c55255db4fdcbb/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7f04c0894b43 - start_thread
                               at ./nptl/./nptl/pthread_create.c:442:8
  43:     0x7f04c0926a00 - clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  44:                0x0 - <unknown>

@kyp44 kyp44 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 Mar 21, 2023
@jyn514 jyn514 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 Mar 21, 2023
@jyn514 jyn514 changed the title rustc panic when running cargo doc on a project rustdoc ICE: no resolutions for a doc link Mar 21, 2023
@jyn514
Copy link
Member

jyn514 commented Mar 21, 2023

cc @petrochenkov

@clubby789
Copy link
Contributor

clubby789 commented Mar 21, 2023

This may have been fixed by #109266. Does it work on the most recent nightly?

@smmoosavi
Copy link

smmoosavi commented Mar 21, 2023

it was ok in rustc 1.70.0-nightly (da7c50c08 2023-03-19) but have error in 1.70.0-nightly (44f518058 2023-03-20)

@kpreid
Copy link
Contributor

kpreid commented Mar 23, 2023

I am seeing a similar ICE:

Backtrace and cargo error
 Documenting rustix v0.36.10
thread 'rustc' panicked at 'no resolutions for a doc link', compiler/rustc_metadata/src/rmeta/encoder.rs:2253:18
stack backtrace:
   0:     0x7f900fff581a - std::backtrace_rs::backtrace::libunwind::trace::h26518014dbf31aba
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f900fff581a - std::backtrace_rs::backtrace::trace_unsynchronized::ha516581d0aef3757
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f900fff581a - std::sys_common::backtrace::_print_fmt::h9eca712360b21da0
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f900fff581a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h528fecd217131eb4
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f901005944e - core::fmt::write::h073da6791f3f2ff7
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/fmt/mod.rs:1254:17
   5:     0x7f900ffe8395 - std::io::Write::write_fmt::h51f8756996066b5a
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/io/mod.rs:1698:15
   6:     0x7f900fff55e5 - std::sys_common::backtrace::_print::h5b4ffde9ddd340d3
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f900fff55e5 - std::sys_common::backtrace::print::hde4ce191c0ed53d2
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f900fff835f - std::panicking::default_hook::{{closure}}::h23a2d3c2d62785b5
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:271:22
   9:     0x7f900fff809b - std::panicking::default_hook::hfe56491cf86bf314
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:290:9
  10:     0x7f901334df35 - <rustc_driver_impl[ad8fc07c03d45871]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[ee581b2e0272cb3e]::ops::function::FnOnce<(&core[ee581b2e0272cb3e]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f900fff8b9d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hfa9e4663303a5377
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/alloc/src/boxed.rs:2002:9
  12:     0x7f900fff8b9d - std::panicking::rust_panic_with_hook::hb3c1c1d27d072101
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:696:13
  13:     0x7f900fff8919 - std::panicking::begin_panic_handler::{{closure}}::h52b8863815aadd2e
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:583:13
  14:     0x7f900fff5c86 - std::sys_common::backtrace::__rust_end_short_backtrace::hc0cd8c631fc1c324
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys_common/backtrace.rs:150:18
  15:     0x7f900fff8622 - rust_begin_unwind
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/panicking.rs:579:5
  16:     0x7f9010055793 - core::panicking::panic_fmt::heb2bd7c92b03c49a
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/panicking.rs:64:14
  17:     0x7f9010055901 - core::panicking::panic_display::h86181fd327517fb2
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/panicking.rs:147:5
  18:     0x7f90100558ab - core::panicking::panic_str::h4810192062705dc7
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/panicking.rs:131:5
  19:     0x7f9010055516 - core::option::expect_failed::h72bd5f9c1943a9a2
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/core/src/option.rs:2055:5
  20:     0x7f90137db51f - <rustc_metadata[b99d73cb12f1c727]::rmeta::encoder::provide::{closure#0} as core[ee581b2e0272cb3e]::ops::function::FnOnce<(rustc_middle[267d604f42fb2b42]::ty::context::TyCtxt, rustc_span[48752dc4b679ffbb]::def_id::LocalDefId)>>::call_once
  21:     0x7f9013bd9258 - rustc_query_system[4e6a7ce19b64cf81]::query::plumbing::try_execute_query::<rustc_query_impl[5e505097f868cbdd]::queries::doc_link_resolutions, rustc_query_impl[5e505097f868cbdd]::plumbing::QueryCtxt>
  22:     0x7f9013c68ba7 - <rustc_query_impl[5e505097f868cbdd]::Queries as rustc_middle[267d604f42fb2b42]::ty::query::QueryEngine>::doc_link_resolutions
  23:     0x562c86a1bc4f - <rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  24:     0x562c86a1be18 - <rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::LinkCollector>::resolve
  25:     0x562c86a1f44d - <rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::LinkCollector>::resolve_links
  26:     0x562c86a26f30 - <rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::LinkCollector as rustdoc[99b5189239f61b47]::visit::DocVisitor>::visit_inner_recur
  27:     0x562c86a26f18 - <rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::LinkCollector as rustdoc[99b5189239f61b47]::visit::DocVisitor>::visit_inner_recur
  28:     0x562c86a1a7de - rustdoc[99b5189239f61b47]::passes::collect_intra_doc_links::collect_intra_doc_links
  29:     0x562c86a2973e - <rustc_session[6aba769f1422c309]::session::Session>::time::<rustdoc[99b5189239f61b47]::clean::types::Crate, rustdoc[99b5189239f61b47]::core::run_global_ctxt::{closure#7}>
  30:     0x562c86adbdab - rustdoc[99b5189239f61b47]::core::run_global_ctxt
  31:     0x562c86a299c9 - <rustc_session[6aba769f1422c309]::session::Session>::time::<(rustdoc[99b5189239f61b47]::clean::types::Crate, rustdoc[99b5189239f61b47]::config::RenderOptions, rustdoc[99b5189239f61b47]::formats::cache::Cache), rustdoc[99b5189239f61b47]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
  32:     0x562c868c7527 - <rustc_middle[267d604f42fb2b42]::ty::context::GlobalCtxt>::enter::<rustdoc[99b5189239f61b47]::main_args::{closure#1}::{closure#0}::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>
  33:     0x562c868c6500 - <rustc_interface[dce09aa29aba2b19]::interface::Compiler>::enter::<rustdoc[99b5189239f61b47]::main_args::{closure#1}::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>
  34:     0x562c86a5483b - rustc_span[48752dc4b679ffbb]::with_source_map::<core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>, rustc_interface[dce09aa29aba2b19]::interface::run_compiler<core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>, rustdoc[99b5189239f61b47]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  35:     0x562c868c9bc4 - <scoped_tls[f64df8b0bc44aebd]::ScopedKey<rustc_span[48752dc4b679ffbb]::SessionGlobals>>::set::<rustc_interface[dce09aa29aba2b19]::interface::run_compiler<core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>, rustdoc[99b5189239f61b47]::main_args::{closure#1}>::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>
  36:     0x562c86a63500 - std[f9545795ea4997bf]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[dce09aa29aba2b19]::util::run_in_thread_pool_with_globals<rustc_interface[dce09aa29aba2b19]::interface::run_compiler<core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>, rustdoc[99b5189239f61b47]::main_args::{closure#1}>::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>
  37:     0x562c86b084fd - <<std[f9545795ea4997bf]::thread::Builder>::spawn_unchecked_<rustc_interface[dce09aa29aba2b19]::util::run_in_thread_pool_with_globals<rustc_interface[dce09aa29aba2b19]::interface::run_compiler<core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>, rustdoc[99b5189239f61b47]::main_args::{closure#1}>::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ee581b2e0272cb3e]::result::Result<(), rustc_span[48752dc4b679ffbb]::ErrorGuaranteed>>::{closure#1} as core[ee581b2e0272cb3e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  38:     0x7f9010002c13 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h31d31ee934fae5d7
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/alloc/src/boxed.rs:1988:9
  39:     0x7f9010002c13 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h235705d08d5be362
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/alloc/src/boxed.rs:1988:9
  40:     0x7f9010002c13 - std::sys::unix::thread::Thread::new::thread_start::h8f78f28fa2155287
                               at /rustc/a266f11990d9544ee408e213e1eec8cc9eb032b7/library/std/src/sys/unix/thread.rs:108:17
  41:     0x7f900fc571da - <unknown>
  42:     0x7f900fcdff44 - __clone
  43:                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.70.0-nightly (a266f1199 2023-03-22) 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/deck/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.36.10/src/lib.rs --cap-lints allow -o /home/deck/Documents/scratchpad/target/doc --cfg 'feature="all-apis"' --cfg 'feature="default"' --cfg 'feature="fs"' --cfg 'feature="io-lifetimes"' --cfg 'feature="io_uring"' --cfg 'feature="itoa"' --cfg 'feature="libc"' --cfg 'feature="mm"' --cfg 'feature="net"' --cfg 'feature="once_cell"' --cfg 'feature="param"' --cfg 'feature="process"' --cfg 'feature="procfs"' --cfg 'feature="rand"' --cfg 'feature="runtime"' --cfg 'feature="std"' --cfg 'feature="termios"' --cfg 'feature="thread"' --cfg 'feature="time"' --cfg 'feature="use-libc-auxv"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=125 -C metadata=c602430f872de611 -L dependency=/home/deck/Documents/scratchpad/target/debug/deps --extern bitflags=/home/deck/Documents/scratchpad/target/debug/deps/libbitflags-f75283d3dcd3daad.rmeta --extern io_lifetimes=/home/deck/Documents/scratchpad/target/debug/deps/libio_lifetimes-4c970ac99651d72e.rmeta --extern itoa=/home/deck/Documents/scratchpad/target/debug/deps/libitoa-85f7878b85724230.rmeta --extern libc=/home/deck/Documents/scratchpad/target/debug/deps/liblibc-8aab922602f2fc15.rmeta --extern linux_raw_sys=/home/deck/Documents/scratchpad/target/debug/deps/liblinux_raw_sys-a31463b73c270e13.rmeta --extern once_cell=/home/deck/Documents/scratchpad/target/debug/deps/libonce_cell-ca06155735a0ee9b.rmeta --crate-version 0.36.10 --cfg rustc_attrs --cfg linux_raw --cfg core_intrinsics --cfg asm` (exit status: 101)

whose repro is creating a dependency on rustix = "=0.36.10" followed by cargo +nightly doc, using nightly 1.70.0-nightly (a266f1199 2023-03-22) on x86_64-unknown-linux-gnu. (rustix 0.37 does not trigger it; nor does building on macOS instead of Linux.)

@clubby789
Copy link
Contributor

clubby789 commented Mar 26, 2023

https://github.com/bytecodealliance/rustix/blob/5caa325f24cbb421c54fb4416c21888865a0c3b1/src/io/read_write.rs#L14 is the line which the ICE occurs on. bytecodealliance/rustix#539 removed this line which is why the ICE goes away


Bisection

Regression in rust-lang-ci@6cfb8fd -> #109266
searched nightlies: from nightly-2023-03-19 to nightly-2023-03-23
regressed nightly: nightly-2023-03-21
searched commit range: da7c50c...44f5180
regressed commit: febd59e

bisected with cargo-bisect-rustc v0.6.5

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc 2023-03-19 --end 2023-03-23 --regress=ice --script=script.sh 
cc @petrochenkov

@jyn514 jyn514 added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Mar 26, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 26, 2023
@apiraino
Copy link
Contributor

For reference, I think this regression could be a P-high (wasn't labelled so).

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Mar 27, 2023
@apiraino
Copy link
Contributor

Potentially solved by #109330

@petrochenkov
Copy link
Contributor

Not fixed by #109330, but fixed by #109500.

rraval added a commit to rraval/workflows that referenced this issue Apr 8, 2023
Nightly is currently running into ICEs (possibly
rust-lang/rust#109424) and it's not worth
breaking CI for an index page.
rraval added a commit to rraval/workflows that referenced this issue Apr 8, 2023
Nightly is currently running into ICEs (possibly
rust-lang/rust#109424) and it's not worth
breaking CI for an index page.
@bors bors closed this as completed in 7201301 Apr 9, 2023
aqrln added a commit to prisma/prisma-engines that referenced this issue May 8, 2023
Update rustix with `cargo update -p rustix`.

This should work around the ICE that happens when running `cargo doc`
on CI: https://github.com/prisma/prisma-engines/actions/runs/4915235114/jobs/8777494487.

The ICE is already fixed in beta and nightly but not in stable
yet (rust-lang/rust#109424). Newer versions
of rustix than we have don't trigger the bug because it was worked
around in bytecodealliance/rustix#627.
aqrln added a commit to prisma/prisma-engines that referenced this issue May 8, 2023
Update rustix with `cargo update -p rustix`.

This should work around the ICE that happens when running `cargo doc`
on CI: https://github.com/prisma/prisma-engines/actions/runs/4915235114/jobs/8777494487.

The ICE is already fixed in beta and nightly but not in stable
yet (rust-lang/rust#109424). Newer versions
of rustix than we have don't trigger the bug because it was worked
around in bytecodealliance/rustix#627.
thomcc pushed a commit to tcdi/postgrestd that referenced this issue Jun 1, 2023
resolve: Preserve reexport chains in `ModChild`ren

This may be potentially useful for
- avoiding uses of `hir::ItemKind::Use` (which usually lead to correctness issues)
- preserving documentation comments on all reexports, including those from other crates
- preserving and checking stability/deprecation info on reexports
- all kinds of diagnostics

The second commit then migrates some hacky logic from rustdoc to `module_reexports` to make it simpler and more correct.
Ideally rustdoc should use `module_reexports` immediately at the top level, so `hir::ItemKind::Use`s are never used.
The second commit also fixes issues with rust-lang/rust#109330 and therefore
Fixes rust-lang/rust#109631
Fixes rust-lang/rust#109614
Fixes rust-lang/rust#109424
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) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants