-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Compiler error that only occurs occasionally #97858
Comments
@rustbot label +A-incr-comp |
FWIW, I have a case where this (at least it looks similar) happens all the time on stable and on nightly, including after
All the compiler outputthread 'rustc' panicked at 'forcing query with already existing `DepNode` - query-key: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst }, value: Val(ByRef { alloc: Allocation { bytes: [0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0], provenance: ProvenanceMap(SortedMap { data: [(Size(0 bytes), alloc5), (Size(16 bytes), alloc27)] }), init_mask: InitMask { blocks: [4294967295], len: Size(32 bytes) }, align: Align(8 bytes), mutability: Not, extra: () }, offset: Size(0 bytes) }, instant_xml::Id) } - dep-node: try_destructure_mir_constant(9361c990efa81df2-565a9ce6901e1ee1)', /rustc/9243168fa5615ec8ebe9164c6bc2fdcccffd08b6/compiler/rustc_query_system/src/dep_graph/graph.rs:316:9 stack backtrace: 0: 0x104c528e0 - ::fmt::h6ee2850c6aae1461 1: 0x104c9dd28 - core::fmt::write::hbba6fa9039cb1a44 2: 0x104c456cc - std::io::Write::write_fmt::h27f716847262c05a 3: 0x104c55190 - std::panicking::default_hook::{{closure}}::h436e4cd4e10ace11 4: 0x104c54eb8 - std::panicking::default_hook::h72aba44b53f1b1e2 5: 0x10ca3362c - rustc_driver[e208b117dc8a9758]::DEFAULT_HOOK::{closure#0}::{closure#0} 6: 0x104c55858 - std::panicking::rust_panic_with_hook::h96fccc895fea8297 7: 0x104c55704 - std::panicking::begin_panic_handler::{{closure}}::he246903da8290f6f 8: 0x104c52d84 - std::sys_common::backtrace::__rust_end_short_backtrace::h3c632280a1cb5bf6 9: 0x104c55454 - _rust_begin_unwind 10: 0x104cc77c8 - core::panicking::panic_fmt::h6a9fd9c43f18d4a2 11: 0x10fb52034 - >::with_task::, core[76f08928393e5912]::option::Option> 12: 0x10fa1f7dc - rustc_query_system[f26b08068cf1868e]::query::plumbing::get_query:: 13: 0x10fbfa9f8 - ::try_destructure_mir_constant 14: 0x1106957f4 - ::destructure_mir_constant 15: 0x10f45cfd0 - ::recur 16: 0x10f4563e4 - ::to_pat 17: 0x10f428004 - ::enter::::const_to_pat::{closure#0}> 18: 0x10f41fc20 - ::const_to_pat 19: 0x10f420318 - ::lower_path 20: 0x10f41d1d0 - ::lower_pattern 21: 0x10f466a8c - ::lower_pattern 22: 0x10f44d39c - as alloc[39c3eac8f41ca479]::vec::spec_from_iter::SpecFromIter, ::check_match::{closure#0}>>>::from_iter 23: 0x10f465470 - ::visit_expr 24: 0x10f465308 - ::visit_expr 25: 0x10f466834 - ::visit_local 26: 0x10f474d40 - rustc_hir[ae521431426d2a21]::intravisit::walk_expr:: 27: 0x10f465308 - ::visit_expr 28: 0x10f474c74 - rustc_hir[ae521431426d2a21]::intravisit::walk_expr:: 29: 0x10f465308 - ::visit_expr 30: 0x10f465308 - ::visit_expr 31: 0x10f474d0c - rustc_hir[ae521431426d2a21]::intravisit::walk_expr:: 32: 0x10f465308 - ::visit_expr 33: 0x10f4650f8 - rustc_mir_build[1ece791d94281726]::thir::pattern::check_match::check_match 34: 0x10fb76804 - >::with_task:: 35: 0x10f980c64 - rustc_query_system[f26b08068cf1868e]::query::plumbing::try_execute_query::> 36: 0x10f9dffe4 - rustc_query_system[f26b08068cf1868e]::query::plumbing::get_query:: 37: 0x10cb299f8 - rustc_data_structures[bc61ff5b5a47b75b]::sync::par_for_each_in::<&[rustc_span[f48f28e6627543e7]::def_id::LocalDefId], ::par_body_owners::{closure#0}> 38: 0x10cac6000 - ::time::<(), rustc_interface[6177e2481885445a]::passes::analysis::{closure#1}::{closure#0}::{closure#0}> 39: 0x10cad6414 - rustc_interface[6177e2481885445a]::passes::analysis 40: 0x10fb8747c - >::with_task::> 41: 0x10f99144c - rustc_query_system[f26b08068cf1868e]::query::plumbing::try_execute_query::>> 42: 0x10fa2b944 - rustc_query_system[f26b08068cf1868e]::query::plumbing::get_query:: 43: 0x10c9ea870 - ::enter::> 44: 0x10c9c1914 - ::enter::, rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>> 45: 0x10c9bb304 - rustc_span[f48f28e6627543e7]::with_source_map::, rustc_interface[6177e2481885445a]::interface::create_compiler_and_run, rustc_driver[e208b117dc8a9758]::run_compiler::{closure#1}>::{closure#1}> 46: 0x10c9c32d8 - rustc_interface[6177e2481885445a]::interface::create_compiler_and_run::, rustc_driver[e208b117dc8a9758]::run_compiler::{closure#1}> 47: 0x10ca23560 - >::set::, rustc_driver[e208b117dc8a9758]::run_compiler::{closure#1}>::{closure#0}, core[76f08928393e5912]::result::Result<(), rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>> 48: 0x10c9eea10 - std[5ac2f64a7f5fb312]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[e208b117dc8a9758]::run_compiler::{closure#1}>::{closure#0}, core[76f08928393e5912]::result::Result<(), rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>>::{closure#0}, core[76f08928393e5912]::result::Result<(), rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>> 49: 0x10c9f12c0 - <::spawn_unchecked_, rustc_driver[e208b117dc8a9758]::run_compiler::{closure#1}>::{closure#0}, core[76f08928393e5912]::result::Result<(), rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>>::{closure#0}, core[76f08928393e5912]::result::Result<(), rustc_errors[128878f5f3ceac1a]::ErrorGuaranteed>>::{closure#1} as core[76f08928393e5912]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 50: 0x104c5d93c - std::sys::unix::thread::Thread::new::thread_start::h653f78ce82393e25 51: 0x1bc56026c - __pthread_deallocateerror: internal compiler error: unexpected panic 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.65.0-nightly (9243168 2022-08-31) running on aarch64-apple-darwin note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental note: some of the compiler flags provided by cargo are hidden query stack during panic:
error: internal compiler error: unexpected panic 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.65.0-nightly (9243168 2022-08-31) running on aarch64-apple-darwin note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental note: some of the compiler flags provided by cargo are hidden query stack during panic: cc @steffahn since you were able to triage the last one so quickly, maybe care to take a look? |
@djc Your “All the compiler output” section is not formatted properly. Make sure to wrap things into a code block. It might necessary to leave an empty line between the Regarding triage, I wouldn’t know how to tell whether or not the reproduction you have is actually “the same” issue as this one, so perhaps opening a new issue might be useful. I can reproduce it, and it’s nice (and interesting) that it’s appearing unconditionally, even though it looks similar to an incr-comp issue. Should make minimization easier though; if you open a new issue, make sure to tag it with Let me quickly bisect your reproduction … Edit1: The “May” figure might be inaccurate, just noticed that it might have simply not ICE’d before May because it fails with Edit2: Fixing the unstable features, this goes a lot further back; I haven’t even confirmed it’s a regression. Edit3: Probably needs some minimization to simplify testing earlier Rust versions for whether there’s a regression, I can confirm this ICE goes back at least 2 years. |
Thanks, filed #101518 for my issue. |
Closing as duplicate in favor of #83085 (which has a patch for fixing the issue in progress) |
Note that the below error cannot be repeated by myself anymore...I tried minimizing the bug but then it disappeared and even after reverting back to the original troublesome code cargo no longer complains.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: