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

1.74 causes an internal compiler error: broken MIR in Item #2260

Closed
Haaroon opened this issue Nov 16, 2023 · 3 comments
Closed

1.74 causes an internal compiler error: broken MIR in Item #2260

Haaroon opened this issue Nov 16, 2023 · 3 comments

Comments

@Haaroon
Copy link

Haaroon commented Nov 16, 2023

Describe the bug

  • What did you do?

compiled latest tantivy on latest rust

  • What happened?

it didnt compile and broke

  • What was expected?

that it compiles

Meta

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

Error output

    Compiling tantivy v0.20.2
   Compiling raphtory v0.6.1 (/home/runner/work/Raphtory/Raphtory/raphtory)
error: internal compiler error: no errors encountered even though `delay_span_bug` issued


error: internal compiler error: broken MIR in Item(DefId(0:7815 ~ tantivy[41bc]::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:18126 ~ tantivy[41bc]::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_compiler::{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>, rustc_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::run_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: <unknown>
        24: <unknown>
 --> /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%2C+I-ICE%2C+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 rlib -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)
warning: build failed, waiting for other jobs to finish...
warning: unused import: `TimeIndex`
 --> raphtory/src/db/graph/views/deletion_graph.rs:8:38
  |
8 |         storage::timeindex::{AsTime, TimeIndex, TimeIndexEntry, TimeIndexOps},
  |                                      ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default


warning: unused import: `window_graph::WindowedGraph`
  --> raphtory/src/python/graph/edge.rs:27:17
   |
27 |                 window_graph::WindowedGraph,
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^


warning: unused import: `window_graph::WindowedGraph`
  --> raphtory/src/python/graph/vertex.rs:24:17
   |
24 |                 window_graph::WindowedGraph,
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^


warning: unused variable: `active`
   --> raphtory/src/db/graph/views/deletion_graph.rs:280:13
    |
280 |         let active = e.active(layer_ids, w.clone());
    |             ^^^^^^ help: if this is intentional, prefix it with an underscore: `_active`
    |
    = note: `#[warn(unused_variables)]` on by default


warning: unused variable: `alive`
   --> raphtory/src/db/graph/views/deletion_graph.rs:281:13
    |
281 |         let alive = self.edge_alive_at(e, w.start, layer_ids);
    |             ^^^^^ help: if this is intentional, prefix it with an underscore: `_alive`


warning: fields `content` and `entity` are never read
  --> raphtory/src/python/packages/vectors.rs:25:5
   |
24 | struct PyGraphDocument {
   |        --------------- fields in this struct
25 |     content: String,
   |     ^^^^^^^
26 |     entity: PyObject,
   |     ^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default


warning: 6 warnings emitted


💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `"cargo" "rustc" "--release" "--features" "pyo3/extension-module" "--message-format" "json" "--lib"`
Error: The process '/home/runner/work/_temp/96516ff6-5310-4537-8510-8a8e1cea03b2/maturin' failed with exit code 1
Error: The process '/home/runner/work/_temp/96516ff6-5310-4537-8510-8a8e1cea03b2/maturin' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1702:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1685:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1579:27)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
```

see action for more https://github.com/Pometry/Raphtory/actions/runs/6891668769/job/18749095180

see rust issue rust-lang/rust#117976

@samhclark
Copy link

I see the same issue with Tantivy v0.21.1. Building in debug works (cargo build) but it fails when building release (cargo build --release) with Rust 1.74.

@tkreuder
Copy link

tkreuder commented Dec 5, 2023

same here. Thanks a lot @samhclark for your hint, that the non-release version builds without issues (in my case on Mac).

@trinity-1686a
Copy link
Contributor

this is fixed in Rust 1.74.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants