Skip to content

ICE when building docs on nightly with unstable options and index page in github actions #95741

Closed
@jbr

Description

@jbr

Code

I have no idea, I think it's within rustdoc? rustc_resolve[63bbea3e439f8aba]::Resolver>::resolve_rustdoc_path

Here's everything I know about this ICE: https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:711 (let me know if for some reason that's not visible, backtrace copy-pasted below in case you can't view the actions build)

RUSTDOCFLAGS="-Z unstable-options --enable-index-page" cargo +nightly doc --no-deps --all --features smol
  shell: /usr/bin/bash -e {0}
…snip…
thread 'rustc' panicked at 'internal error: entered unreachable code', compiler/rustc_resolve/src/lib.rs:3302:67
stack backtrace:
   0:     0x7faa63acfdbd - std::backtrace_rs::backtrace::libunwind::trace::hed55b2655d2d24d4
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7faa63acfdbd - std::backtrace_rs::backtrace::trace_unsynchronized::hdb09b6d01f28fc36
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7faa63acfdbd - std::sys_common::backtrace::_print_fmt::h85d73dd15e59a966
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7faa63acfdbd - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h467642c35f832dfc
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7faa63b29bfc - core::fmt::write::h80ceeb54ece7aa73
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/fmt/mod.rs:1194:17
   5:     0x7faa63ac1671 - std::io::Write::write_fmt::hdad4cd8743ef8ba3
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/io/mod.rs:1655:15
   6:     0x7faa63ad2ce5 - std::sys_common::backtrace::_print::h7e8d4c312968a3a4
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7faa63ad2ce5 - std::sys_common::backtrace::print::he2f355[20](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:20)19b2ee9b
                               at /rustc/306ba8357fb36[21](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:21)2b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7faa63ad2ce5 - std::panicking::default_hook::{{closure}}::hf0781cd99cbd97bb
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:295:[22](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:22)
   9:     0x7faa63ad2959 - std::panicking::default_hook::h3afb6754f35bb197
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:314:9
  10:     0x7faa642722b1 - rustc_driver[7757471c[23](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:23)bcdd79]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7faa5488c2c3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h8cb54594eb90fb20
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1875:9
  12:     0x7faa5489272c - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::he8b9d31b85c6a4f2
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/proc_macro/src/bridge/client.rs:319:21
  13:     0x7faa548b4410 - std::panicking::update_hook::{{closure}}::hc87592eb7d261a30
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:258:41
  14:     0x7faa63ad3480 - std::panicking::rust_panic_with_hook::he026b558348e638c
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:702:17
  15:     0x7faa63ad3279 - std::panicking::begin_panic_handler::{{closure}}::h7d8266517b3a97b3
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:586:13
  16:     0x7faa63ad0274 - std::sys_common::backtrace::__rust_end_short_backtrace::hd820e490164f416e
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/sys_common/backtrace.rs:138:18
  17:     0x7faa63ad2fe9 - rust_begin_unwind
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/std/src/panicking.rs:584:5
  18:     0x7faa63a97603 - core::panicking::panic_fmt::h8045f7299830fe26
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/panicking.rs:143:14
  19:     0x7faa63a974cd - core::panicking::panic::heafaed44edc5d2f0
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/core/src/panicking.rs:48:5
  20:     0x7faa646c6bac - <rustc_resolve[63bbea3e439f8aba]::Resolver>::resolve_rustdoc_path
  21:     0x55e1862fddb0 - <rustdoc[4dafd65c5212ebd7]::core::DocContext>::enter_resolver::<<rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve_path::{closure#0}, core[93896c7deb4583e1]::option::Option<rustc_hir[f54027a8bc11733a]::def::Res<rustc_ast[6b1b21165e8c3805]::node_id::NodeId>>>
  22:     0x55e1862b8a87 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve_path
  23:     0x55e1862b96e7 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector>::resolve
  [24](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:24):     0x55e1862bf623 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  [25](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:25):     0x55e1862cc88a - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_inner_recur
  [26](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:26):     0x55e1862c2cf4 - <rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::LinkCollector as rustdoc[4dafd65c5212ebd7]::visit::DocVisitor>::visit_item
  [27](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:27):     0x55e1862b7f5c - rustdoc[4dafd65c5212ebd7]::passes::collect_intra_doc_links::collect_intra_doc_links
  [28](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:28):     0x55e1862d2602 - <rustc_session[93cf466beccfe173]::session::Session>::time::<(rustdoc[4dafd65c5212ebd7]::clean::types::Crate, rustdoc[4dafd65c5212ebd7]::config::RenderOptions, rustdoc[4dafd65c5212ebd7]::formats::cache::Cache), rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}::{closure#1}::{closure#0}>
  [29](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:29):     0x55e186361496 - <rustc_interface[3aa5dcd3b29cadd6]::passes::QueryContext>::enter::<rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}::{closure#1}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  [30](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:30):     0x55e18625c229 - <rustc_interface[3aa5dcd3b29cadd6]::interface::Compiler>::enter::<rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f10[31](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:31)c6d896b]::ErrorGuaranteed>>
  31:     0x55e1860cb936 - rustc_span[783d01233175f916]::with_source_map::<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustc_interface[3aa5dcd3b29cadd6]::interface::create_compiler_and_run<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}>::{closure#1}>
  [32](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:32):     0x55e18625e9d4 - rustc_interface[3aa5dcd3b29cadd6]::interface::create_compiler_and_run::<core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>, rustdoc[4dafd65c5212ebd7]::main_options::{closure#0}>
  [33](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:33):     0x55e1860e6e9b - rustdoc[4dafd65c5212ebd7]::main_options
  [34](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:34):     0x55e18610eadb - <scoped_tls[be19827943045dee]::ScopedKey<rustc_span[783d01233175f916]::SessionGlobals>>::set::<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  [35](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:35):     0x55e1862842af - std[be2b2098f2565a09]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3aa5dcd3b29cadd6]::util::run_in_thread_pool_with_globals<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>
  [36](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:36):     0x55e18631ee69 - <<std[be2b2098f2565a09]::thread::Builder>::spawn_unchecked_<rustc_interface[3aa5dcd3b29cadd6]::util::run_in_thread_pool_with_globals<rustdoc[4dafd65c5212ebd7]::main_args::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#0}, core[93896c7deb4583e1]::result::Result<(), rustc_errors[46e0f1031c6d896b]::ErrorGuaranteed>>::{closure#1} as core[93896c7deb4583e1]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  [37](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:37):     0x7faa63add553 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5e2ec464c6633a37
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1861:9
  [38](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:38):     0x7faa63add553 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0630748fae134b06
                               at /rustc/306ba8357fb36212b7d30efb9eb9e41659ac1445/library/alloc/src/boxed.rs:1861:9
  [39](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:39):     0x7faa63add553 - std::sys::unix::thread::Thread::new::thread_start::h9[40](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:40)0fecba0bc7090
                               at /rustc/306ba8357fb36212b7d30efb9eb9e[41](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:41)659ac1445/library/std/src/sys/unix/thread.rs:108:17
  40:     0x7faa63a08609 - start_thread
  41:     0x7faa637b1163 - clone
  [42](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:42):                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.62.0-nightly (306ba8357 2022-04-05) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -Z unstable-options

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

query stack during panic:
end of query stack
error: could not document `trillium-sessions`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2021 --crate-type lib --crate-name trillium_sessions sessions/src/lib.rs -o /home/runner/work/trillium/trillium/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=12321cb8191f5e40 -L dependency=/home/runner/work/trillium/trillium/target/debug/deps --extern async_session=/home/runner/work/trillium/trillium/target/debug/deps/libasync_session-00f6e023d1b2ebd9.rmeta --extern log=/home/runner/work/trillium/trillium/target/debug/deps/liblog-f31e65a78c846cb0.rmeta --extern trillium=/home/runner/work/trillium/trillium/target/debug/deps/libtrillium-5[44](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:44)8a84ec6[46](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:46)9c06.rmeta --extern trillium_cookies=/home/runner/work/trillium/trillium/target/debug/deps/libtrillium_cookies-a25b77e[47](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:47)2b[78](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:78)0c5.rmeta -Z unstable-options --enable-index-page --crate-version 0.2.0` (exit status: [101](https://github.com/trillium-rs/trillium/runs/5858209248?check_suite_focus=true#step:4:101))
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions