Skip to content

no errors encountered even though delay_span_bug issued #100512

Closed
@indietyp

Description

@indietyp

This regression was observed once I upgraded to 2022-08-10, and was not there before.

I provided a minimal example that reproduces the regression every time.

EDIT: the code was executed using https://github.com/fanzeyi/cargo-play, but it happened during normal execution too.

Code

#![feature(provide_any, backtrace_frames, error_generic_member_access)]

use std::backtrace::{Backtrace, BacktraceStatus};

fn main() {
    let err = std::fs::read_to_string("does_not_exist.txt").unwrap_err();
    let err: Box<dyn std::error::Error> = Box::new(err);

    core::any::request_ref(&*err)
        .filter(|backtrace: &&Backtrace| backtrace.status() == BacktraceStatus::Captured)
        .is_some();
}

Meta

rustc --version --verbose:

rustc 1.65.0-nightly (29e4a9ee0 2022-08-10)
binary: rustc
commit-hash: 29e4a9ee0253cd39e552a77f51f11f9a5f1c41e6
commit-date: 2022-08-10
host: aarch64-apple-darwin
release: 1.65.0-nightly
LLVM version: 14.0.6

Error output


warning: Error finalizing incremental compilation session directory `/private/var/folders/lk/j93xz9pd7nqgd5_2wlyxmbh00000gp/T/cargo-play.9foSRmYckR153Sew4jncVp6pCv6/target/debug/incremental/p9fosrmyckr153sew4jncvp6pcv6-16jhud67hwkzc/s-gckl42etmu-1gtt2w4-working`: No such file or directory (os error 2)

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

error: internal compiler error: encountered unmarked API: DefId(1:10395 ~ std[404a]::backtrace::BacktraceStatus::Captured::{constructor#0})
  --> src/main.rs:10:64
   |
10 |         .filter(|backtrace: &&Backtrace| backtrace.status() == BacktraceStatus::Captured)
   |                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: delayed at compiler/rustc_middle/src/middle/stability.rs:603:27

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1425:13
stack backtrace:
   0:        0x101737414 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb460ac204baac3ce
   1:        0x1017843d8 - core::fmt::write::hae297033d44a92a5
   2:        0x10172a0d8 - std::io::Write::write_fmt::h037c246666b44b21
   3:        0x101739f18 - std::panicking::default_hook::{{closure}}::hd335dd79f689c67c
   4:        0x101739c3c - std::panicking::default_hook::hcd9eddc291ffecc3
   5:        0x108fcc3fc - rustc_driver[370efe181afff837]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x10173a5dc - std::panicking::rust_panic_with_hook::h9edcaee3eda071cc
   7:        0x10ced7fc8 - std[404ae6a24c19b6d1]::panicking::begin_panic::<rustc_errors[7e67bbc17fa80f90]::ExplicitBug>::{closure#0}
   8:        0x10ced7888 - std[404ae6a24c19b6d1]::sys_common::backtrace::__rust_end_short_backtrace::<std[404ae6a24c19b6d1]::panicking::begin_panic<rustc_errors[7e67bbc17fa80f90]::ExplicitBug>::{closure#0}, !>
   9:        0x10d1948f8 - std[404ae6a24c19b6d1]::panicking::begin_panic::<rustc_errors[7e67bbc17fa80f90]::ExplicitBug>
  10:        0x10cecdf54 - std[404ae6a24c19b6d1]::panic::panic_any::<rustc_errors[7e67bbc17fa80f90]::ExplicitBug>
  11:        0x10ced2338 - <rustc_errors[7e67bbc17fa80f90]::HandlerInner as core[e3d95a7a6d17789d]::ops::drop::Drop>::drop
  12:        0x108f75984 - core[e3d95a7a6d17789d]::ptr::drop_in_place::<rustc_session[108990d735b810e4]::parse::ParseSess>
  13:        0x108f7c454 - <alloc[ff9c46132e4bd055]::rc::Rc<rustc_session[108990d735b810e4]::session::Session> as core[e3d95a7a6d17789d]::ops::drop::Drop>::drop
  14:        0x108f4cde8 - core[e3d95a7a6d17789d]::ptr::drop_in_place::<rustc_interface[b941e6899393b754]::interface::Compiler>
  15:        0x108f476c8 - rustc_span[ca96186211275a91]::with_source_map::<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_interface[b941e6899393b754]::interface::create_compiler_and_run<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_driver[370efe181afff837]::run_compiler::{closure#1}>::{closure#1}>
  16:        0x108f51c38 - rustc_interface[b941e6899393b754]::interface::create_compiler_and_run::<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_driver[370efe181afff837]::run_compiler::{closure#1}>
  17:        0x108fb8eb4 - <scoped_tls[9f555ee291229f33]::ScopedKey<rustc_span[ca96186211275a91]::SessionGlobals>>::set::<rustc_interface[b941e6899393b754]::interface::run_compiler<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_driver[370efe181afff837]::run_compiler::{closure#1}>::{closure#0}, core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>>
  18:        0x108f4d38c - std[404ae6a24c19b6d1]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b941e6899393b754]::util::run_in_thread_pool_with_globals<rustc_interface[b941e6899393b754]::interface::run_compiler<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_driver[370efe181afff837]::run_compiler::{closure#1}>::{closure#0}, core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>>::{closure#0}, core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>>
  19:        0x108f6ead8 - <<std[404ae6a24c19b6d1]::thread::Builder>::spawn_unchecked_<rustc_interface[b941e6899393b754]::util::run_in_thread_pool_with_globals<rustc_interface[b941e6899393b754]::interface::run_compiler<core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>, rustc_driver[370efe181afff837]::run_compiler::{closure#1}>::{closure#0}, core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>>::{closure#0}, core[e3d95a7a6d17789d]::result::Result<(), rustc_errors[7e67bbc17fa80f90]::ErrorGuaranteed>>::{closure#1} as core[e3d95a7a6d17789d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  20:        0x101742a14 - std::sys::unix::thread::Thread::new::thread_start::h0f0476df708df181
  21:        0x19d2f426c - __pthread_deallocate

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 (29e4a9ee0 2022-08-10) running on aarch64-apple-darwin

note: compiler flags: --crate-type bin -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:
end of query stack
warning: `p9fosrmyckr153sew4jncvp6pcv6` (bin "p9fosrmyckr153sew4jncvp6pcv6") generated 2 warnings
error: could not compile `p9fosrmyckr153sew4jncvp6pcv6`; 2 warnings emitted
Backtrace

   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
   3: core::ptr::drop_in_place::<rustc_session::parse::ParseSess>
   4: <alloc::rc::Rc<rustc_session::session::Session> as core::ops::drop::Drop>::drop
   5: core::ptr::drop_in_place::<rustc_interface::interface::Compiler>
   6: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
   7: rustc_interface::interface::create_compiler_and_run::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>

Activity

added
C-bugCategory: This is a bug.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 13, 2022
indietyp

indietyp commented on Aug 13, 2022

@indietyp
Author

closing, as this seems to have been resolved in #100399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @indietyp

        Issue actions

          no errors encountered even though `delay_span_bug` issued · Issue #100512 · rust-lang/rust