rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.16k stars 12.69k forks source link

broken MIR (after phase change to runtime-optimized): Field projection specified type `BoxResolver`, but actual type is `<With as Archive>::Resolver` #110358

Closed happysalada closed 1 year ago

happysalada commented 1 year ago

I unfortunately don't have a minimum reproducible pattern. The code is from vector (vector.dev)

here is the full stack trace

Code

the source for the code can be found in github.com/vectordotdev/vector

Meta

using rust 1.68.2

Error output

I've actually got 3 errors

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2578 ~ vector_buffers[
                                Field projection `_3.field[3]` specified type `rkyv::boxed::BoxResolver<()
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:19
   |
46 | #[derive(Archive, Serialize, Debug)]
   |                   ^^^^^^^^^
   |
   = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
              1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string
              2: <rustc_const_eval::transform::validate::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              6: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pas
              7: rustc_mir_transform::pass_manager::run_passes_inner
              8: rustc_mir_transform::optimized_mir
              9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optim
             10: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             11: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             12: rustc_metadata::rmeta::encoder::encode_metadata_impl
             13: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{clo
             14: rustc_metadata::rmeta::encoder::encode_metadata
             15: rustc_metadata::fs::encode_and_write_metadata
             16: rustc_interface::passes::start_codegen
             17: <rustc_interface::queries::Queries>::ongoing_codegen
             18: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::ru
             19: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_
             20: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_
             21: std::sys::unix::thread::Thread::new::thread_start
             22: start_thread
             23: __clone3

   = note: this error: internal compiler error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

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.68.2 (9eb3afe9e 2023-03-27) (built from a source tarball) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C linker=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/cc -C link-args=-rdynamic -C target-feature=-crt-static

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

query stack during panic:
end of query stack
error: could not compile `vector-buffers`
             17: rustc_interface::passes::start_codegen
             18: <rustc_interface::queries::Queries>::ongoing_codegen
             19: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::ru
             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_
             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_
             22: std::sys::unix::thread::Thread::new::thread_start
             23: start_thread
             24: __clone3

   = note: this error: internal compiler error originates in the macro `::core::ptr::addr_of_mut` which co

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2569 ~ vector_buffers[
                                Field projection `_3.field[3]` specified type `rkyv::boxed::BoxResolver<()
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:10
   |
46 | #[derive(Archive, Serialize, Debug)]
   |          ^^^^^^^
   |
   = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
              1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string
              2: <rustc_const_eval::transform::validate::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              6: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              7: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pas
              8: rustc_mir_transform::pass_manager::run_passes_inner
              9: rustc_mir_transform::optimized_mir
             10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optim
             11: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             12: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             13: rustc_metadata::rmeta::encoder::encode_metadata_impl
             14: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
             15: rustc_metadata::rmeta::encoder::encode_metadata
             16: rustc_metadata::fs::encode_and_write_metadata
             17: rustc_interface::passes::start_codegen
             18: <rustc_interface::queries::Queries>::ongoing_codegen
             19: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             22: std::sys::unix::thread::Thread::new::thread_start
             23: start_thread
             24: __clone3

   = note: this error: internal compiler error originates in the derive macro `Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
   Compiling vrl v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling zstd v0.11.2+zstd.1.5.2
   Compiling zstd v0.12.3+zstd.1.5.2
   Compiling vector-common v0.1.0 (/build/source/lib/vector-common)
   Compiling vector-lookup v0.1.0 (/build/source/lib/vector-lookup)
   Compiling async-compression v0.3.15
   Compiling rdkafka v0.29.0
   Compiling file-source v0.1.0 (/build/source/lib/file-source)
   Compiling enrichment v0.1.0 (/build/source/lib/enrichment)
   Compiling vector-buffers v0.1.0 (/build/source/lib/vector-buffers)
   Compiling vrl-stdlib v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling tower-http v0.4.0
   Compiling vrl-cli v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling vector-vrl-functions v0.1.0 (/build/source/lib/vector-vrl/functions)
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2569 ~ vector_buffers[
                                Field projection `(*_4).field[3]` specified type `rkyv::boxed::ArchivedBox
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:10
   |
46 | #[derive(Archive, Serialize, Debug)]
   |          ^^^^^^^
   |
   = note: delayed at    0: <rustc_errors::HandlerInner>::emit_diagnostic
              1: <rustc_errors::Handler>::delay_span_bug::<rustc_span::span_encoding::Span, &alloc::string
              2: <rustc_const_eval::transform::validate::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              6: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>
              7: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pas
              8: rustc_mir_transform::pass_manager::run_passes_inner
              9: rustc_mir_transform::optimized_mir
             10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optim
             11: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             12: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             13: rustc_metadata::rmeta::encoder::encode_metadata_impl
             14: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{clo
             15: rustc_metadata::rmeta::encoder::encode_metadata
             16: rustc_metadata::fs::encode_and_write_metadata
             17: rustc_interface::passes::start_codegen
             18: <rustc_interface::queries::Queries>::ongoing_codegen
             19: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::ru
             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             22: std::sys::unix::thread::Thread::new::thread_start
             23: start_thread
             24: __clone3

   = note: this error: internal compiler error originates in the macro `::core::ptr::addr_of_mut` which comes from the expansion of the derive macro `Archive` (in Nightly builds, run with -Z macro-backtrace for more info)
Backtrace

``` ```

happysalada commented 1 year ago

reproducing the error should be done with nix from the repo github.com/nixOS/nixpkgs trying nix-build -A vector and you will get the error.

cjgillot commented 1 year ago

The backtrace is truncated on the right. Could you complete the message with what happens after the 80th column?

jyn514 commented 1 year ago

Looks like MIR is missing a normalize() call somewhere?

happysalada commented 1 year ago

here is the full trace again

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/w4vbp75lxgq5x2w7dy94f6d6d8p81rwh-source
source root is source
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
substituteStream(): WARNING: pattern '"transforms-geoip",' doesn't match anything in file './Cargo.toml'
Executing cargoSetupPostPatchHook
Validating consistency between /build/source/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
Finished cargoSetupPostPatchHook
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing cargoBuildHook
++ env CC_x86_64-unknown-linux-gnu=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/c++ cargo build -j 8 --target x86_64-unknown-linux-gnu --frozen --release --no-default-features --features=api,api-client,enrichment-tables,sinks,sources,transforms,vrl-cli,unix
   Compiling proc-macro2 v1.0.55
   Compiling quote v1.0.26
   Compiling unicode-ident v1.0.5
   Compiling libc v0.2.140
   Compiling autocfg v1.1.0
   Compiling serde_derive v1.0.159
   Compiling cfg-if v1.0.0
   Compiling syn v1.0.109
   Compiling serde v1.0.159
   Compiling once_cell v1.17.1
   Compiling version_check v0.9.4
   Compiling memchr v2.5.0
   Compiling log v0.4.17
   Compiling pin-project-lite v0.2.9
   Compiling futures-core v0.3.28
   Compiling lock_api v0.4.9
   Compiling itoa v1.0.4
   Compiling parking_lot_core v0.9.4
   Compiling futures-io v0.3.28
   Compiling ahash v0.7.6
   Compiling byteorder v1.4.3
   Compiling slab v0.4.7
   Compiling scopeguard v1.1.0
   Compiling syn v2.0.10
   Compiling indexmap v1.9.3
   Compiling futures-sink v0.3.28
   Compiling libm v0.2.6
   Compiling num-traits v0.2.15
   Compiling futures-task v0.3.28
   Compiling getrandom v0.2.8
   Compiling jobserver v0.1.25
   Compiling cc v1.0.77
   Compiling iovec v0.1.4
   Compiling hashbrown v0.12.3
   Compiling futures-channel v0.3.28
   Compiling bytes v0.4.12
   Compiling socket2 v0.4.7
   Compiling futures-util v0.3.28
   Compiling futures v0.1.31
   Compiling ryu v1.0.13
   Compiling pin-utils v0.1.0
   Compiling signal-hook-registry v1.4.0
   Compiling num-integer v0.1.45
   Compiling tracing-core v0.1.30
   Compiling mio v0.8.5
   Compiling bitflags v1.3.2
   Compiling pkg-config v0.3.26
   Compiling tokio-io v0.1.13
   Compiling ppv-lite86 v0.2.17
   Compiling num_cpus v1.14.0
   Compiling fnv v1.0.7
   Compiling rand_core v0.6.4
   Compiling tokio v1.26.0
   Compiling percent-encoding v2.2.0
   Compiling spin v0.5.2
   Compiling httparse v1.8.0
   Compiling rand_chacha v0.3.1
   Compiling thiserror v1.0.40
   Compiling base64 v0.13.1
   Compiling rand v0.8.5
   Compiling form_urlencoded v1.1.0
   Compiling futures-macro v0.3.28
   Compiling thiserror-impl v1.0.40
   Compiling typenum v1.15.0
   Compiling serde_json v1.0.95
   Compiling unicode-xid v0.2.4
   Compiling openssl-src v111.25.0+1.1.1t
   Compiling generic-array v0.14.6
   Compiling either v1.8.0
   Compiling openssl-sys v0.9.83
   Compiling tinyvec_macros v0.1.0
   Compiling tower-service v0.3.2
   Compiling tinyvec v1.6.0
   Compiling aho-corasick v0.7.20
   Compiling tracing-attributes v0.1.23
   Compiling tokio-macros v1.8.0
   Compiling pin-project-internal v1.0.12
   Compiling unicode-normalization v0.1.22
   Compiling regex-syntax v0.6.29
   Compiling unicode-bidi v0.3.8
   Compiling tracing v0.1.37
   Compiling pin-project v1.0.12
   Compiling regex v1.7.3
   Compiling httpdate v1.0.2
   Compiling try-lock v0.2.3
   Compiling want v0.3.0
   Compiling itertools v0.10.5
   Compiling heck v0.4.0
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.48
   Compiling foreign-types v0.3.2
   Compiling idna v0.3.0
   Compiling openssl-macros v0.1.0
   Compiling bytes v1.4.0
   Compiling smallvec v1.10.0
   Compiling ring v0.16.20
   Compiling parking_lot v0.12.1
   Compiling http v0.2.9
   Compiling http-body v0.4.5
   Compiling openssl-probe v0.1.5
   Compiling url v2.3.1
   Compiling lazy_static v1.4.0
   Compiling crypto-common v0.1.6
   Compiling untrusted v0.7.1
   Compiling time-core v0.1.0
   Compiling fixedbitset v0.4.2
   Compiling time-macros v0.2.6
   Compiling petgraph v0.6.2
   Compiling tokio-util v0.7.4 (https://github.com/vectordotdev/tokio?branch=tokio-util-0.7.4-framed-read-continue-on-error#53a17f25)
   Compiling async-trait v0.1.68
   Compiling h2 v0.3.16
   Compiling subtle v2.4.1
   Compiling num_threads v0.1.6
   Compiling const-oid v0.9.1
   Compiling time v0.3.17
   Compiling fastrand v1.8.0
   Compiling iana-time-zone v0.1.53
   Compiling block-buffer v0.10.3
   Compiling chrono v0.4.24 (https://github.com/vectordotdev/chrono.git?tag=v0.4.24-no-default-time-1#7ec1ad93)
   Compiling mime v0.3.16
   Compiling native-tls v0.2.11
   Compiling digest v0.10.6
   Compiling ident_case v1.0.1
   Compiling strsim v0.10.0
   Compiling anyhow v1.0.70
   Compiling futures-executor v0.3.28
   Compiling cpufeatures v0.2.5
   Compiling siphasher v0.3.10
   Compiling hyper v0.14.25
   Compiling futures v0.3.28
   Compiling crc32fast v1.3.2
   Compiling serde_urlencoded v0.7.1
   Compiling crossbeam-utils v0.8.15
   Compiling encoding_rs v0.8.32
   Compiling synstructure v0.12.6
   Compiling zeroize_derive v1.3.2
   Compiling zeroize v1.5.7
   Compiling dirs-sys-next v0.1.2
   Compiling crunchy v0.2.2
   Compiling dirs-next v2.0.0
   Compiling tower-layer v0.3.2
   Compiling tiny-keccak v2.0.2
   Compiling term v0.7.0
   Compiling phf_shared v0.10.0
   Compiling bit-vec v0.6.3
   Compiling semver v1.0.17
   Compiling precomputed-hash v0.1.1
   Compiling new_debug_unreachable v1.0.4
   Compiling ucd-trie v0.1.5
   Compiling string_cache v0.8.4
   Compiling pest v2.5.6
   Compiling bit-set v0.5.3
   Compiling ascii-canvas v3.0.0
   Compiling darling_core v0.14.2
   Compiling ena v0.14.0
   Compiling lalrpop-util v0.19.9
   Compiling atty v0.2.14
   Compiling diff v0.1.13
   Compiling pico-args v0.4.2
   Compiling lalrpop v0.19.8
   Compiling toml v0.5.11
   Compiling parking v2.0.0
   Compiling waker-fn v1.1.0
   Compiling event-listener v2.5.3
   Compiling paste v1.0.12
   Compiling proc-macro-crate v1.2.1
   Compiling darling_macro v0.14.2
   Compiling futures-lite v1.12.0
   Compiling rustc_version v0.4.0
   Compiling prost-derive v0.11.8
   Compiling tower v0.4.13
   Compiling rustls-pemfile v1.0.1
   Compiling darling v0.14.2
   Compiling minimal-lexical v0.2.1
   Compiling doc-comment v0.3.3
   Compiling nom v7.1.3
   Compiling phf_shared v0.11.1
   Compiling webpki v0.22.0
   Compiling spin v0.9.4
   Compiling num-bigint v0.4.3
   Compiling rustls v0.20.7
   Compiling io-lifetimes v1.0.3
   Compiling sct v0.7.0
   Compiling lua-src v544.0.1
   Compiling luajit-src v210.4.3+resty8384278
   Compiling unicode-width v0.1.10
   Compiling static_assertions v1.1.0
   Compiling rustix v0.37.5
   Compiling termcolor v1.2.0
   Compiling mlua v0.8.8
   Compiling phf_generator v0.11.1
   Compiling async-graphql-value v5.0.7
   Compiling bytes-utils v0.1.3
   Compiling tokio-stream v0.1.12
   Compiling async-stream-impl v0.3.4
   Compiling multer v2.0.4
   Compiling prettyplease v0.1.21
   Compiling hex v0.4.3
   Compiling linux-raw-sys v0.3.0
   Compiling cache-padded v1.2.0
   Compiling concurrent-queue v1.2.4
   Compiling async-stream v0.3.4
   Compiling async-graphql-parser v5.0.7
   Compiling phf_codegen v0.11.1
   Compiling prost v0.11.8
   Compiling phf v0.11.1
   Compiling aws-smithy-types v0.51.0
   Compiling Inflector v0.11.4
   Compiling serde_spanned v0.6.1
   Compiling toml_datetime v0.6.1
   Compiling snafu-derive v0.7.4
   Compiling env_logger v0.8.4
   Compiling parse-zoneinfo v0.3.0
   Compiling winnow v0.3.5
   Compiling dyn-clone v1.0.11
   Compiling tempfile v3.5.0
   Compiling chrono-tz-build v0.1.0
   Compiling quickcheck v1.0.3
   Compiling async-graphql-derive v5.0.7
   Compiling snafu v0.7.4
   Compiling toml_edit v0.19.6
   Compiling prost-types v0.11.8
   Compiling lookup v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling async-channel v1.7.1
   Compiling async-lock v2.6.0
   Compiling derivative v2.2.0
   Compiling inherent v1.0.3
   Compiling which v4.3.0
   Compiling unicase v2.6.0
   Compiling multimap v0.8.3
   Compiling prost-build v0.11.8
   Compiling toml v0.7.3
   Compiling chrono-tz v0.8.1
   Compiling codespan-reporting v0.11.1
   Compiling async-graphql v5.0.7
   Compiling sha2 v0.10.6
   Compiling darling_core v0.13.4
   Compiling ordered-float v3.6.0
   Compiling bstr v0.2.17
   Compiling rustc-hash v1.1.0
   Compiling vrl-diagnostic v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling vrl-parser v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling aws-smithy-eventstream v0.51.0
   Compiling tokio-rustls v0.23.4
   Compiling aws-smithy-http v0.51.0
   Compiling darling_macro v0.13.4
   Compiling rustls-native-certs v0.6.2
   Compiling polling v2.5.0
   Compiling concurrent-queue v2.0.0
   Compiling zstd-sys v2.0.4+zstd.1.5.2
   Compiling async-io v1.12.0
   Compiling async-task v4.3.0
   Compiling getrandom v0.1.16
   Compiling anymap v1.0.0-beta.2
   Compiling mime_guess v2.0.4
   Compiling darling v0.13.4
   Compiling signal-hook v0.3.14
   Compiling base64 v0.21.0
   Compiling atomic-waker v1.0.0
   Compiling blocking v1.3.0
   Compiling aws-smithy-http-tower v0.51.0
   Compiling aws-smithy-async v0.51.0
   Compiling aws-types v0.51.0
   Compiling sha1 v0.10.5
   Compiling debug-helper v0.3.13
   Compiling rustversion v1.0.9
   Compiling ipnet v2.5.1
   Compiling cidr-utils v0.5.10
   Compiling rand_core v0.5.1
   Compiling webpki-roots v0.22.5
   Compiling serde_with_macros v2.3.1
   Compiling uuid v1.3.0
   Compiling ordered-float v2.10.0
   Compiling base64ct v1.5.3
   Compiling linked-hash-map v0.5.6
   Compiling serde_with v2.3.1
   Compiling hyper-rustls v0.23.1
   Compiling hmac v0.12.1
   Compiling ghost v0.1.6
   Compiling ctor v0.2.0
   Compiling portable-atomic v0.3.15
   Compiling adler v1.0.2
   Compiling inventory v0.3.5
   Compiling miniz_oxide v0.6.2
   Compiling vector-config-common v0.1.0 (/build/source/lib/vector-config-common)
   Compiling async-executor v1.5.0
   Compiling serde_derive_internals v0.26.0
   Compiling memoffset v0.7.1
   Compiling metrics v0.20.1
   Compiling flate2 v1.0.25
   Compiling vector-config-macros v0.1.0 (/build/source/lib/vector-config-macros)
   Compiling no-proxy v0.3.2
   Compiling aws-sigv4 v0.51.0
   Compiling md-5 v0.10.5
   Compiling metrics-macros v0.6.0
   Compiling async-net v1.7.0
   Compiling num-rational v0.3.2
   Compiling async-fs v1.6.0
   Compiling async-process v1.6.0
   Compiling memoffset v0.6.5
   Compiling http-range-header v0.3.0
   Compiling block-padding v0.3.2
   Compiling futures-timer v3.0.2
   Compiling indoc v2.0.1
   Compiling xmlparser v0.13.5
   Compiling inout v0.1.3
   Compiling tower-http v0.3.5
   Compiling rand_chacha v0.2.2
   Compiling tokio-io-timeout v1.2.0
   Compiling ptr_meta_derive v0.1.4
   Compiling bytecheck v0.6.9
   Compiling heim-common v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling tokio-openssl v0.6.3
   Compiling io-lifetimes v0.7.5
   Compiling rustix v0.36.4
   Compiling ptr_meta v0.1.4
   Compiling hyper-timeout v0.4.1
   Compiling rand v0.7.3
   Compiling nix v0.23.1
   Compiling smol v1.2.5
   Compiling uom v0.31.1
   Compiling cipher v0.4.3
   Compiling axum-core v0.3.2
   Compiling yaml-rust v0.4.5
   Compiling pem-rfc7468 v0.6.0
   Compiling serde-value v0.7.0
   Compiling stream-cancel v0.8.1
   Compiling headers-core v0.2.0
   Compiling regex-automata v0.1.10
   Compiling bytecheck_derive v0.6.9
   Compiling pem v1.1.0
   Compiling onig_sys v69.8.1
   Compiling raw-cpuid v10.6.0
   Compiling crossbeam-epoch v0.9.13
   Compiling overload v0.1.1
   Compiling linux-raw-sys v0.1.3
   Compiling rend v0.4.0
   Compiling data-encoding v2.3.3
   Compiling k8s-openapi v0.16.0
   Compiling outref v0.5.1
   Compiling match_cfg v0.1.0
   Compiling rustix v0.35.13
   Compiling vsimd v0.8.0
   Compiling seahash v4.1.0
   Compiling void v1.0.2
   Compiling unreachable v1.0.0
   Compiling hostname v0.3.1
   Compiling base64-simd v0.8.0
   Compiling nu-ansi-term v0.46.0
   Compiling matchers v0.1.0
   Compiling headers v0.3.8
   Compiling der v0.6.1
   Compiling serde_yaml v0.8.26
   Compiling heim-runtime v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling axum v0.6.7
   Compiling pest_meta v2.5.6
   Compiling tokio-native-tls v0.3.0
   Compiling hyper-tls v0.5.0
   Compiling tracing-log v0.1.3
   Compiling aws-smithy-client v0.51.0
   Compiling reqwest v0.11.16
   Compiling aws-http v0.51.0
   Compiling aws-sig-auth v0.51.0
   Compiling aws-endpoint v0.51.0
   Compiling sharded-slab v0.1.4
   Compiling nibble_vec v0.1.0
   Compiling tracing-serde v0.1.3
   Compiling num-iter v0.1.43
   Compiling thread_local v1.1.4
   Compiling semver-parser v0.7.0
   Compiling erased-serde v0.3.23
   Compiling linux-raw-sys v0.0.46
   Compiling rkyv v0.7.40
   Compiling zstd-safe v5.0.2+zstd.1.5.2
   Compiling ascii v0.9.3
   Compiling const-oid v0.6.2
   Compiling arc-swap v1.6.0
   Compiling endian-type v0.1.2
   Compiling crossbeam-queue v0.3.8
   Compiling http-types v2.12.0
   Compiling radix_trie v0.2.1
   Compiling der v0.4.5
   Compiling combine v3.8.1
   Compiling tracing-subscriber v0.3.16
   Compiling semver v0.9.0
   Compiling pest_generator v2.5.6
   Compiling spki v0.6.0
   Compiling is-terminal v0.4.1
   Compiling quanta v0.10.1
   Compiling aws-smithy-xml v0.51.0
   Compiling tonic-build v0.8.4
   Compiling aws-smithy-json v0.51.0
   Compiling azure_core v0.5.0 (https://github.com/Azure/azure-sdk-for-rust.git?rev=b4544d4920fa3064eb921340054cd9cc130b7664#b4544d49)
   Compiling treediff v3.0.2
   Compiling serde_qs v0.8.5
   Compiling stringprep v0.1.2
   Compiling digest v0.9.0
   Compiling rkyv_derive v0.7.40
   Compiling libz-sys v1.1.8
   Compiling dirs-sys v0.3.7
   Compiling ahash v0.8.2
   Compiling sketches-ddsketch v0.2.0
   Compiling num-bigint-dig v0.8.2
   Compiling convert_case v0.4.0
   Compiling utf-8 v0.7.6
   Compiling matchit v0.7.0
   Compiling cookie-factory v0.3.2
   Compiling infer v0.2.3
   Compiling signature v1.6.4
   Compiling utf8parse v0.2.0
   Compiling sync_wrapper v0.1.1
   Compiling xml-rs v0.8.4
   Compiling zstd-safe v6.0.3+zstd.1.5.2
   Compiling glob v0.3.1
   Compiling urlencoding v2.1.2
   Compiling aws-smithy-query v0.51.0
   Compiling amq-protocol-types v7.0.1
   Compiling grok v2.0.0
   Compiling serde-xml-rs v0.6.0
   Compiling derive_more v0.99.17
   Compiling tungstenite v0.18.0
   Compiling metrics-util v0.14.0
   Compiling dirs v4.0.0
   Compiling json-patch v0.2.6
   Compiling graphql-parser v0.4.0
   Compiling onig v6.4.0
   Compiling pest_derive v2.5.6
   Compiling terminal_size v0.2.2
   Compiling pkcs8 v0.9.0
   Compiling rustc_version v0.2.3
   Compiling spki v0.4.1
   Compiling pem-rfc7468 v0.2.3
   Compiling vector-core v0.1.0 (/build/source/lib/vector-core)
   Compiling datadog-grok v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling crc32c v0.6.3
   Compiling num_enum_derive v0.5.11
   Compiling tracing-futures v0.2.5
   Compiling serde_path_to_error v0.1.8
   Compiling graphql-introspection-query v0.2.0
   Compiling block-buffer v0.9.0
   Compiling enumflags2_derive v0.7.4
   Compiling async-recursion v1.0.4
   Compiling typetag-impl v0.2.7
   Compiling lz4-sys v1.9.4
   Compiling memmap2 v0.5.10
   Compiling fslock v0.2.1
   Compiling vte_generate_state_changes v0.1.1
   Compiling csv-core v0.1.10
   Compiling woothee v0.13.0
   Compiling clap_lex v0.4.1
   Compiling opaque-debug v0.3.0
   Compiling matches v0.1.9
   Compiling rust_decimal v1.29.1
   Compiling fs_extra v1.2.0
   Compiling proc-macro-hack v0.5.19
   Compiling rle-decode-fast v1.0.3
   Compiling snap v1.1.0
   Compiling platforms v1.1.0
   Compiling arrayvec v0.5.2
   Compiling fallible-iterator v0.2.0
   Compiling lockfree-object-pool v0.1.3
   Compiling dlv-list v0.3.0
   Compiling arrayvec v0.7.2
   Compiling vte v0.10.1
   Compiling metrics-tracing-context v0.12.0
   Compiling postgres-protocol v0.6.4
   Compiling ordered-multimap v0.4.3
   Compiling tikv-jemalloc-sys v0.5.2+5.3.0-patched
   Compiling libflate_lz77 v1.1.0
   Compiling idna v0.2.3
   Compiling sha2 v0.9.9
   Compiling typetag v0.2.7
   Compiling clap_builder v4.1.14
   Compiling csv v1.2.1
   Compiling enumflags2 v0.7.5
   Compiling num_enum v0.5.11
   Compiling graphql_client_codegen v0.12.0
   Compiling oauth2 v4.3.0
   Compiling tonic v0.8.3
   Compiling pkcs8 v0.7.6
   Compiling rustc_version_runtime v0.2.1
   Compiling pkcs1 v0.4.1
   Compiling datadog-search-syntax v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling tokio-tungstenite v0.18.0
   Compiling amq-protocol-uri v7.0.1
   Compiling ed25519 v1.5.3
   Compiling curve25519-dalek v3.2.0
   Compiling hyper-proxy v0.9.1
   Compiling tcp-stream v0.24.4
   Compiling quanta v0.11.0
   Compiling kube-core v0.75.0
   Compiling signal-hook-mio v0.2.3
   Compiling simple_asn1 v0.6.2
   Compiling twox-hash v1.6.3
   Compiling syslog_loose v0.18.0
   Compiling secrecy v0.8.0
   Compiling sha-1 v0.10.1
   Compiling signature v2.0.0
   Compiling webpki v0.21.4
   Compiling sct v0.6.1
   Compiling jsonpath_lib v0.3.0
   Compiling tracing-core v0.2.0 (https://github.com/tokio-rs/tracing?rev=e0642d949891546a3bb7e47080365ee7274f05cd#e0642d94)
   Compiling dashmap v5.4.0
   Compiling serde_bytes v0.11.9
   Compiling clap_derive v4.1.14
   Compiling enum-as-inner v0.4.0
   Compiling typed-builder v0.10.0
   Compiling zerocopy-derive v0.3.2
   Compiling bitmask-enum v2.1.0
   Compiling rdkafka-sys v4.3.0+1.9.2
   Compiling error-chain v0.12.4
   Compiling instant v0.1.12
   Compiling proc-macro-nested v0.1.7
   Compiling peeking_take_while v1.0.0
   Compiling adler32 v1.2.0
   Compiling unicode-segmentation v1.10.0
   Compiling quick-error v1.2.3
   Compiling crc-catalog v2.1.0
   Compiling keccak v0.1.3
   Compiling heim-host v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling amq-protocol v7.0.1
   Compiling float_eq v1.0.1
   Compiling clap v4.1.14
   Compiling sha3 v0.10.6
   Compiling crc v3.0.1
   Compiling resolv-conf v0.7.0
   Compiling libflate v1.2.0
   Compiling backoff v0.4.0
   Compiling zerocopy v0.6.1
   Compiling trust-dns-proto v0.21.2
   Compiling tracing v0.2.0 (https://github.com/tokio-rs/tracing?rev=e0642d949891546a3bb7e47080365ee7274f05cd#e0642d94)
   Compiling rustls v0.19.1
   Compiling rsa v0.8.1
   Compiling jsonwebtoken v8.2.0
   Compiling amq-protocol-tcp v7.0.1
   Compiling ed25519-dalek v1.0.1
   Compiling kube-client v0.75.0
   Compiling graphql_query_derive v0.12.0
   Compiling datadog-filter v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling signatory v0.23.2
   Compiling strip-ansi-escapes v0.1.1
   Compiling postgres-types v0.2.4
   Compiling rust-ini v0.18.0
   Compiling uaparser v0.6.0
   Compiling opentelemetry-proto v0.1.0 (/build/source/lib/opentelemetry-proto)
   Compiling ureq v2.6.2
   Compiling aws-smithy-types v0.55.0
   Compiling aws-smithy-types v0.54.4
   Compiling ctr v0.9.2
   Compiling cfb-mode v0.8.2
   Compiling ofb v0.6.1
   Compiling cbc v0.1.2
   Compiling aes v0.8.2
   Compiling roxmltree v0.18.0
   Compiling nix v0.26.2 (https://github.com/vectordotdev/nix.git?branch=memfd/gnu/musl#6c53a918)
   Compiling async-global-executor v2.3.1
   Compiling strum_macros v0.24.3
   Compiling lru-cache v0.1.2
   Compiling serde_with_macros v1.5.2
   Compiling loki-logproto v0.1.0 (/build/source/lib/loki-logproto)
   Compiling prometheus-parser v0.1.0 (/build/source/lib/prometheus-parser)
   Compiling pulsar v5.1.0
   Compiling flume v0.10.14
   Compiling rmp v0.8.11
   Compiling charset v0.1.3
   Compiling backon v0.4.0
   Compiling executor-trait v2.1.0
   Compiling reactor-trait v1.1.0
   Compiling quick-xml v0.28.1
   Compiling serde_repr v0.1.9
   Compiling fix-hidden-lifetime-bug-proc_macros v0.2.5
   Compiling dns-lookup v1.0.8
   Compiling inotify-sys v0.1.5
   Compiling utf8-width v0.1.6
   Compiling RustyXML v0.3.0
   Compiling simpl v0.1.0
   Compiling same-file v1.0.6
   Compiling hyper-openssl v0.9.2
   Compiling quoted_printable v0.4.7
   Compiling macaddr v1.0.1
   Compiling lapin v2.1.1
   Compiling encode_unicode v1.0.0
   Compiling scoped-tls v1.0.1
   Compiling strum v0.24.1
   Compiling base16 v0.2.1
   Compiling prettytable-rs v0.10.0
   Compiling apache-avro v0.14.0
   Compiling warp v0.3.4
   Compiling fix-hidden-lifetime-bug v0.2.5
   Compiling reqsign v0.8.5
   Compiling heim-net v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling walkdir v2.3.2
   Compiling smpl_jwt v0.7.1
   Compiling azure_storage v0.6.0 (https://github.com/Azure/azure-sdk-for-rust.git?rev=b4544d4920fa3064eb921340054cd9cc130b7664#b4544d49)
   Compiling inotify v0.9.6
   Compiling async-reactor-trait v1.1.0
   Compiling async-global-executor-trait v2.1.0
   Compiling pinky-swear v6.1.0
   Compiling serde_with v1.14.0
   Compiling trust-dns-resolver v0.21.2
   Compiling rustyline v11.0.0
   Compiling aws-smithy-http v0.54.4
   Compiling aws-smithy-http v0.55.0
   Compiling arr_macro_impl v0.2.1
   Compiling tokio-postgres v0.7.7
   Compiling kube-runtime v0.75.0
   Compiling aws-smithy-checksums v0.51.0
   Compiling nkeys v0.2.0
   Compiling graphql_client v0.12.0
   Compiling rustls-native-certs v0.5.0
   Compiling tracing-futures v0.3.0 (https://github.com/tokio-rs/tracing?rev=e0642d949891546a3bb7e47080365ee7274f05cd#e0642d94)
   Compiling heim-cpu v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling bson v2.5.0
   Compiling crossterm v0.25.0
   Compiling openidconnect v2.4.0
   Compiling webbrowser v0.8.8
   Compiling aws-sdk-sts v0.21.0
   Compiling vector v0.29.0 (/build/source)
   Compiling aws-sdk-sso v0.21.0
   Compiling heim-memory v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling heim-disk v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling fakedata_generator v0.2.4
   Compiling bollard-stubs v1.42.0-rc.7
   Compiling linked_hash_set v0.1.4
   Compiling hyperlocal v0.8.0
   Compiling crossbeam-channel v0.5.6
   Compiling pbkdf2 v0.11.0
   Compiling combine v4.6.6
   Compiling async-compat v0.2.1
   Compiling nuid v0.3.2
   Compiling ipnetwork v0.18.0
   Compiling serde_nanos v0.1.2
   Compiling quick-xml v0.27.1
   Compiling scan_fmt v0.2.6
   Compiling base64-url v1.4.13
   Compiling rustls-pemfile v0.2.1
   Compiling filetime v0.2.18
   Compiling bstr v1.4.0
   Compiling md5 v0.7.0
   Compiling take_mut v0.2.2
   Compiling no-std-compat v0.4.1
   Compiling unsafe-libyaml v0.2.7
   Compiling cassowary v0.3.0
   Compiling nonzero_ext v0.3.0
   Compiling bytemuck v1.12.3
   Compiling exitcode v1.1.2
   Compiling data-url v0.2.0
   Compiling bit-vec v0.4.4
   Compiling retain_mut v0.1.7
   Compiling flagset v0.4.3
   Compiling json v0.12.4
   Compiling nats v0.24.0
   Compiling opendal v0.30.5
   Compiling redis v0.23.0
   Compiling roaring v0.10.1
   Compiling bloom v0.3.2
   Compiling serde_yaml v0.9.19
   Compiling bollard v0.14.0
   Compiling tui v0.19.0
   Compiling governor v0.5.1
   Compiling mongodb v2.4.0
   Compiling azure_storage_blobs v0.6.0 (https://github.com/Azure/azure-sdk-for-rust.git?rev=b4544d4920fa3064eb921340054cd9cc130b7664#b4544d49)
   Compiling colored v2.0.0
   Compiling notify v5.1.0
   Compiling maxminddb v0.23.0
   Compiling fakedata v0.1.0 (/build/source/lib/fakedata)
   Compiling heim v0.1.0-rc.1 (https://github.com/vectordotdev/heim.git?branch=update-nix#76fa765c)
   Compiling aws-config v0.51.0
   Compiling arr_macro v0.2.1
   Compiling syslog v6.0.1
   Compiling postgres-openssl v0.5.0
   Compiling tracing-tower v0.1.0 (https://github.com/tokio-rs/tracing?rev=e0642d949891546a3bb7e47080365ee7274f05cd#e0642d94)
   Compiling kube v0.75.0
   Compiling vector-api-client v0.1.2 (/build/source/lib/vector-api-client)
   Compiling aws-sdk-s3 v0.21.0
   Compiling aws-sigv4 v0.55.0
   Compiling aws-smithy-http-tower v0.54.4
   Compiling tikv-jemallocator v0.5.0
   Compiling async-graphql-warp v5.0.7
   Compiling goauth v0.13.1
   Compiling azure_identity v0.6.0 (https://github.com/Azure/azure-sdk-for-rust.git?rev=b4544d4920fa3064eb921340054cd9cc130b7664#b4544d49)
   Compiling rmpv v1.0.0
   Compiling rmp-serde v1.1.1
   Compiling tracing-limit v0.1.0 (/build/source/lib/tracing-limit)
   Compiling crossterm v0.26.1
   Compiling hashbrown v0.13.2
   Compiling num-format v0.4.4
   Compiling aws-sdk-cloudwatch v0.21.0
   Compiling aws-sdk-sqs v0.21.0
   Compiling aws-sdk-cloudwatchlogs v0.21.0
   Compiling aws-sdk-firehose v0.21.0
   Compiling aws-sdk-kinesis v0.21.0
   Compiling serde-toml-merge v0.3.1
   Compiling enum_dispatch v0.3.11
   Compiling portpicker v1.0.0 (/build/source/lib/portpicker)
   Compiling rand_distr v0.4.3
   Compiling listenfd v1.0.1
   Compiling bytesize v1.2.0
   Compiling infer v0.13.0
   Compiling number_prefix v0.4.0
   Compiling lru v0.10.0
   Compiling hash_hasher v2.0.3
   Compiling lz4 v1.24.0
   Compiling value v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling vrl-core v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling zstd v0.12.3+zstd.1.5.2
   Compiling zstd v0.11.2+zstd.1.5.2
   Compiling rdkafka v0.29.0
   Compiling async-compression v0.3.15
   Compiling vrl-compiler v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling tower-http v0.4.0
   Compiling vector-config v0.1.0 (/build/source/lib/vector-config)
   Compiling vrl v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling vector-common v0.1.0 (/build/source/lib/vector-common)
   Compiling vector-lookup v0.1.0 (/build/source/lib/vector-lookup)
   Compiling enrichment v0.1.0 (/build/source/lib/enrichment)
   Compiling vector-buffers v0.1.0 (/build/source/lib/vector-buffers)
   Compiling vrl-stdlib v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling vrl-cli v0.1.0 (https://github.com/vectordotdev/vrl?rev=v0.2.0#258cc611)
   Compiling codecs v0.1.0 (/build/source/lib/codecs)
error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2569 ~ vector_buffers[7038]::variants::disk_v2::record::_::{impl#0}::resolve), const_param_did: None }) (after phase change to runtime-optimized) at bb4[53]:
                                Field projection `(*_4).field[3]` specified type `rkyv::boxed::ArchivedBox<[u8]>`, but actual type is `<rkyv::with::With<rkyv::with::With<&[u8], rkyv::with::RefAsBox>, rkyv::with::CopyOptimize> as rkyv::Archive>::Archived`
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:10
   |
46 | #[derive(Archive, Serialize, Debug)]
   |          ^^^^^^^
   |
   = note: delayed at    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::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_projection_elem
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_place
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_rvalue
              6: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_statement
              7: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
              8: rustc_mir_transform::pass_manager::run_passes_inner
              9: rustc_mir_transform::optimized_mir
             10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
             11: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             12: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             13: rustc_metadata::rmeta::encoder::encode_metadata_impl
             14: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
             15: rustc_metadata::rmeta::encoder::encode_metadata
             16: rustc_metadata::fs::encode_and_write_metadata
             17: rustc_interface::passes::start_codegen
             18: <rustc_interface::queries::Queries>::ongoing_codegen
             19: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             22: std::sys::unix::thread::Thread::new::thread_start
             23: start_thread
             24: __clone3
           
   = note: this error: internal compiler error originates in the macro `::core::ptr::addr_of_mut` which comes from the expansion of the derive macro `Archive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2569 ~ vector_buffers[7038]::variants::disk_v2::record::_::{impl#0}::resolve), const_param_did: None }) (after phase change to runtime-optimized) at bb7[12]:
                                Field projection `_3.field[3]` specified type `rkyv::boxed::BoxResolver<()>`, but actual type is `<rkyv::with::With<rkyv::with::With<&[u8], rkyv::with::RefAsBox>, rkyv::with::CopyOptimize> as rkyv::Archive>::Resolver`
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:10
   |
46 | #[derive(Archive, Serialize, Debug)]
   |          ^^^^^^^
   |
   = note: delayed at    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::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_projection_elem
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_place
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_rvalue
              6: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_statement
              7: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
              8: rustc_mir_transform::pass_manager::run_passes_inner
              9: rustc_mir_transform::optimized_mir
             10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
             11: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             12: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             13: rustc_metadata::rmeta::encoder::encode_metadata_impl
             14: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
             15: rustc_metadata::rmeta::encoder::encode_metadata
             16: rustc_metadata::fs::encode_and_write_metadata
             17: rustc_interface::passes::start_codegen
             18: <rustc_interface::queries::Queries>::ongoing_codegen
             19: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             20: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             21: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             22: std::sys::unix::thread::Thread::new::thread_start
             23: start_thread
             24: __clone3
           
   = note: this error: internal compiler error originates in the derive macro `Archive` (in Nightly builds, run with -Z macro-backtrace for more info)

error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:2578 ~ vector_buffers[7038]::variants::disk_v2::record::_#1::{impl#0}::serialize), const_param_did: None }) (after phase change to runtime-optimized) at bb18[5]:
                                Field projection `_3.field[3]` specified type `rkyv::boxed::BoxResolver<()>`, but actual type is `<rkyv::with::With<rkyv::with::With<&[u8], rkyv::with::RefAsBox>, rkyv::with::CopyOptimize> as rkyv::Archive>::Resolver`
  --> lib/vector-buffers/src/variants/disk_v2/record.rs:46:19
   |
46 | #[derive(Archive, Serialize, Debug)]
   |                   ^^^^^^^^^
   |
   = note: delayed at    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::TypeChecker>::fail::<alloc::string::String>
              3: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_projection_elem
              4: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_place
              5: <rustc_const_eval::transform::validate::TypeChecker as rustc_middle::mir::visit::Visitor>::visit_statement
              6: <rustc_const_eval::transform::validate::Validator as rustc_middle::mir::MirPass>::run_pass
              7: rustc_mir_transform::pass_manager::run_passes_inner
              8: rustc_mir_transform::optimized_mir
              9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
             10: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
             11: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
             12: rustc_metadata::rmeta::encoder::encode_metadata_impl
             13: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
             14: rustc_metadata::rmeta::encoder::encode_metadata
             15: rustc_metadata::fs::encode_and_write_metadata
             16: rustc_interface::passes::start_codegen
             17: <rustc_interface::queries::Queries>::ongoing_codegen
             18: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             19: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
             20: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             21: std::sys::unix::thread::Thread::new::thread_start
             22: start_thread
             23: __clone3
           
   = note: this error: internal compiler error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

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.68.2 (9eb3afe9e 2023-03-27) (built from a source tarball) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C linker=/nix/store/nlgyw2fv0cm8rkz8qm1jyw78vyif1bl9-gcc-wrapper-12.2.0/bin/cc -C link-args=-rdynamic -C target-feature=-crt-static

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

query stack during panic:
end of query stack
error: could not compile `vector-buffers`
warning: build failed, waiting for other jobs to finish...
thenewwazoo commented 1 year ago

I ran into this bug in 1.67, and later couldn't repro in 1.70, so this is likely fixed.

happysalada commented 1 year ago

I agree, there was a patch in nix for older versions, im closing this.