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

rustc panicked during compilation #391

Closed
v0y4g3r opened this issue Oct 19, 2024 · 2 comments
Closed

rustc panicked during compilation #391

v0y4g3r opened this issue Oct 19, 2024 · 2 comments
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)

Comments

@v0y4g3r
Copy link

v0y4g3r commented Oct 19, 2024

In this CI workflow, rustc panicked while running cargo llvm-cov nextest --workspace --lcov --output-path lcov.info -F pyo3_backend -F dashboard, but all other checks and builds finished successfully.

Affected versions: this panic only appears on rust toolchains after nightly-2024-09-16 (exclusive, it works on nightly-2024-09-16).

Related error message:

thread 'rustc' panicked at /rustc/798fb83f7d24e31b16acca113496f39ff168c143/compiler/rustc_middle/src/hir/mod.rs:179:84:
index out of bounds: the len is 21264 but the index is 21271
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
      [... omitted 1 frame ...]
   3: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 8]>>>
   4: rustc_mir_transform::coverage::query::coverage_attr_on
      [... omitted 1 frame ...]
   5: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 1]>>>
   6: rustc_mir_transform::coverage::query::is_eligible_for_coverage
   7: <rustc_mir_transform::coverage::InstrumentCoverage as rustc_mir_transform::pass_manager::MirPass>::run_pass
   8: rustc_mir_transform::mir_promoted
      [... omitted 1 frame ...]
   9: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::Erased<[u8; 16]>>>.cold
  10: rustc_mir_transform::coroutine::mir_coroutine_witnesses
      [... omitted 1 frame ...]
  11: rustc_mir_transform::mir_drops_elaborated_and_const_checked
      [... omitted 1 frame ...]
  12: rustc_mir_transform::optimized_mir
      [... omitted 1 frame ...]
  13: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 8]>>>
  14: rustc_codegen_llvm::coverageinfo::mapgen::finalize
  15: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  16: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::ExtraBackendMethods>::compile_codegen_unit
  17: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  18: <rustc_interface::queries::Linker>::codegen_and_build_linker
  19: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: please make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/work/greptimedb/greptimedb/rustc-ice-2024-10-19T01_04_24-47171.txt` to your bug report

note: compiler flags: -C embed-bitcode=no -C strip=debuginfo -C instrument-coverage

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

query stack during panic:
#0 [local_def_id_to_hir_id] getting HIR ID of `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
#1 [coverage_attr_on] checking for `#[coverage(..)]` on `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
#2 [mir_promoted] promoting constants in MIR for `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
#3 [mir_coroutine_witnesses] coroutine witness types for `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
#4 [mir_drops_elaborated_and_const_checked] elaborating drops for `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
#5 [optimized_mir] optimizing MIR for `state_store::tests::test_meta_state_store::{closure#0}::{closure#0}::{closure#1}`
end of query stack
error: could not compile `common-meta` (lib test)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-2024-10-17-x86_64-unknown-linux-gnu/bin/rustc --crate-name common_meta --edition=2021 src/common/meta/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no --deny=unknown_lints --warn=unexpected_cfgs '--allow=clippy::readonly_write_lock' '--warn=clippy::print_stdout' '--warn=clippy::print_stderr' --allow=non_local_definitions '--warn=clippy::implicit_clone' '--warn=clippy::dbg_macro' --check-cfg 'cfg(tokio_unstable)' --test --cfg 'feature="testing"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("pg_kvbackend", "testing"))' -C metadata=ce4829a915f7a662 -C extra-filename=-ce4829a915f7a662 --out-dir /home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps -C strip=debuginfo -L dependency=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps --extern anymap2=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libanymap2-3e6376085d200f64.rlib --extern api=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libapi-76f0bf029c8ee836.rlib --extern async_recursion=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libasync_recursion-43c348be534850ee.so --extern async_stream=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libasync_stream-0cdb7c6f9932b552.rlib --extern async_trait=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libasync_trait-f490aaff5e48ba4e.so --extern base64=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libbase64-989ebd727b099816.rlib --extern bytes=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libbytes-9bf739e10d9a7a58.rlib --extern chrono=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libchrono-120bd0c1855b0642.rlib --extern common_base=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_base-68486baf044da0fd.rlib --extern common_catalog=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_catalog-2d6be44b7d109981.rlib --extern common_error=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_error-16d5439d56e129ab.rlib --extern common_grpc_expr=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_grpc_expr-06835646fb80b24c.rlib --extern common_macro=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_macro-b389728ff33e9098.so --extern common_procedure=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_procedure-88a8f125e145a9e0.rlib --extern common_procedure_test=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_procedure_test-dce551b3d1337571.rlib --extern common_query=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_query-5b544d37bcdf86f0.rlib --extern common_recordbatch=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_recordbatch-1348485590caa13c.rlib --extern common_telemetry=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_telemetry-ddcf5cdf1ca991dc.rlib --extern common_time=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_time-d9d20bc468cfb557.rlib --extern common_wal=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libcommon_wal-941524fbcb3d034e.rlib --extern datafusion_common=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libdatafusion_common-b189a8f8b3146f6b.rlib --extern datafusion_expr=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libdatafusion_expr-48510fca2e1afdd2.rlib --extern datatypes=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libdatatypes-4227171c4de79383.rlib --extern derive_builder=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libderive_builder-3a862a96830ab0fb.rlib --extern etcd_client=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libetcd_client-7144a7e124df2a24.rlib --extern futures=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libfutures-66e9b7ff09fe9bca.rlib --extern futures_util=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libfutures_util-9891865769fe59bd.rlib --extern hex=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libhex-8e0b5bc186712038.rlib --extern humantime_serde=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libhumantime_serde-c44a499893e103be.rlib --extern hyper=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libhyper-fef7eff0e0a1c14d.rlib --extern itertools=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libitertools-93138148824b9b18.rlib --extern lazy_static=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/liblazy_static-0ac8324047d73df8.rlib --extern moka=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libmoka-1eade3b42c986666.rlib --extern prometheus=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libprometheus-c90ef4fe01c546a6.rlib --extern prost=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libprost-d3ced85323584e00.rlib --extern rand=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/librand-a2c5eedbbdb211af.rlib --extern regex=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libregex-8cd578b950cdf609.rlib --extern rskafka=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/librskafka-4103a5ae6c834ea2.rlib --extern serde=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libserde-deaba704f6234ecb.rlib --extern serde_json=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libserde_json-ae4772ef8a217780.rlib --extern serde_with=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libserde_with-f759078c33cf875c.rlib --extern session=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libsession-7e1eae73a7de15eb.rlib --extern snafu=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libsnafu-5cd6144dc94ef0df.rlib --extern store_api=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libstore_api-f06300132dce4982.rlib --extern strum=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libstrum-311803b5325d2d54.rlib --extern table=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libtable-4532a8ec6f19914b.rlib --extern tokio=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libtokio-e899910a6c0608b0.rlib --extern tonic=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libtonic-cca2a1478a16f367.rlib --extern typetag=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libtypetag-bc0256d9c2d24952.rlib --extern uuid=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/deps/libuuid-f16389e9f85e2cff.rlib -D warnings -C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target -L native=/usr/lib/x86_64-linux-gnu -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/ring-17f06f11be907c31/out -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/zstd-sys-579b22993d80fc0a/out -L native=/opt/hostedtoolcache/Python/3.10.15/x64/lib -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/bzip2-sys-faaf7ea309e60671/out/lib -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/lzma-sys-0a9006132bed0e42/out -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/blake3-18f58bdca16e3ce2/out -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/blake3-18f58bdca16e3ce2/out -L native=/home/runner/work/greptimedb/greptimedb/target/llvm-cov-target/debug/build/lz4-sys-ecf2c4a2d94757cc/out` (exit status: 101)
error: command `/home/runner/.rustup/toolchains/nightly-2024-10-17-x86_64-unknown-linux-gnu/bin/cargo test --no-run --message-format json-render-diagnostics --workspace --features pyo3_backend --features dashboard --target-dir /home/runner/work/greptimedb/greptimedb/target/llvm-cov-target` exited with code 101
error: process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-2024-10-17-x86_64-unknown-linux-gnu/bin/cargo nextest run --manifest-path /home/runner/work/greptimedb/greptimedb/Cargo.toml --target-dir /home/runner/work/greptimedb/greptimedb/target/llvm-cov-target --workspace -F pyo3_backend -F dashboard` (exit status: 101)
@taiki-e
Copy link
Owner

taiki-e commented Oct 19, 2024

This is a rustc bug: rust-lang/rust#131190

@taiki-e taiki-e closed this as completed Oct 19, 2024
@taiki-e taiki-e added the C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream) label Oct 19, 2024
@v0y4g3r
Copy link
Author

v0y4g3r commented Oct 19, 2024

This is a rustc bug: rust-lang/rust#131190

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-upstream-bug Category: This is a bug of compiler or dependencies (the fix may require action in the upstream)
Projects
None yet
Development

No branches or pull requests

2 participants