rust-lang / rust

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

ICE: no warnings or errors encountered even though `delayed_good_path_bugs` issued #104257

Open feds01 opened 1 year ago

feds01 commented 1 year ago

Sporadic ICE when compiling a crate occurred, I could not reproduce this issue after the initial occurrence.

Meta

rustc --version --verbose:

rustc 1.66.0-nightly (758f19645 2022-10-24)
binary: rustc
commit-hash: 758f19645b8ebce61ea52d1f6672fd057bc8dbee
commit-date: 2022-10-24
host: x86_64-apple-darwin
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
Backtrace

``` error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued error: internal compiler error: trimmed_def_paths constructed | = note: delayed at 0: std::backtrace::Backtrace::create 1: std::backtrace::Backtrace::force_capture 2: ::delay_good_path_bug::<&str> 3: rustc_middle::ty::print::pretty::trimmed_def_paths 4: >::with_task::>> 5: rustc_query_system::query::plumbing::try_execute_query::>>> 6: rustc_query_system::query::plumbing::force_query:: 7: rustc_query_impl::plumbing::force_from_dep_node:: 8: >::try_mark_previous_green:: 9: >::try_mark_green:: 10: rustc_query_system::query::plumbing::try_load_from_disk_and_cache_in_memory:: 11: rustc_query_system::query::plumbing::try_execute_query::> 12: rustc_query_system::query::plumbing::get_query:: 13: ::mir_shims 14: ::instance_mir 15: rustc_monomorphize::collector::collect_neighbours 16: rustc_monomorphize::collector::collect_items_rec 17: rustc_monomorphize::collector::collect_items_rec 18: , rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#0}> as core::ops::function::FnOnce<()>>::call_once 19: ::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}> 20: rustc_monomorphize::collector::collect_crate_mono_items 21: rustc_monomorphize::partitioning::collect_and_partition_mono_items 22: >::with_task::>, &[rustc_middle::mir::mono::CodegenUnit])> 23: rustc_query_system::query::plumbing::try_execute_query::>, &[rustc_middle::mir::mono::CodegenUnit])>> 24: rustc_query_system::query::plumbing::get_query:: 25: ::collect_and_partition_mono_items 26: rustc_codegen_ssa::base::codegen_crate:: 27: ::codegen_crate 28: ::time::, rustc_interface::passes::start_codegen::{closure#0}> 29: ::enter::<::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result, rustc_errors::ErrorGuaranteed>> 30: ::ongoing_codegen 31: rustc_span::with_source_map::, rustc_interface::interface::run_compiler, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#1}> 32: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>> 33: std::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>> 34: <::spawn_unchecked_, 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} 35: std::sys::unix::thread::Thread::new::thread_start 36: __pthread_start thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:1553:13 stack backtrace: 0: 0x106972962 - ::fmt::h0617dd5fbbe552dc 1: 0x1069ca73a - core::fmt::write::h05a6134c72ed1ddb 2: 0x106964a3c - std::io::Write::write_fmt::he80e9ff25b029579 3: 0x10697272a - std::sys_common::backtrace::print::h1700815a3ed92180 4: 0x106975b36 - std::panicking::default_hook::{{closure}}::hd84f668f3afedf6e 5: 0x106975887 - std::panicking::default_hook::hf57a9610d4322109 6: 0x10f595acd - rustc_driver[479c34f3865e3b6c]::DEFAULT_HOOK::{closure#0}::{closure#0} 7: 0x106976331 - std::panicking::rust_panic_with_hook::h73409f7b338a4bac 8: 0x113f65107 - std[897bb1241874467f]::panicking::begin_panic::::{closure#0} 9: 0x113f63139 - std[897bb1241874467f]::sys_common::backtrace::__rust_end_short_backtrace::::{closure#0}, !> 10: 0x114329ae9 - std[897bb1241874467f]::panicking::begin_panic:: 11: 0x113f55279 - std[897bb1241874467f]::panic::panic_any:: 12: 0x113f587db - ::drop 13: 0x10f517f8a - core[22281634348f74b5]::ptr::drop_in_place:: 14: 0x10f51970b - core[22281634348f74b5]::ptr::drop_in_place:: 15: 0x10f58251e - core[22281634348f74b5]::ptr::drop_in_place:: 16: 0x10f568af9 - rustc_span[aadd19664503651e]::with_source_map::, rustc_interface[ad26a51231c6738a]::interface::run_compiler, rustc_driver[479c34f3865e3b6c]::run_compiler::{closure#1}>::{closure#0}::{closure#1}> 17: 0x10f558efc - >::set::, rustc_driver[479c34f3865e3b6c]::run_compiler::{closure#1}>::{closure#0}, core[22281634348f74b5]::result::Result<(), rustc_errors[2c7ec5b3ac012aec]::ErrorGuaranteed>> 18: 0x10f52892a - std[897bb1241874467f]::sys_common::backtrace::__rust_begin_short_backtrace::, rustc_driver[479c34f3865e3b6c]::run_compiler::{closure#1}>::{closure#0}, core[22281634348f74b5]::result::Result<(), rustc_errors[2c7ec5b3ac012aec]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[22281634348f74b5]::result::Result<(), rustc_errors[2c7ec5b3ac012aec]::ErrorGuaranteed>> 19: 0x10f50e5eb - <::spawn_unchecked_, rustc_driver[479c34f3865e3b6c]::run_compiler::{closure#1}>::{closure#0}, core[22281634348f74b5]::result::Result<(), rustc_errors[2c7ec5b3ac012aec]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[22281634348f74b5]::result::Result<(), rustc_errors[2c7ec5b3ac012aec]::ErrorGuaranteed>>::{closure#1} as core[22281634348f74b5]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 20: 0x10697f447 - std::sys::unix::thread::Thread::new::thread_start::hadbe903a2d919b07 21: 0x7ff803772259 - __pthread_start 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.66.0-nightly (758f19645 2022-10-24) running on x86_64-apple-darwin note: compiler flags: --crate-type bin -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental=[REDACTED] note: some of the compiler flags provided by cargo are hidden query stack during panic: end of query stack ```

albertlarsan68 commented 1 year ago

This seems like an incremental compilation issue

wiktor-k commented 1 year ago

This seems like an incremental compilation issue

For the record I'm seeing something like this in my CI setup which builds from scratch:

error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed but no error emitted; use `DelayDm` for lints or `with_no_trimmed_paths` for debugging
 |
 = note: delayed at    0: <rustc_errors::Handler>::delay_good_path_bug::<&str>

And the info is:

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.0-beta.6 (453d6d235 2023-02-27) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2
note: some of the compiler flags provided by cargo are hidden

Context is I've added matrix builds to check stable, beta and nightly and on beta it fails while it works on both stable and nightly. (I've ran the CI setup twice and it failed twice).

Attached you'll find the build log and if this helps here's a link to the CI pipelines: https://ci.codeberg.org/wiktor/pysequoia/pipeline/97

wiktor-pysequoia-97-build.log

kyrias commented 1 year ago

This seems to be the same as #106800 and #108155 which was closed as fixed, but since 1.68 the openpgp-card project is also reporting this issue happening.

https://gitlab.com/openpgp-card/virtual-cards/-/jobs/3906408278

kpreid commented 10 months ago

Triage: Relabeling issues which don't have a runnable reproduction (as opposed to having a non-minimized one) to the new label S-needs-repro. @rustbot label +S-needs-repro -E-needs-mcve