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

"thread panicked while panicking. aborting." when panicking in display trait, which is utilized in panic #97181

Closed
Elias-Graf opened this issue May 19, 2022 · 4 comments · Fixed by #122930
Labels
A-libtest Area: `#[test]` / the `test` library

Comments

@Elias-Graf
Copy link

Elias-Graf commented May 19, 2022

The following occurs when running the tests

Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=35f64605807f3e34fd6a5cb1e650677c

use std::fmt::{Display, self};

struct MyStruct;

impl Display for MyStruct {
    fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
        todo!()
    }
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn struct_does_stuff() {
        let instance = MyStruct;

        assert!(false, "oh no, '{}' was unexpected", instance);
    }
}

When the tests are ran, the current output is:

   Compiling playground v0.0.1 (/playground)
    Finished test [unoptimized + debuginfo] target(s) in 0.84s
     Running unittests src/lib.rs (target/debug/deps/playground-ab40f7b3bfdd8beb)
thread panicked while panicking. aborting.
error: test failed, to rerun pass '--lib'

After figuring out what the actual issue is, the error message makes sense. But my debugging journey would have been more pleasant, if the source location of the panics were included in the message. Much like the location of "non-nested" panics are printed.

Ideally the output should look like:

At least include the source location of the "inner" panic, or ideally both.

It also suggests to rerun pass with '--lib', which is a bit misleading.

If above is not possible, at least print the name of the test that is failing.

@Elias-Graf Elias-Graf added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 19, 2022
@Elias-Graf Elias-Graf changed the title "thread panicked while panicking. aborting." when panicing in display trait, which is utilized in panic "thread panicked while panicking. aborting." when panicking in display trait, which is utilized in panic May 19, 2022
@SNCPlay42
Copy link
Contributor

SNCPlay42 commented May 19, 2022

When run through fn main() instead of a test: (playground)

use std::fmt::{Display, self};

struct MyStruct;

impl Display for MyStruct {
    fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
        todo!()
    }
}

fn main() {
    let instance = MyStruct;

    assert!(false, "oh no, '{}' was unexpected", instance);
}

The full panic message and backtrace for the second panic is printed:

Output
thread 'main' panicked at 'not yet implemented', src/main.rs:7:9
stack backtrace:
   0:     0x563571da3b8d - std::backtrace_rs::backtrace::libunwind::trace::h22893a5306c091b4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x563571da3b8d - std::backtrace_rs::backtrace::trace_unsynchronized::h29c3bc6f9e91819d
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x563571da3b8d - std::sys_common::backtrace::_print_fmt::he497d8a0ec903793
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x563571da3b8d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9c2a9d2774d81873
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x563571dbd85c - core::fmt::write::hba4337c43d992f49
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/fmt/mod.rs:1194:17
   5:     0x563571da1ee1 - std::io::Write::write_fmt::heb73de6e02cfabed
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/io/mod.rs:1655:15
   6:     0x563571da5335 - std::sys_common::backtrace::_print::h63c8b24acdd8e8ce
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x563571da5335 - std::sys_common::backtrace::print::h426700d6240cdcc2
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x563571da5335 - std::panicking::default_hook::{{closure}}::hc9a76eed0b18f82b
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:295:22
   9:     0x563571da4fe9 - std::panicking::default_hook::h2e88d02087fae196
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:314:9
  10:     0x563571da5882 - std::panicking::rust_panic_with_hook::habfdcc2e90f9fd4c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:698:17
  11:     0x563571da5729 - std::panicking::begin_panic_handler::{{closure}}::he054b2a83a51d2cd
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:586:13
  12:     0x563571da4044 - std::sys_common::backtrace::__rust_end_short_backtrace::ha48b94ab49b30915
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x563571da5499 - rust_begin_unwind
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
  14:     0x563571d8e333 - core::panicking::panic_fmt::h366d3a309ae17c94
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
  15:     0x563571d8e1fd - core::panicking::panic::h8705e81f284be8a5
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:48:5
  16:     0x563571d8e97a - <playground::MyStruct as core::fmt::Display>::fmt::h6f90f32f95d43e3a
                               at /playground/src/main.rs:7:9
  17:     0x563571dbd85c - core::fmt::write::hba4337c43d992f49
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/fmt/mod.rs:1194:17
  18:     0x563571da560c - core::fmt::Write::write_fmt::h3214023ca791c445
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/fmt/mod.rs:186:9
  19:     0x563571da560c - std::panicking::begin_panic_handler::PanicPayload::fill::{{closure}}::hb23d5bd8873a190f
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:550:22
  20:     0x563571da560c - core::option::Option<T>::get_or_insert_with::hbda74080d40f0cf4
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/option.rs:1542:49
  21:     0x563571da560c - std::panicking::begin_panic_handler::PanicPayload::fill::hb290995d7f51538f
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:548:13
  22:     0x563571da560c - <std::panicking::begin_panic_handler::PanicPayload as core::panic::BoxMeUp>::get::hfba56e16158aca28
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:566:13
  23:     0x563571da5870 - std::panicking::rust_panic_with_hook::habfdcc2e90f9fd4c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:697:34
  24:     0x563571da5767 - std::panicking::begin_panic_handler::{{closure}}::he054b2a83a51d2cd
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:588:13
  25:     0x563571da4044 - std::sys_common::backtrace::__rust_end_short_backtrace::ha48b94ab49b30915
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:138:18
  26:     0x563571da5499 - rust_begin_unwind
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
  27:     0x563571d8e333 - core::panicking::panic_fmt::h366d3a309ae17c94
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
  28:     0x563571d8e9e0 - playground::main::h558e18b54abd4495
                               at /playground/src/main.rs:14:5
  29:     0x563571d8e8fb - core::ops::function::FnOnce::call_once::h570318ebb6504eb8
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5
  30:     0x563571d8e5fe - std::sys_common::backtrace::__rust_begin_short_backtrace::he78760a9857bb664
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/sys_common/backtrace.rs:122:18
  31:     0x563571d8e691 - std::rt::lang_start::{{closure}}::hbf4c93d41c9dece9
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:145:18
  32:     0x563571d9fc6e - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::had4f69b3aefb47a8
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:259:13
  33:     0x563571d9fc6e - std::panicking::try::do_call::hf2ad5355fcafe775
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
  34:     0x563571d9fc6e - std::panicking::try::h0a63ac363423e61e
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
  35:     0x563571d9fc6e - std::panic::catch_unwind::h18088edcecb8693a
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
  36:     0x563571d9fc6e - std::rt::lang_start_internal::{{closure}}::ha7dad166dc711761
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:48
  37:     0x563571d9fc6e - std::panicking::try::do_call::hda0c61bf3a57d6e6
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:492:40
  38:     0x563571d9fc6e - std::panicking::try::hbc940e68560040a9
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:456:19
  39:     0x563571d9fc6e - std::panic::catch_unwind::haed0df2aeb3fa368
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panic.rs:137:14
  40:     0x563571d9fc6e - std::rt::lang_start_internal::h9c06694362b5b80c
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:128:20
  41:     0x563571d8e660 - std::rt::lang_start::hdacf7ba74a6dd5d1
                               at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/rt.rs:144:17
  42:     0x563571d8ea0c - main
  43:     0x7fc16c471083 - __libc_start_main
  44:     0x563571d8e52e - _start
  45:                0x0 - <unknown>
thread panicked while panicking. aborting.

I think when run as a test, the panic output is captured (as normal for a test), but is then not printed because of the abort.

@rustbot label -A-diagnostics -T-compiler +A-libtest

