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

ICE when incremental compilation #122116

Open
tengyifei opened this issue Mar 6, 2024 · 1 comment
Open

ICE when incremental compilation #122116

tengyifei opened this issue Mar 6, 2024 · 1 comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tengyifei
Copy link

Code

the project is too big unfortunately. this happens when compiling 10s of files.

but the compiler told me to attach a file:
rust-ice.txt

Meta

rustc --version --verbose:

❯ prebuilt/third_party/rust/linux-x64/bin/rustc --version --verbose
rustc 1.78.0-nightly (8c0b4f67c 2024-02-05)
binary: rustc
commit-hash: 8c0b4f67c9b4bf477df38c16669fd576d46a2b3d
commit-date: 2024-02-05
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6

Error output

error: internal compiler error: encountered incremental compilation error with module_children(vfs_macros[3dbe])
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p vfs` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/compiler/rustc_query_system/src/query/plumbing.rs:727:9:
Found unstable fingerprints for module_children(vfs_macros[3dbe]): [ModChild { ident: pseudo_directory#0, res: Def(Macro(Bang), DefId(72:25 ~ vfs_macros[3dbe]::pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: mut_pseudo_directory#0, res: Def(Macro(Bang), DefId(72:26 ~ vfs_macros[3dbe]::mut_pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: attribute_query#0, res: Def(Macro(Bang), DefId(72:40 ~ vfs_macros[3dbe]::attribute_query)), vis: Public, reexport_chain: [] }]
Backtrace

error: internal compiler error: encountered incremental compilation error with module_children(vfs_macros[3dbe])
  |
  = help: This is a known issue with the compiler. Run `cargo clean -p vfs` or `cargo clean` to allow your project to compile
  = note: Please follow the instructions below to create a bug report with the provided information
  = note: See <https://github.com/rust-lang/rust/issues/84970> for more information

thread 'rustc' panicked at /b/s/w/ir/x/w/fuchsia-third_party-rust/compiler/rustc_query_system/src/query/plumbing.rs:727:9:
Found unstable fingerprints for module_children(vfs_macros[3dbe]): [ModChild { ident: pseudo_directory#0, res: Def(Macro(Bang), DefId(72:25 ~ vfs_macros[3dbe]::pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: mut_pseudo_directory#0, res: Def(Macro(Bang), DefId(72:26 ~ vfs_macros[3dbe]::mut_pseudo_directory)), vis: Public, reexport_chain: [] }, ModChild { ident: attribute_query#0, res: Def(Macro(Bang), DefId(72:40 ~ vfs_macros[3dbe]::attribute_query)), vis: Public, reexport_chain: [] }]
stack backtrace:
   0: rust_begin_unwind
             at /b/s/w/ir/x/w/fuchsia-third_party-rust/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /b/s/w/ir/x/w/fuchsia-third_party-rust/library/core/src/panicking.rs:72:14
   2: rustc_query_system::query::plumbing::incremental_verify_ich_failed::<rustc_middle::ty::context::TyCtxt>.2381
   3: rustc_query_system::query::plumbing::incremental_verify_ich::<rustc_middle::ty::context::TyCtxt, rustc_middle::query::erase::Erased<[u8; 16]>>
   4: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 16]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, true>
   5: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefIdCache<rustc_middle::query::erase::Erased<[u8; 16]>>>
   6: <rustc_resolve::Resolver>::resolutions
   7: <rustc_resolve::Resolver>::resolve_ident_in_module_unadjusted_ext
   8: <rustc_resolve::Resolver>::resolve_ident_in_module_ext
   9: <rustc_resolve::Resolver>::resolve_import::{closure#0}
  10: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  11: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  12: <rustc_expand::expand::MacroExpander>::expand_crate
  13: <rustc_session::session::Session>::time::<rustc_ast::ast::Crate, rustc_interface::passes::configure_and_expand::{closure#1}>
  14: rustc_interface::passes::resolver_for_lowering
      [... omitted 2 frames ...]
  15: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}::{closure#2}, &rustc_data_structures::steal::Steal<(rustc_middle::ty::ResolverAstLowering, alloc::sync::Arc<rustc_ast::ast::Crate>)>>
  16: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#0}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, 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#0}>::{closure#0}::{closure#0}>
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 attach the file at `/usr/local/google/home/yifeit/vg/out/minimal.qemu-x64/rustc-ice-2024-03-06T22_44_12-2588506.txt` to your bug report

note: compiler flags: --crate-type rlib -Z dep-info-omit-d-target -C linker=../../prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=x64-shared/gen/zircon/public/sysroot/cpp -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/bin/../lib/x86_64-unknown-fuchsia/noexcept -C link-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/clang/19/lib/x86_64-unknown-fuchsia -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C link-arg=-zrel -Z remap-cwd-prefix=. -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-arg=--compress-debug-sections=zstd -C debug-assertions=yes -C incremental=[REDACTED] -Z allow-features= -C prefer-dynamic -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -Z panic_abort_tests -C symbol-mangling-version=v0 -C link-arg=-Bdynamic -C link-arg=x64-shared/obj/zircon/system/ulib/sync/libsync.a -C link-arg=gen/src/zircon/lib/zircon/zircon.x86_64/libzircon.so

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

query stack during panic:
#0 [module_children] collecting child items of module `vfs_macros`
#1 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: aborting due to 1 previous error

@tengyifei tengyifei 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 Mar 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 6, 2024
@jieyouxu jieyouxu added A-incr-comp Area: Incremental compilation S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 7, 2024
@rchriste
Copy link

rchriste commented Apr 28, 2024

I'm seeing this as well. It happens while I am editing my Rust project. If anyone wants to try to repo my project is on GitHub. I had 94 ice files created while creating this changeset (rchriste/OnPurpose@d5e0d36). I editted in VS Code using the Rust-analyzer plug-in.

PS C:\Users\russ-\repo\OnPurpose> rustc --version --verbose

rustc 1.79.0-nightly (aed2187d5 2024-04-27)
binary: rustc
commit-hash: aed2187d53b8789e3a37f50ae36f894a2a679077
commit-date: 2024-04-27
host: x86_64-pc-windows-msvc
release: 1.79.0-nightly
LLVM version: 18.1.4

Here is one of the ICE files created rustc-ice-2024-04-28T13_27_42-30880.txt

And another
rustc-ice-2024-04-28T13_29_42-28356.txt

This did not start happening to me until after I tried switching to the nightly Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. 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