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

Unexpected compiler error when comiling kube-rs docs on nightly #108501

Closed
jmintb opened this issue Feb 26, 2023 · 5 comments · Fixed by #109312
Closed

Unexpected compiler error when comiling kube-rs docs on nightly #108501

jmintb opened this issue Feb 26, 2023 · 5 comments · Fixed by #109312
Assignees
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jmintb
Copy link
Contributor

jmintb commented Feb 26, 2023

I do not have a minimal example :(

When compiling the docs for kube-rs, I get the error outlined below. The command used is:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_26 --open

I believe I am hitting the same issue as mentioned here: kube-rs/kube#1150

Edit: included the stack tract with RUST_BACKTRACE=full

Code

no code :(

Meta

rustc --version --verbose:

rustc 1.69.0-nightly (34e6673a0 2023-02-25)
binary: rustc
commit-hash: 34e6673a0473e90ef01a18eb575392c9e3859747
commit-date: 2023-02-25
host: x86_64-unknown-linux-gnu
release: 1.69.0-nightly
LLVM version: 15.0.7

Error output

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-nightly (34e6673a0 2023-02-25) 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 `kube`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name kube kube/src/lib.rs -o /home/jmintb/Sync/lab/kube-rs/target/doc --cfg 'feature="admission"' --cfg 'feature="client"' --cfg 'feature="config"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="gzip"' --cfg 'feature="jsonpatch"' --cfg 'feature="kube-client"' --cfg 'feature="kube-derive"' --cfg 'feature="kube-runtime"' --cfg 'feature="oauth"' --cfg 'feature="openssl-tls"' --cfg 'feature="runtime"' --cfg 'feature="ws"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=213 -C metadata=11109ba456e761de -L dependency=/home/jmintb/Sync/lab/kube-rs/target/debug/deps --extern k8s_openapi=/home/jmintb/Sync/lab/kube-rs/target/debug/deps/libk8s_openapi-210f27282fabe8a6.rmeta --extern kube_client=/home/jmintb/Sync/lab/kube-rs/target/debug/deps/libkube_client-660b0ca36bfd5041.rmeta --extern kube_core=/home/jmintb/Sync/lab/kube-rs/target/debug/deps/libkube_core-e8fc2ef218cbbbb5.rmeta --extern kube_derive=/home/jmintb/Sync/lab/kube-rs/target/debug/deps/libkube_derive-b6f0793aecc89674.so --extern kube_runtime=/home/jmintb/Sync/lab/kube-rs/target/debug/deps/libkube_runtime-5247cd07dcbef488.rmeta --cfg docsrs --crate-version 0.79.0` (exit status: 101)
Backtrace

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_26 --open
 Documenting kube v0.79.0 (/home/jmintb/Sync/lab/kube-rs/kube)
thread 'rustc' panicked at 'no resolution for "kube_runtime" MacroNS DefId(21:0 ~ kube_runtime[d02f])', src/librustdoc/passes/collect_intra_doc_links.rs:391:32
stack backtrace:
   0:     0x7fd19622da8a - std::backtrace_rs::backtrace::libunwind::trace::hf2766cee31f78014
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fd19622da8a - std::backtrace_rs::backtrace::trace_unsynchronized::hf36691cebf29277a
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fd19622da8a - std::sys_common::backtrace::_print_fmt::hffbf40bd0669bae4
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7fd19622da8a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7ad105c28858c097
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys_common/backtrace.rs:44:22                                                                                                                                                             
   4:     0x7fd19628da0e - core::fmt::write::h919381681baa7a0b                                                                                                                                                                                                                                                             at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/core/src/fmt/mod.rs:1232:17                                                                                                                                                                          5:     0x7fd19621de35 - std::io::Write::write_fmt::h712066bff563416b                                                                                                                                                                                                                                                    at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/io/mod.rs:1684:15                                                                                                                                                                         
   6:     0x7fd19622d855 - std::sys_common::backtrace::_print::h89608a795bfdc42d
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7fd19622d855 - std::sys_common::backtrace::print::ha3cef17b650a8d12
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7fd1962305cf - std::panicking::default_hook::{{closure}}::ha4d98de271a804e6                                                                                                                                                                                                     
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/panicking.rs:271:22
   9:     0x7fd19623030b - std::panicking::default_hook::h7f0e090a32d9c25f
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/panicking.rs:290:9
  10:     0x7fd199570af5 - <rustc_driver_impl[921a34b63f8d495]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[df15197076ea29e4]::ops::function::FnOnce<(&core[df15197076ea29e4]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7fd196230e0d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h97d3c1efb26c5d4c
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/alloc/src/boxed.rs:2002:9
  12:     0x7fd196230e0d - std::panicking::rust_panic_with_hook::h5d8516e1de49fefa
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/panicking.rs:696:13
  13:     0x7fd196230b89 - std::panicking::begin_panic_handler::{{closure}}::hdee363c132339f2f
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/panicking.rs:583:13
  14:     0x7fd19622def6 - std::sys_common::backtrace::__rust_end_short_backtrace::h01c64d2e075fc45c
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys_common/backtrace.rs:137:18
  15:     0x7fd196230892 - rust_begin_unwind
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/panicking.rs:579:5
  16:     0x7fd19628a3b3 - core::panicking::panic_fmt::hb65d4ce4e2307d2d
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/core/src/panicking.rs:64:14
  17:     0x562aefd9ae04 - <rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  18:     0x562aefd9af2e - <rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::LinkCollector>::resolve
  19:     0x562aefd9eb32 - <rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::LinkCollector as rustdoc[d3129993ceb2fb41]::visit::DocVisitor>::visit_item
  20:     0x562aefda802a - <rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::LinkCollector as rustdoc[d3129993ceb2fb41]::visit::DocVisitor>::visit_inner_recur
  21:     0x562aefda23ba - <rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::LinkCollector as rustdoc[d3129993ceb2fb41]::visit::DocVisitor>::visit_item
  22:     0x562aefd99882 - rustdoc[d3129993ceb2fb41]::passes::collect_intra_doc_links::collect_intra_doc_links
  23:     0x562aefce170e - <rustc_session[feb265819893f90]::session::Session>::time::<rustdoc[d3129993ceb2fb41]::clean::types::Crate, rustdoc[d3129993ceb2fb41]::core::run_global_ctxt::{closure#7}>
  24:     0x562aefe0db50 - rustdoc[d3129993ceb2fb41]::core::run_global_ctxt
  25:     0x562aefce1999 - <rustc_session[feb265819893f90]::session::Session>::time::<(rustdoc[d3129993ceb2fb41]::clean::types::Crate, rustdoc[d3129993ceb2fb41]::config::RenderOptions, rustdoc[d3129993ceb2fb41]::formats::cache::Cache), rustdoc[d3129993ceb2fb41]::main_args::{closure#1
}::{closure#0}::{closure#0}::{closure#0}>
  26:     0x562aefbe0947 - <rustc_middle[a3c172b61b1a9dcc]::ty::context::GlobalCtxt>::enter::<rustdoc[d3129993ceb2fb41]::main_args::{closure#1}::{closure#0}::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>>
  27:     0x562aefc4c720 - <rustc_interface[13c4583830495995]::interface::Compiler>::enter::<rustdoc[d3129993ceb2fb41]::main_args::{closure#1}::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>>
  28:     0x562aefce0cab - rustc_span[d2a99e845eee75b5]::with_source_map::<core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>, rustc_interface[13c4583830495995]::interface::run_compiler<core[df15197076ea29e4]::result::Result<(), rustc_errors[2
3d500b1f4d61315]::ErrorGuaranteed>, rustdoc[d3129993ceb2fb41]::main_args::{closure#1}>::{closure#0}::{closure#0}>
  29:     0x562aefbbdd34 - <scoped_tls[7ec87721c8cb8d70]::ScopedKey<rustc_span[d2a99e845eee75b5]::SessionGlobals>>::set::<rustc_interface[13c4583830495995]::interface::run_compiler<core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>, rustdoc[d3
129993ceb2fb41]::main_args::{closure#1}>::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>>
  30:     0x562aefcf9660 - std[e4fd71d079036e01]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[13c4583830495995]::util::run_in_thread_pool_with_globals<rustc_interface[13c4583830495995]::interface::run_compiler<core[df15197076ea29e4]::result::Result<(), rustc
_errors[23d500b1f4d61315]::ErrorGuaranteed>, rustdoc[d3129993ceb2fb41]::main_args::{closure#1}>::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_error
s[23d500b1f4d61315]::ErrorGuaranteed>>
  31:     0x562aefdc3d4d - <<std[e4fd71d079036e01]::thread::Builder>::spawn_unchecked_<rustc_interface[13c4583830495995]::util::run_in_thread_pool_with_globals<rustc_interface[13c4583830495995]::interface::run_compiler<core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f
4d61315]::ErrorGuaranteed>, rustdoc[d3129993ceb2fb41]::main_args::{closure#1}>::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d61315]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[df15197076ea29e4]::result::Result<(), rustc_errors[23d500b1f4d6131
5]::ErrorGuaranteed>>::{closure#1} as core[df15197076ea29e4]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  32:     0x7fd19623ac93 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4d3cc1fadafd8bb6
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/alloc/src/boxed.rs:1988:9
  33:     0x7fd19623ac93 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h217aba05dd254767
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/alloc/src/boxed.rs:1988:9
  34:     0x7fd19623ac93 - std::sys::unix::thread::Thread::new::thread_start::h70cdd9aaa3576906
                               at /rustc/34e6673a0473e90ef01a18eb575392c9e3859747/library/std/src/sys/unix/thread.rs:108:17
  35:     0x7fd195f88ff2 - start_thread
  36:     0x7fd19600bbfc - clone3
  37:                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-nightly (34e6673a0 2023-02-25) 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

@jmintb jmintb 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 Feb 26, 2023
@Noratrieb Noratrieb added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Feb 26, 2023
@Noratrieb
Copy link
Member

probably a duplicate of #108334

@petrochenkov petrochenkov self-assigned this Feb 27, 2023
@clux
Copy link

clux commented Mar 1, 2023

The line that broke in kube seems to be a combination of a doc comment with an inline re-export:

/// Re-exports from [`kube_core`](kube_core)
#[doc(inline)]
pub use kube_core as core;

in https://github.com/kube-rs/kube/blob/825aba81e124e4d5a3220ec2f33f64241021f49f/kube/src/lib.rs#L178-L180

changing the doc comment as noted in kube-rs/kube#1150 (comment) seems to avoid the error locally on latest nightly.

clux added a commit to kube-rs/kube that referenced this issue Mar 1, 2023
See #1150
and rust-lang/rust#108501

Signed-off-by: clux <sszynrae@gmail.com>
clux added a commit to kube-rs/kube that referenced this issue Mar 1, 2023
Bypass nightly docs ICE build

See #1150
and rust-lang/rust#108501

Signed-off-by: clux <sszynrae@gmail.com>
@petrochenkov
Copy link
Contributor

petrochenkov commented Mar 17, 2023

Looks like this is not a duplicate of #108334 and is not fixed by #109266.

@petrochenkov
Copy link
Contributor

Found the reason and fixed this locally, will submit the fix soon.

@petrochenkov
Copy link
Contributor

Fixed in #109312.

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 21, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
Noratrieb added a commit to Noratrieb/rust that referenced this issue Mar 21, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
Noratrieb added a commit to Noratrieb/rust that referenced this issue Mar 21, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 21, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Mar 22, 2023
…omez

rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang#93805 anyway.
@bors bors closed this as completed in af3bd22 Mar 22, 2023
oli-obk pushed a commit to oli-obk/miri that referenced this issue Mar 23, 2023
rustdoc: Cleanup parent module tracking for doc links

Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.

Fixes rust-lang/rust#108501.
That issue could be fixed in a more local way, but this refactoring is something that I wanted to do since rust-lang/rust#93805 anyway.
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. 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.

4 participants