(I'm not sure what the correct team assignment for this is...)

@rustbot rustbot added A-libtest Area: `#[test]` / the `test` library and removed A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 19, 2022
@SNCPlay42
Copy link
Contributor

The output capturing mechanism has code to try to prevent capturing output from a double-panic:

fn print_to<T>(args: fmt::Arguments<'_>, global_s: fn() -> T, label: &str)
where
T: Write,
{
if OUTPUT_CAPTURE_USED.load(Ordering::Relaxed)
&& OUTPUT_CAPTURE.try_with(|s| {
// Note that we completely remove a local sink to write to in case
// our printing recursively panics/prints, so the recursive
// panic/print goes to the global sink instead of our local sink.
s.take().map(|w| {
let _ = w.lock().unwrap_or_else(|e| e.into_inner()).write_fmt(args);
s.set(Some(w));
})
}) == Ok(Some(()))
{
// Successfully wrote to capture buffer.
return;
}

But the panic message is actually written into a string first:

fn fill(&mut self) -> &mut String {
use crate::fmt::Write;
let inner = self.inner;
// Lazily, the first time this gets called, run the actual string formatting.
self.string.get_or_insert_with(|| {
let mut s = String::new();
drop(s.write_fmt(*inner));
s
})
}
}

@correabuscar
Copy link

correabuscar commented Mar 21, 2024

@SNCPlay42
re your prev. comment #97181 (comment)

When run through fn main() instead of a test: (playground)
The full panic message and backtrace for the second panic is printed:

That doesn't happen anymore, with rust 1.75.0, it seems to be a regression, all I get is what the playground shows, even with rust nightly with RUST_BACKTRACE on:

⣿
Errors

Exited with signal 6 (SIGABRT): abort program

Standard Error

   Compiling playground v0.0.1 (/playground)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.60s
     Running `target/debug/playground`
thread panicked while processing panic. aborting.

Standard Output

so, no stack trace.

The actual double panic stacktrace is inside that payload.get() from:

info.set_payload(payload.get());

click me to expand contents
thread panicked while processing panic. aborting. msg='Some(not yet implemented)' loc='Location { file: "/home/user/sandbox/rust/05_sandbox/tests/ri97181/src/main.rs", line: 7, col: 9 }'
   0: std::panicking::rust_panic_with_hook
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:751:32
   1: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:649:13
   2: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
   3: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   4: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   5: core::panicking::panic
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:127:5
   6: <ri97181::MyStruct as core::fmt::Display>::fmt
             at ./src/main.rs:7:9
   7: core::fmt::rt::Argument::fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   8: core::fmt::write
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   9: <&mut W as core::fmt::Write::write_fmt::SpecWriteFmt>::spec_write_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:211:17
  10: core::fmt::Write::write_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:215:14
  11: std::panicking::begin_panic_handler::FormatStringPayload::fill::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:611:30
  12: core::option::Option<T>::get_or_insert_with
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:1663:26
  13: std::panicking::begin_panic_handler::FormatStringPayload::fill
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:609:13
  14: <std::panicking::begin_panic_handler::FormatStringPayload as core::panic::PanicPayload>::get
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:627:13
  15: std::panicking::rust_panic_with_hook
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:787:19
  16: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:657:13
  17: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  18: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  19: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  20: ri97181::main
             at ./src/main.rs:14:5
  21: core::ops::function::FnOnce::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:250:5
  22: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:154:18
  23: std::rt::lang_start::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:167:18
  24: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
  25: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  26: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  27: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  28: std::rt::lang_start_internal::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
  29: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  30: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  31: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  32: std::rt::lang_start_internal
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
  33: std::rt::lang_start
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:166:17
  34: main
  35: __libc_start_call_main
             at /usr/src/debug/sys-libs/glibc-2.39-r2/glibc-2.39/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  36: __libc_start_main_impl
             at /usr/src/debug/sys-libs/glibc-2.39-r2/glibc-2.39/csu/../csu/libc-start.c:360:3
  37: _start

but to get the above output, I had to use a rust patch:

Index: /var/tmp/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/library/std/src/panicking.rs
===================================================================
--- .orig/var/tmp/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/library/std/src/panicking.rs
+++ /var/tmp/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/library/std/src/panicking.rs
@@ -746,9 +747,11 @@ fn rust_panic_with_hook(
             panic_count::MustAbort::PanicInHook => {
                 // Don't try to print the message in this case
                 // - perhaps that is causing the recursive panics.
-                rtprintpanic!("thread panicked while processing panic. aborting.\n");
+                rtprintpanic!("thread panicked while processing panic. aborting. msg='{:?}' loc='{:?}'\n",message, location);
+                println!("{}", crate::backtrace::Backtrace::force_capture());
             }
             panic_count::MustAbort::AlwaysAbort => {
+                println!("in panic_count::MustAbort::AlwaysAbort");
                 // Unfortunately, this does not print a backtrace, because creating
                 // a `Backtrace` will allocate, which we must to avoid here.
                 let panicinfo = PanicInfo::internal_constructor(

Is it a regression ? Or am I missing something here.
How was it able to print the stacktrace before (back in 2022 when you made the comment) but now can't ?!

EDIT: Also, this means, it doesn't get to execute a potential user-set panic hook.

EDIT2: I've confirmed that indeed the stacktrace is shown with rustc 1.63.0-nightly (cd282d7f7 2022-05-18)
EDIT3: Regression found, curiously 1 year and 10 days later:

********************************************************************************
Regression in nightly-2023-05-28
********************************************************************************

fetching https://static.rust-lang.org/dist/2023-05-27/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2023-05-27: 40 B / 40 B [===========================================] 100.00 % 596.60 KB/s converted 2023-05-27 to 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10
fetching https://static.rust-lang.org/dist/2023-05-28/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2023-05-28: 40 B / 40 B [===========================================] 100.00 % 459.90 KB/s converted 2023-05-28 to cca7ee58110726983951a19d5fb7316d9243925d
looking for regression commit between 2023-05-27 and 2023-05-28
fetching (via remote github) commits from max(1a5f8bce74ee432f7cc3aa131bc3d6920e06de10, 2023-05-25) to cca7ee58110726983951a19d5fb7316d9243925d
ending github query because we found starting sha: 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10
get_commits_between returning commits, len: 10
  commit[0] 2023-05-26: Auto merge of #103291 - ink-feather-org:typeid_no_struct_match, r=dtolnay
  commit[1] 2023-05-26: Auto merge of #112013 - matthiaskrgr:rollup-a4pg2p8, r=matthiaskrgr
  commit[2] 2023-05-27: Auto merge of #111245 - fee1-dead-contrib:temp-fix-tuple-struct-field, r=lcnr
  commit[3] 2023-05-27: Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, r=albertlarsan68,oli-obk
  commit[4] 2023-05-27: Auto merge of #111928 - c410-f3r:dqewdas, r=eholk
  commit[5] 2023-05-27: Auto merge of #111934 - scottmcm:stabilize-hash-one, r=Amanieu
  commit[6] 2023-05-27: Auto merge of #112016 - GuillaumeGomez:rollup-fhqn4i6, r=GuillaumeGomez
  commit[7] 2023-05-27: Auto merge of #110975 - Amanieu:panic_count, r=joshtriplett
  commit[8] 2023-05-27: Auto merge of #111006 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
  commit[9] 2023-05-27: Auto merge of #112025 - matthiaskrgr:rollup-j693v67, r=matthiaskrgr
ERROR: no CI builds available between 1a5f8bce74ee432f7cc3aa131bc3d6920e06de10 and cca7ee58110726983951a19d5fb7316d9243925d within last 167 days

EDIT4: first glance appears to be #110975 but I'll try to double check.

@RalfJung
Copy link
Member

Yeah indeed, today even in main this just prints

thread panicked while processing panic. aborting.

which is pretty barren. Not sure if it would make sense to try and catch panics during message formatting, and then still print a backtrace but without a message, or so.

That may be what @Amanieu suggested here; I am not entirely sure.

@bors bors closed this as completed in 691d5f5 Mar 23, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 23, 2024
Rollup merge of rust-lang#122930 - RalfJung:panic-in-panic-fmt, r=Amanieu

add panic location to 'panicked while processing panic'

Fixes rust-lang#97181

r? `@Amanieu`
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Mar 24, 2024
add panic location to 'panicked while processing panic'

Fixes rust-lang/rust#97181

r? `@Amanieu`
RenjiSann pushed a commit to RenjiSann/rust that referenced this issue Mar 25, 2024
…nieu

add panic location to 'panicked while processing panic'

Fixes rust-lang#97181

r? `@Amanieu`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libtest Area: `#[test]` / the `test` library
Projects
Development

Successfully merging a pull request may close this issue.

5 participants