Skip to content

backtrace missing when rustc panics #106267

Closed
@matthiaskrgr

Description

@matthiaskrgr

With beta rustc 1.67.0-beta.5 (6b1892c28 2022-12-28)

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DefId(0:15 ~ 92157[3065]::{impl#0}::add) (NoSolution): could not prove Binder(TraitPredicate(<isize as Copy>, polarity:Positive), [])
  |
  = note: delayed at compiler/rustc_borrowck/src/type_check/canonical.rs:148:13

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1610:13
stack backtrace:
   0:     0x7f46583656fa - std::backtrace_rs::backtrace::libunwind::trace::hb14b523cf9bbb6ff
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f46583656fa - std::backtrace_rs::backtrace::trace_unsynchronized::h18e2e2737acb9234
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f46583656fa - std::sys_common::backtrace::_print_fmt::h47704e7b65218342
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f46583656fa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e1ba434ff93bdae
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f46583c825e - core::fmt::write::hd7ac771d9ffd9737
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f4658355a85 - std::io::Write::write_fmt::h4840fb0f8374ef5b
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/io/mod.rs:1682:15
   6:     0x7f46583654c5 - std::sys_common::backtrace::_print::hfa7d8e7a1dbf6697
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f46583654c5 - std::sys_common::backtrace::print::h3986e26150deb380
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f465836820f - std::panicking::default_hook::{{closure}}::h98cd5bb66bfc395c
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/panicking.rs:267:22
   9:     0x7f4658367f4b - std::panicking::default_hook::h1f9832d2e5df2901
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/panicking.rs:286:9
  10:     0x7f465b6620d1 - <rustc_driver[a1bd42a8b9f3139f]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[f31338071577118d]::ops::function::FnOnce<(&core[f31338071577118d]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  11:     0x7f4658368a4d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2180065ed0df45f4
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/alloc/src/boxed.rs:2032:9
  12:     0x7f4658368a4d - std::panicking::rust_panic_with_hook::h875dca59c539b796
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/panicking.rs:692:13
  13:     0x7f465b69adc1 - std[faafec5917ce8dac]::panicking::begin_panic::<rustc_errors[b60a95b52c4fe12f]::ExplicitBug>::{closure#0}
  14:     0x7f465b699696 - std[faafec5917ce8dac]::sys_common::backtrace::__rust_end_short_backtrace::<std[faafec5917ce8dac]::panicking::begin_panic<rustc_errors[b60a95b52c4fe12f]::ExplicitBug>::{closure#0}, !>
  15:     0x7f465b678906 - std[faafec5917ce8dac]::panicking::begin_panic::<rustc_errors[b60a95b52c4fe12f]::ExplicitBug>
  16:     0x7f465b697106 - std[faafec5917ce8dac]::panic::panic_any::<rustc_errors[b60a95b52c4fe12f]::ExplicitBug>
  17:     0x7f465ab46ed6 - <rustc_errors[b60a95b52c4fe12f]::HandlerInner>::flush_delayed::<alloc[533e65513bbad258]::vec::Vec<rustc_errors[b60a95b52c4fe12f]::diagnostic::Diagnostic>, &str>
  18:     0x7f465a81ef4c - <rustc_interface[e29be70a03a9eb51]::passes::QueryContext>::enter::<<rustc_interface[e29be70a03a9eb51]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[f31338071577118d]::result::Result<alloc[533e65513bbad258]::boxed::Box<dyn core[f31338071577118d]::any::Any>, rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>
  19:     0x7f465a81c5b6 - <rustc_interface[e29be70a03a9eb51]::queries::Queries>::ongoing_codegen
  20:     0x7f465a81bad7 - <rustc_interface[e29be70a03a9eb51]::interface::Compiler>::enter::<rustc_driver[a1bd42a8b9f3139f]::run_compiler::{closure#1}::{closure#2}, core[f31338071577118d]::result::Result<core[f31338071577118d]::option::Option<rustc_interface[e29be70a03a9eb51]::queries::Linker>, rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>
  21:     0x7f465a816af8 - rustc_span[5e59950fc4a1d87a]::with_source_map::<core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>, rustc_interface[e29be70a03a9eb51]::interface::run_compiler<core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>, rustc_driver[a1bd42a8b9f3139f]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  22:     0x7f465a8165e5 - <scoped_tls[fa92078d52959d9e]::ScopedKey<rustc_span[5e59950fc4a1d87a]::SessionGlobals>>::set::<rustc_interface[e29be70a03a9eb51]::interface::run_compiler<core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>, rustc_driver[a1bd42a8b9f3139f]::run_compiler::{closure#1}>::{closure#0}, core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>
  23:     0x7f465a815bd2 - std[faafec5917ce8dac]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e29be70a03a9eb51]::util::run_in_thread_pool_with_globals<rustc_interface[e29be70a03a9eb51]::interface::run_compiler<core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>, rustc_driver[a1bd42a8b9f3139f]::run_compiler::{closure#1}>::{closure#0}, core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>
  24:     0x7f465af19a6a - <<std[faafec5917ce8dac]::thread::Builder>::spawn_unchecked_<rustc_interface[e29be70a03a9eb51]::util::run_in_thread_pool_with_globals<rustc_interface[e29be70a03a9eb51]::interface::run_compiler<core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>, rustc_driver[a1bd42a8b9f3139f]::run_compiler::{closure#1}>::{closure#0}, core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f31338071577118d]::result::Result<(), rustc_errors[b60a95b52c4fe12f]::ErrorGuaranteed>>::{closure#1} as core[f31338071577118d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7f4658372803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7e8fc432d04b89f2
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/alloc/src/boxed.rs:2000:9
  26:     0x7f4658372803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h199ef35eac4a1602
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/alloc/src/boxed.rs:2000:9
  27:     0x7f4658372803 - std::sys::unix::thread::Thread::new::thread_start::h9e95ba06661490e6
                               at /rustc/6b1892c2803adade20a9399a176c0140ec347a96/library/std/src/sys/unix/thread.rs:108:17
  28:     0x7f46581058fd - <unknown>
  29:     0x7f4658187a60 - <unknown>
  30:                0x0 - <unknown>

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.67.0-beta.5 (6b1892c28 2022-12-28) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors

but nightly does not show backtraces: rustc 1.68.0-nightly (270c94e48 2022-12-28)

error: internal compiler error: no errors encountered even though `delay_span_bug` issued

error: internal compiler error: broken MIR in DefId(0:15 ~ 92157[71a4]::{impl#0}::add) (NoSolution): could not prove Binder(TraitPredicate(<isize as Copy>, polarity:Positive), [])
  |
  = note: delayed at compiler/rustc_borrowck/src/type_check/canonical.rs:148:13

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-nightly (270c94e48 2022-12-28) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
error: aborting due to 2 previous errors

edits
this is with

rustc 1.68.0-nightly (270c94e48 2022-12-28)
binary: rustc
commit-hash: 270c94e484e19764a2832ef918c95224eb3f17c7
commit-date: 2022-12-28
host: x86_64-unknown-linux-gnu
release: 1.68.0-nightly
LLVM version: 15.0.6

Metadata

Metadata

Labels

C-bugCategory: This is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions