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

broken MIR in tantivy #118181

Closed
ahcm opened this issue Nov 22, 2023 · 1 comment
Closed

broken MIR in tantivy #118181

ahcm opened this issue Nov 22, 2023 · 1 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.

Comments

@ahcm
Copy link

ahcm commented Nov 22, 2023

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(DefId(0:7908 ~ tantivy[1de3]::store::reader::{impl#3}::iter_raw::{closure#2})) (after phase change to runtime-optimized) at bb2[6]:
                                Alias(Opaque, AliasTy { args: [ReErased], def_id: DefId(0:18076 ~ tantivy[1de3]::store::reader::{impl#3}::block_checkpoints::{opaque#0}) }) does not have fields
 --> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/iter/adapters/flatten.rs:52:9
  |
note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:94:25
         0: <rustc_errors::HandlerInner>::emit_diagnostic
         1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, alloc::string::String>
         2: <rustc_const_eval::transform::validate::CfgChecker>::fail::<alloc::string::String>
         3: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
         4: rustc_mir_transform::pass_manager::run_passes
         5: rustc_mir_transform::optimized_mir
         6: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
         7: <rustc_query_impl::query_impl::optimized_mir::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId)>>::call_once
         8: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, rustc_middle::query::erase::Erased<[u8; 8]>>,
 false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
         9: rustc_query_impl::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
        10: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
        11: rustc_metadata::rmeta::encoder::encode_metadata_impl
        12: rustc_data_structures::sync::parallel::disabled::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
        13: rustc_metadata::rmeta::encoder::encode_metadata
        14: rustc_metadata::fs::encode_and_write_metadata
        15: rustc_interface::passes::start_codegen
        16: <rustc_middle::ty::context::GlobalCtxt>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_span::ErrorGuaranteed>>
        17: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compil
er::{closure#1}>::{closure#0}::{closure#0}>
        18: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rust
c_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
        19: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::ru
n_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<(
)>>::call_once::{shim:vtable#0}
        20: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2007:9
        21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
                   at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/alloc/src/boxed.rs:2007:9
        22: std::sys::unix::thread::Thread::new::thread_start
                   at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/sys/unix/thread.rs:108:17
        23: start_thread
                   at ./nptl/pthread_create.c:442:8
        24: __GI___clone3
                   at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 --> /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/iter/adapters/flatten.rs:52:9

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug, I-ICE, T-compiler&template=ice.md

note: rustc 1.74.0 (79e9716c9 2023-11-13) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no

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

query stack during panic:
end of query stack
error: could not compile `tantivy` (lib)
@ahcm ahcm 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 Nov 22, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 22, 2023
@lqd
Copy link
Member

lqd commented Nov 22, 2023

Thanks for opening an issue! This is a duplicate of #117976, so I'll close this one as such. This problem is already fixed on beta and nightly, and should also be fixed on stable when/if a future backport of #116415 happens.

@lqd lqd closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 23, 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