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

Print thread ID in panic message #115746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Sep 11, 2023

panic! does not print any identifying information for threads that are unnamed. However, in many cases, the thread ID can be determined. This can be useful to tie panic messages to error logs.

This changes the panic message from something like this:

thread '<unnamed>' panicked at src/main.rs:3:5:
explicit panic

To something like this:

thread '<unnamed>' (id 2) panicked at src/main.rs:3:5:
explicit panic

There is no change in output for named threads or for threads where an ID cannot be determined.

Unanswered questions

  • Exact output format (is thread ID useful to print even on named threads?)
  • Usage of as_u64 even though that API may not become stable. I think this is ok since we are not bound to this exact text and can change it in the future if needed. An alternative is to use the debug format ThreadId(2) (which I have seen used by log formatters), but I do not think this really gains much.

@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 11, 2023
@tgross35
Copy link
Contributor Author

tgross35 commented Sep 11, 2023

I think this needs FCP since it's a visible change

@rustbot label -T-libs -T-compiler +T-libs-api
r? libs-api

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 11, 2023
@rustbot rustbot assigned joshtriplett and unassigned davidtwco Sep 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2023

The Miri subtree was changed

cc @rust-lang/miri

@tgross35 tgross35 force-pushed the unnamed-threads-panic-message branch 2 times, most recently from 8e72037 to 3da1046 Compare September 11, 2023 06:13
@rustbot rustbot removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 11, 2023
@tgross35
Copy link
Contributor Author

cc @m-ou-se since you recently did the formatting in #112849

@bjorn3
Copy link
Member

bjorn3 commented Sep 11, 2023

Maybe

thread '<unnamed 2>' panicked at src/main.rs:3:5:
explicit panic

or

thread '<unnamed#2>' panicked at src/main.rs:3:5:
explicit panic

? That fits more with the way named threads are shown.

@the8472
Copy link
Member

the8472 commented Sep 11, 2023

Note that this is a rust-internal thread ID, which isn't the OS thread ID which can be relevant if you're also logging from C code or looking at things with GDB. And as_u64() is unstable and there are questions about stabilizing it (#110738).

@tgross35
Copy link
Contributor Author

tgross35 commented Sep 11, 2023

Maybe

thread '<unnamed 2>' panicked at src/main.rs:3:5:
explicit panic

or

thread '<unnamed#2>' panicked at src/main.rs:3:5:
explicit panic

I just proposed the syntax as a demo, figured libs-api would make the final choice - though between those two, I like the first one better

Note that this is a rust-internal thread ID, which isn't the OS thread ID which can be relevant if you're also logging from C code or looking at things with GDB. And as_u64() is unstable and there are questions about stabilizing it (#110738).

It is kind of unfortunate that Rust and C won't use the same thread IDs. But this seems worthwhile still - Rust-only applications printing the thread ID in logs is common (tracing even has a builtin way to do this), probably more common than Rust thread IDs silently mixing with C thread IDs in logs. And even in that case, it still gives you something more concrete to trace than "something failed".

This is all inspired by the below failure I recently had in an highly threaded system. The entire backtrace uselessly displayed one repeated function, with no hints about which preceding log events were relevant:

thread '<unnamed>' panicked at src/scan.rs:101:55:
called `Result::unwrap()` on an `Err` value: ()
stack backtrace:
   0:        0x1009661d0 - __mh_execute_header
   1:        0x10088869b - __mh_execute_header
   2:        0x10093ba0e - __mh_execute_header
   4:        0x10096757c - __mh_execute_header
   5:        0x100968632 - __mh_execute_header
   6:        0x1009680f4 - __mh_execute_header
   7:        0x100968059 - __mh_execute_header
   8:        0x100968042 - __mh_execute_header
   9:        0x100bdd913 - __mh_execute_header

I don't think that stability of the thread ID is much of a concern since we will always have some integer ID for a thread, even if the semantics of that ID might change. The important thing is probably just that this panic message thread ID is the same as what shows up as Debug for ThreadId (or as_u64 as applicable) since that is what other libraries are directed to use. That is the case here

@tgross35
Copy link
Contributor Author

tgross35 commented Sep 15, 2023

Another display option - it looks a bit cleaner to not even call out that a thread is unnamed, and I don't think it adds much

thread with ID 2 panicked at src/main.rs:3:5:
explicit panic

Or we could use ThreadId's debug formatting which tracing and I think log do, but that seems unnecessarily clunky

thread with `ThreadId(2)` panicked at src/main.rs:3:5:
explicit panic

I also tried to poke some discussion at #67939

@bors
Copy link
Contributor

bors commented Sep 19, 2023

☔ The latest upstream changes (presumably #115627) made this pull request unmergeable. Please resolve the merge conflicts.

@tgross35
Copy link
Contributor Author

@joshtriplett do you have any thoughts on this?

@tgross35 tgross35 force-pushed the unnamed-threads-panic-message branch from 3da1046 to e055544 Compare November 9, 2023 17:20
@timClicks
Copy link
Contributor

Sorry to add bike shedding to the thread. Here is a slight derivative of the last suggestion, which omits a "with":

thread `ThreadId(2)` panicked at src/main.rs:3:5:
explicit panic

Although it's uglier than using the thread identifier in a sentence, using the Debug form makes it look like a Rust value rather than something else. It's also consistent with other output from Rust, although the case can definitely be made that thread IDs deserve a special case.

@tgross35
Copy link
Contributor Author

tgross35 commented Dec 1, 2023

I know Josh has a pretty busy queue, so perhaps it is best to reroll

r? libs-api

@rustbot rustbot assigned dtolnay and unassigned joshtriplett Dec 1, 2023
@dtolnay
Copy link
Member

dtolnay commented Dec 1, 2023

I think this needs FCP since it's a visible change

@​rustbot label -T-libs -T-compiler +T-libs-api

I think it wouldn't need one. T-libs-api FCP is primarily for any time a permanent API commitment is being made by the standard library, and deprecations. In contrast, anything that we can just change back with minimal effort or disruption would not warrant FCP.

#112849 had a T-libs FCP but I am not familiar with their criteria for that. @rust-lang/libs would you want to handle this PR?

In any case, this looks good to me.

@thomcc
Copy link
Member

thomcc commented Dec 1, 2023

I don't know that this needs FCP. I'm not opposed and there is precedent for it, but OTOH we wouldn't FCP a panic message change somewhere in the stdlib. So I don't feel strongly.

In any case, I think this change is a good idea, and am in favor.

@rfcbot rfcbot added the disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. label Dec 1, 2023
@the8472
Copy link
Member

the8472 commented Dec 2, 2023

The important thing is probably just that this panic message thread ID is the same as what shows up as Debug for ThreadId (or as_u64 as applicable) since that is what other libraries are directed to use

Hrm, really? I'd rather be in favor of having the OS ID here since that's what external tools will use.
I'm not opposed to use the rust thread ID for now since that's what's easily available. But I would also like to switch to the OS ID if/when we add that.

@tgross35
Copy link
Contributor Author

tgross35 commented Dec 2, 2023

The important thing is probably just that this panic message thread ID is the same as what shows up as Debug for ThreadId (or as_u64 as applicable) since that is what other libraries are directed to use

Hrm, really? I'd rather be in favor of having the OS ID here since that's what external tools will use. I'm not opposed to use the rust thread ID for now since that's what's easily available. But I would also like to switch to the OS ID if/when we add that.

I am largely going off of what tracing offers out of the box here, and some uses I have seen for log. I agree that the OS ID would be nice, but without a no-dependency safe way to access it I don't think any libraries are likely to work with it unless they have FFI interop.

Really what I think would be best is something like I proposed in #67939 (comment), where our ThreadID is the OS thread ID extended to u128 with a pseudorandom nonrepeating counter, with a display impl in UUID format. Then you can have a short form (truncate everything after the first -) which is exactly the OS thread ID (probably enough for most applications), or print the full string to get Rust's globally unique ID.

This change shouldn't block something better in the future though.

@the8472
Copy link
Member

the8472 commented Dec 2, 2023

I think we should also keep the simpler option open to have a separate method to get the os thread ID and later switch to that rather than using the composite u128 id.

@m-ou-se
Copy link
Member

m-ou-se commented Dec 6, 2023

Showing the ID for unnamed threads seems useful to tell them apart, but I'd prefer something like <unnamed#2>.

@tgross35
Copy link
Contributor Author

In an attempt to resolve the minor impasse here, I created a poll: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Printing.20thread.20ID.20on.20panic.20bikeshed. All votes welcome

@thomcc
Copy link
Member

thomcc commented Feb 1, 2024

I'm going to be away for a few months, so I'm rerolling my PRs so that folks don't have to wait for me. Sorry/thanks.

r? libs

@rustbot rustbot assigned cuviper and unassigned thomcc Feb 1, 2024
@cuviper cuviper added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2024
@bors
Copy link
Contributor

bors commented Feb 16, 2024

☔ The latest upstream changes (presumably #120881) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 16, 2024
@Zoxc
Copy link
Contributor

Zoxc commented Mar 9, 2024

It would be useful to print the id even for named thread. rustc for example uses rustc as the name for all threads in its thread pool.

OS ids may not be as useful for debug printing as they could be reused (which is the case on Windows).

@ChrisDenton
Copy link
Member

I don't think that's too much of an issue. IDs will never overlap and it's better than printing the same name for each thread.

If it is a concern then also printing the thread creation time would work to disambiguate.

@joshtriplett
Copy link
Member

@rfcbot concern ambiguous-non-os-thread-id

Ideally, I think this should be displaying an OS thread ID, which is more useful. If we have to display a Rust thread ID instead, and we don't make those match OS thread IDs, then I think we need to unambiguously identify it as such so people don't get surprised when it isn't an OS thread ID.

How easily could we use the OS thread ID here? If we can do so easily, I think we should.

@the8472
Copy link
Member

the8472 commented Jun 19, 2024

In an attempt to resolve the minor impasse here, I created a poll: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Printing.20thread.20ID.20on.20panic.20bikeshed. All votes welcome

It is somewhat unfortunate that the poll was only posted with the unnamed options and the named options were only added later so imo it's unclear whether it settled the

is thread ID useful to print even on named threads?

question

@ChrisDenton
Copy link
Member

Ideally, I think this should be displaying an OS thread ID, which is more useful

If we do that then we really should have a way for the user to query the OS thread ID.

is thread ID useful to print even on named threads?

Yes. Thread IDs are guaranteed not to conflict (at least while they're active) whereas thread names have no such guarantee.

@tgross35
Copy link
Contributor Author

@rfcbot concern ambiguous-non-os-thread-id

Ideally, I think this should be displaying an OS thread ID, which is more useful. If we have to display a Rust thread ID instead, and we don't make those match OS thread IDs, then I think we need to unambiguously identify it as such so people don't get surprised when it isn't an OS thread ID.

How easily could we use the OS thread ID here? If we can do so easily, I think we should.

Unfortunately, it turns out this isn't very easy for a running thread. Either we need to store the OS TID when we create the thread, or we need to do a bit of a hack to get it from libc via the handle (see the Zulip thread, I also reached out to the glibc maintainers).

I think everyone agrees that using the OS TID would be better, but doing that doesn't seem to make sense if we don't also expose that API to the user. It wouldn't be as useful to print OS TID in panic messages if you don't also have a (straightforward) way to print it in log messages.

So regarding the concern, my proposal is:

  1. Make this PR's change, keeping the "Rust TID"
  2. Orthogonality figure out how to provide a user API to get the OS TID
  3. Once that is available, evaluate changing panic messages to use OS TID

is thread ID useful to print even on named threads?

I think most people have been answering yes to this one, and I generally agree

`panic!` does not print any identifying information for threads that are
unnamed. However, in many cases, the thread ID can be determined.

This changes the panic message from something like this:

    thread '<unnamed>' panicked at src/main.rs:3:5:
    explicit panic

To something like this:

    thread '<unnamed>' (1234) panicked at src/main.rs:3:5:
    explicit panic

This change applies to both named and unnamed threads. There is no
change for threads where an ID cannot be determined.
@tgross35 tgross35 force-pushed the unnamed-threads-panic-message branch from e055544 to c322091 Compare June 19, 2024 21:11
@tgross35
Copy link
Contributor Author

I updated this PR to always print the thread ID (as it seems like most people want), but removing the actual text "id" (as was brought up on Zulip):

thread 'foo' (1234) panicked at foo.rs:10:10:
thread '<unnamed>' (4321) panicked at foo.rs:10:10:

I am happy to change this as needed, but just need a specific suggestion from the voting members to hopefully not bikeshed too much more.

I only updated a portion of the UI tests in case there are further changes, will get the rest after FCP starts.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-17 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 exporting to docker image format
#16 sending tarball 24.9s done
#16 DONE 36.0s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-17]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-17', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---

---- [ui] tests/ui/const-generics/generic_const_exprs/issue-80742.rs stdout ----
diff of stderr:

1 error: internal compiler error: compiler/rustc_const_eval/src/interpret/step.rs:LL:CC: SizeOf MIR operator called for unsized type dyn Debug
2   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
3 
+ thread 'rustc' (3) panicked at compiler/rustc_const_eval/src/interpret/step.rs:241:21:
5 query stack during panic:
5 query stack during panic:
6 #0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:26:1: 28:32>::{constant#0}`

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/issue-80742/issue-80742.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args const-generics/generic_const_exprs/issue-80742.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/generic_const_exprs/issue-80742.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/issue-80742" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/generic_const_exprs/issue-80742/auxiliary"
--- stderr -------------------------------
--- stderr -------------------------------
##[error]error: internal compiler error: compiler/rustc_const_eval/src/interpret/step.rs:241:21: SizeOf MIR operator called for unsized type dyn Debug


thread 'rustc' (3) panicked at compiler/rustc_const_eval/src/interpret/step.rs:241:21:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at /checkout/tests/ui/const-generics/generic_const_exprs/issue-80742.rs:26:1: 28:32>::{constant#0}`
#1 [eval_to_valtree] evaluating type-level constant
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/extern/extern-types-field-offset.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+ thread 'main' (1) panicked at library/core/src/panicking.rs:$LINE:$COL:
2 attempted to compute the size or alignment of extern type `Opaque`
4 thread caused non-unwinding panic. aborting.


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-field-offset/extern-types-field-offset.run.stderr

error: 1 errors occurred comparing run output.
status: signal: 6 (SIGABRT) (core dumped)
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-field-offset" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-field-offset/a"
--- stderr -------------------------------
thread 'main' (1) panicked at library/core/src/panicking.rs:221:5:
attempted to compute the size or alignment of extern type `Opaque`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
------------------------------------------


---- [ui] tests/ui/extern/extern-types-size_of_val.rs#align stdout ----
diff of run.stderr:

- thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+ thread 'main' (1) panicked at library/core/src/panicking.rs:$LINE:$COL:
2 attempted to compute the size or alignment of extern type `A`
4 thread caused non-unwinding panic. aborting.


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.align/extern-types-size_of_val.align.run.stderr

error in revision `align`: 1 errors occurred comparing run output.
status: signal: 6 (SIGABRT) (core dumped)
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.align" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.align/a"
--- stderr -------------------------------
thread 'main' (1) panicked at library/core/src/panicking.rs:221:5:
attempted to compute the size or alignment of extern type `A`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
------------------------------------------


---- [ui] tests/ui/extern/extern-types-size_of_val.rs#size stdout ----
diff of run.stderr:

- thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+ thread 'main' (1) panicked at library/core/src/panicking.rs:$LINE:$COL:
2 attempted to compute the size or alignment of extern type `A`
4 thread caused non-unwinding panic. aborting.


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.size/extern-types-size_of_val.size.run.stderr
error in revision `size`: 1 errors occurred comparing run output.
error in revision `size`: 1 errors occurred comparing run output.
status: signal: 6 (SIGABRT) (core dumped)
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.size" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-types-size_of_val.size/a"
--- stderr -------------------------------
thread 'main' (1) panicked at library/core/src/panicking.rs:221:5:
attempted to compute the size or alignment of extern type `A`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
------------------------------------------


---- [ui] tests/ui/hygiene/panic-location.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at library/alloc/src/raw_vec.rs:LL:CC:
+ thread 'main' (1) panicked at library/alloc/src/raw_vec.rs:LL:CC:
2 capacity overflow
4 


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location/panic-location.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/hygiene/panic-location/a"
stdout: none
---
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/intrinsics/const-eval-select-backtrace/const-eval-select-backtrace.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/intrinsics/const-eval-select-backtrace" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/intrinsics/const-eval-select-backtrace/a"
stdout: none
---
To only update this specific test, also pass `--test-args intrinsics/not-overridden.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/intrinsics/not-overridden.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/intrinsics/not-overridden" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/intrinsics/not-overridden/auxiliary"
--- stderr -------------------------------
##[error]error: internal compiler error: /checkout/compiler/rustc_codegen_ssa/src/mir/block.rs:990:29: intrinsic const_deallocate must be overridden by codegen backend, but isn't
  --> /checkout/tests/ui/intrinsics/not-overridden.rs:16:14
   |
---
note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
end of query stack
error: aborting due to 1 previous error
------------------------------------------
---
5 Once instance has previously been poisoned
6 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-87707/issue-87707.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-87707" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-87707/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/issues/issue-87707.rs:14:24:
Here Once instance is poisoned.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
3 


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/layout/valid_range_oob/valid_range_oob.stderr
To only update this specific test, also pass `--test-args layout/valid_range_oob.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/layout/valid_range_oob.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/layout/valid_range_oob" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/layout/valid_range_oob/auxiliary"
--- stderr -------------------------------
thread 'rustc' (3) panicked at /checkout/compiler/rustc_abi/src/layout.rs:413:17:
257 > 255
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
#0 [layout_of] computing layout of `Foo`
#0 [layout_of] computing layout of `Foo`
#1 [eval_to_allocation_raw] const-evaluating + checking `FOO`
------------------------------------------


---- [ui] tests/ui/macros/assert-long-condition.rs stdout ----
---
3                                 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
4 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/assert-long-condition/assert-long-condition.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/assert-long-condition" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/assert-long-condition/a"
stdout: none
---

11 LL |             StorageLive(a);
12    |             ^^^^^^^^^^^^^^
13 
+ thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
14 aborting due to `-Z treat-err-as-bug=1`
16 


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/lint/storage-live/storage-live.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args mir/lint/storage-live.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/mir/lint/storage-live.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/lint/storage-live" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/lint/storage-live/auxiliary" "-Zlint-mir" "-Ztreat-err-as-bug"
--- stderr -------------------------------
--- stderr -------------------------------
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[e681]::multiple_storage)) (after pass CheckPackedRef) at bb0[1]:
                                StorageLive(_1) which already has storage here
   |
LL |             StorageLive(a);
   |             ^^^^^^^^^^^^^^
   |
   |
note: delayed at compiler/rustc_mir_transform/src/lint.rs:97:26 - disabled backtrace
  --> /checkout/tests/ui/mir/lint/storage-live.rs:23:13
   |
LL |             StorageLive(a);
   |             ^^^^^^^^^^^^^^

thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
aborting due to `-Z treat-err-as-bug=1`

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly
note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z lint-mir -Z treat-err-as-bug
query stack during panic:
end of query stack
------------------------------------------



---- [ui] tests/ui/nll/issue-51345-2.rs stdout ----

error: error pattern 'thread 'main' panicked' not found!
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-51345-2" && RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-51345-2/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/nll/issue-51345-2.rs:8:26:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
---- [ui] tests/ui/numbers-arithmetic/overflowing-sub.rs stdout ----

error: error pattern 'thread 'main' panicked' not found!
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/overflowing-sub" && RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/numbers-arithmetic/overflowing-sub/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/numbers-arithmetic/overflowing-sub.rs:10:14:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
4 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
5 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/fmt-only-once/fmt-only-once.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/fmt-only-once" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/fmt-only-once/a"
stdout: none
---
3 stack backtrace:
4    0: std::panicking::begin_panic


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.legacy/issue-47429-short-backtraces.legacy.run.stderr

error in revision `legacy`: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.legacy" && RUST_BACKTRACE="1" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.legacy/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/issue-47429-short-backtraces.rs:23:5:
explicit panic
stack backtrace:
---
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-column/location-detail-panic-no-column.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-column" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-column/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/location-detail-panic-no-column.rs:7:0:
column-redacted
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
3 stack backtrace:
4    0: std::panicking::begin_panic::<&str>


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.v0/issue-47429-short-backtraces.v0.run.stderr

error in revision `v0`: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.v0" && RUST_BACKTRACE="1" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/issue-47429-short-backtraces.v0/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/issue-47429-short-backtraces.rs:23:5:
explicit panic
stack backtrace:
---

---- [ui] tests/ui/panics/location-detail-panic-no-file.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at <redacted>:7:5:
+ thread 'main' (1) panicked at <redacted>:7:5:
2 file-redacted
4 


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-file/location-detail-panic-no-file.run.stderr

error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-file" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-file/a"
stdout: none
--- stderr -------------------------------
thread 'main' (1) panicked at <redacted>:7:5:
file-redacted
------------------------------------------


---- [ui] tests/ui/panics/location-detail-unwrap-no-file.rs stdout ----
---- [ui] tests/ui/panics/location-detail-unwrap-no-file.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at <redacted>:8:9:
+ thread 'main' (1) panicked at <redacted>:8:9:
2 called `Option::unwrap()` on a `None` value
4 


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-unwrap-no-file/location-detail-unwrap-no-file.run.stderr

error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-unwrap-no-file" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-unwrap-no-file/a"
stdout: none
--- stderr -------------------------------
thread 'main' (1) panicked at <redacted>:8:9:
called `Option::unwrap()` on a `None` value
------------------------------------------


---- [ui] tests/ui/panics/location-detail-panic-no-location-info.rs stdout ----
---- [ui] tests/ui/panics/location-detail-panic-no-location-info.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at <redacted>:0:0:
+ thread 'main' (1) panicked at <redacted>:0:0:
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4 



The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-location-info/location-detail-panic-no-location-info.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-location-info" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-location-info/a"
stdout: none
stdout: none
--- stderr -------------------------------
thread 'main' (1) panicked at <redacted>:0:0:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------


---
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4 


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-line/location-detail-panic-no-line.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-line" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/location-detail-panic-no-line/a"
stdout: none
---


---- [ui] tests/ui/panics/main-panic.rs stdout ----

error: error pattern 'thread 'main' panicked at' not found!
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/main-panic" && RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/main-panic/a"
stdout: none
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/main-panic.rs:6:5:
---
- thread 'main' panicked at $DIR/panic-in-cleanup.rs:16:9:
+ thread 'main' (1) panicked at $DIR/panic-in-cleanup.rs:16:9:
5 BOOM
6 stack backtrace:
- thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+ thread 'main' (1) panicked at library/core/src/panicking.rs:$LINE:$COL:
8 panic in a destructor during cleanup
9 thread caused non-unwinding panic. aborting.


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-cleanup/panic-in-cleanup.run.stderr
error: 1 errors occurred comparing run output.
error: 1 errors occurred comparing run output.
status: signal: 6 (SIGABRT) (core dumped)
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-cleanup" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-cleanup/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/panic-in-cleanup.rs:22:5:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
   4:     0x7f799074d975 - std[a8c82c70e1792198]::panicking::default_hook::{closure#1}
   5:     0x7f799074d53c - std[a8c82c70e1792198]::panicking::default_hook
   6:     0x7f799074e212 - std[a8c82c70e1792198]::panicking::rust_panic_with_hook
   7:     0x5574dd06326a - std::panicking::begin_panic::{{closure}}::hfeef5d96fb9d6114
   8:     0x5574dd0631d6 - std::sys::backtrace::__rust_end_short_backtrace::hdd4861a76b1f228c
   9:     0x5574dd063217 - std::panicking::begin_panic::hfae16e0a71d98c5c
  10:     0x5574dd063a89 - <panic_in_cleanup::Bomb as core::ops::drop::Drop>::drop::h0dae05f7693d1e72
  11:     0x5574dd0633e6 - core::ptr::drop_in_place<panic_in_cleanup::Bomb>::h611269a68dfb58e5
  12:     0x5574dd063ab8 - panic_in_cleanup::main::h6ff1a6f085b80f0f
  14:     0x5574dd0631e6 - std::sys::backtrace::__rust_begin_short_backtrace::hbf32c0edcdbd0688
  15:     0x5574dd0631b9 - std::rt::lang_start::{{closure}}::h2b77e12bf21862ea
  16:     0x7f799072f15a - std[a8c82c70e1792198]::rt::lang_start_internal
  17:     0x5574dd063197 - std::rt::lang_start::h9421885746a92d47
---
- thread 'main' panicked at $DIR/panic-in-ffi.rs:13:5:
+ thread 'main' (1) panicked at $DIR/panic-in-ffi.rs:13:5:
2 Test
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
- thread 'main' panicked at library/core/src/panicking.rs:$LINE:$COL:
+ thread 'main' (1) panicked at library/core/src/panicking.rs:$LINE:$COL:
6 stack backtrace:
7 thread caused non-unwinding panic. aborting.



The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-ffi/panic-in-ffi.run.stderr
error: 1 errors occurred comparing run output.
error: 1 errors occurred comparing run output.
status: signal: 6 (SIGABRT) (core dumped)
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-ffi" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-in-ffi/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/panic-in-ffi.rs:13:5:
Test
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' (1) panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x7fa74edd2b8f - <std[a8c82c70e1792198]::sys::backtrace::_print::DisplayBacktrace as core[bb4eb896225c941f]::fmt::Display>::fmt
   1:     0x7fa74ee2d830 - core[bb4eb896225c941f]::fmt::write
   2:     0x7fa74edc7cd9 - <std[a8c82c70e1792198]::sys::pal::unix::stdio::Stderr as std[a8c82c70e1792198]::io::Write>::write_fmt
   3:     0x7fa74edd2990 - std[a8c82c70e1792198]::sys::backtrace::print
   4:     0x7fa74edd5975 - std[a8c82c70e1792198]::panicking::default_hook::{closure#1}
   5:     0x7fa74edd553c - std[a8c82c70e1792198]::panicking::default_hook
   6:     0x7fa74edd6212 - std[a8c82c70e1792198]::panicking::rust_panic_with_hook
   7:     0x7fa74edd5dd3 - std[a8c82c70e1792198]::panicking::begin_panic_handler::{closure#0}
   8:     0x7fa74edd3159 - std[a8c82c70e1792198]::sys::backtrace::__rust_end_short_backtrace::<std[a8c82c70e1792198]::panicking::begin_panic_handler::{closure#0}, !>
  10:     0x7fa74ed8dbd5 - core[bb4eb896225c941f]::panicking::panic_nounwind_fmt
  11:     0x7fa74ed8dc62 - core[bb4eb896225c941f]::panicking::panic_nounwind
  12:     0x7fa74ed8de86 - core[bb4eb896225c941f]::panicking::panic_cannot_unwind
  12:     0x7fa74ed8de86 - core[bb4eb896225c941f]::panicking::panic_cannot_unwind
  13:     0x562b212e0a84 - panic_in_ffi::panic_in_ffi::h83f3e7214b5341d4
  14:     0x562b212e0a96 - panic_in_ffi::main::h47f95a7b66e4046f
  15:     0x562b212e0333 - core::ops::function::FnOnce::call_once::h6155e369b5add61f
  16:     0x562b212e01e6 - std::sys::backtrace::__rust_begin_short_backtrace::h4138f8c607618e34
  18:     0x7fa74edb715a - std[a8c82c70e1792198]::rt::lang_start_internal
  19:     0x562b212e0197 - std::rt::lang_start::h1a745ea6cfcd2d88
  20:     0x562b212e0ab5 - main
  21:     0x7fa74eb39150 - <unknown>
---
---- [ui] tests/ui/panics/panic-take-handler-nop.rs stdout ----

error: error pattern 'thread 'main' panicked' not found!
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-take-handler-nop" && RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/panic-take-handler-nop/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/panic-take-handler-nop.rs:10:5:
foobar
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---
3 stack backtrace:
4    0: std::panicking::begin_panic::<&str>


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.v0/runtime-switch.v0.run.stderr

error in revision `v0`: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.v0" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.v0/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/runtime-switch.rs:26:5:
explicit panic
stack backtrace:
---
3 stack backtrace:
4    0: std::panicking::begin_panic


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.legacy/runtime-switch.legacy.run.stderr

error in revision `legacy`: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.legacy" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/runtime-switch.legacy/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/runtime-switch.rs:26:5:
explicit panic
stack backtrace:
---
3 stack backtrace:
4    0: std::panicking::begin_panic


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/short-ice-remove-middle-frames-2/short-ice-remove-middle-frames-2.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/short-ice-remove-middle-frames-2" && RUST_BACKTRACE="1" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/panics/short-ice-remove-middle-frames-2/a"
--- stderr -------------------------------
thread 'main' (1) panicked at /checkout/tests/ui/panics/short-ice-remove-middle-frames-2.rs:56:5:
debug!!!
stack backtrace:
stack backtrace:
   0: std::panicking::begin_panic
   1: short_ice_remove_middle_frames_2::eight
   2: short_ice_remove_middle_frames_2::seven::{{closure}}
      [... omitted 3 frames ...]
   3: short_ice_remove_middle_frames_2::fifth
   4: short_ice_remove_middle_frames_2::fourth::{{closure}}
      [... omitted 4 frames ...]
   5: short_ice_remove_middle_frames_2::first
   6: short_ice_remove_middle_frames_2::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------------------------------------------


---
thread 'main' (1) panicked at /checkout/tests/ui/panics/short-ice-remove-middle-frames.rs:52:5:
debug!!!
stack backtrace:
   0: std::panicking::begin_panic
   1: short_ice_remove_middle_frames::seven
   2: short_ice_remove_middle_frames::sixth
   3: short_ice_remove_middle_frames::fifth::{{closure}}
      [... omitted 4 frames ...]
   4: short_ice_remove_middle_frames::second
   5: short_ice_remove_middle_frames::first::{{closure}}
   6: short_ice_remove_middle_frames::first
   7: short_ice_remove_middle_frames::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------------------------------------------


---

---- [ui] tests/ui/process/println-with-broken-pipe.rs stdout ----
diff of run.stderr:

- thread 'main' panicked at library/std/src/io/stdio.rs:LL:CC:
+ thread 'main' (1) panicked at library/std/src/io/stdio.rs:LL:CC:
2 failed printing to stdout: Broken pipe (os error 32)
4 


The actual run.stderr differed from the expected run.stderr.
The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/process/println-with-broken-pipe/println-with-broken-pipe.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 0
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/process/println-with-broken-pipe" && RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/process/println-with-broken-pipe/a"
--- stdout -------------------------------
---

---- [ui] tests/ui/resolve/multiple_definitions_attribute_merging.rs stdout ----
diff of stderr:

16 LL | struct Dealigned<T>(u8, T);
18    |
-    = Box<dyn Any>
+    = thread 'rustc' (3) panicked at compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21:
+ Box<dyn Any>
+ Box<dyn Any>
20 query stack during panic:
21 #0 [mir_built] building MIR for `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`
22 #1 [check_unsafety] unsafety-checking `<impl at $DIR/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/multiple_definitions_attribute_merging/multiple_definitions_attribute_merging.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args resolve/multiple_definitions_attribute_merging.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/multiple_definitions_attribute_merging" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/multiple_definitions_attribute_merging/auxiliary"
--- stderr -------------------------------
error[E0428]: the name `Dealigned` is defined multiple times
##[error]  --> /checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs:17:1
   |
   |
LL | struct Dealigned<T>(u8, T);
   | --------------------------- previous definition of the type `Dealigned` here
...
LL | struct Dealigned<T>(u8, T);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Dealigned` redefined here
   = note: `Dealigned` must be defined only once in the type namespace of this module

##[error]error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21: builtin derive created an unaligned reference
  --> /checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs:17:25
  --> /checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs:17:25
   |
LL | #[derive(PartialEq)]
   |          --------- in this derive macro expansion
LL | #[repr(C)]
LL | struct Dealigned<T>(u8, T);
   |
   = note: this error: internal compiler error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

thread 'rustc' (3) panicked at compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21:
---
note: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [mir_built] building MIR for `<impl at /checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`
#1 [check_unsafety] unsafety-checking `<impl at /checkout/tests/ui/resolve/multiple_definitions_attribute_merging.rs:15:10: 15:19>::eq`
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0428`.
------------------------------------------
------------------------------------------


---- [ui] tests/ui/resolve/proc_macro_generated_packed.rs stdout ----
diff of stderr:

7 LL | struct Dealigned<T>(u8, T);
9    |
-    = Box<dyn Any>
+    = thread 'rustc' (3) panicked at compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21:
+ Box<dyn Any>
+ Box<dyn Any>
11 query stack during panic:
12 #0 [mir_built] building MIR for `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq`
13 #1 [check_unsafety] unsafety-checking `<impl at $DIR/proc_macro_generated_packed.rs:15:10: 15:19>::eq`

The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/proc_macro_generated_packed/proc_macro_generated_packed.stderr
To update references, rerun the tests and pass the `--bless` flag
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args resolve/proc_macro_generated_packed.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/resolve/proc_macro_generated_packed.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/proc_macro_generated_packed" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/proc_macro_generated_packed/auxiliary"
--- stderr -------------------------------
##[error]error: internal compiler error: compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21: builtin derive created an unaligned reference
  --> /checkout/tests/ui/resolve/proc_macro_generated_packed.rs:18:25
   |
   |
LL | #[derive(PartialEq)]
   |          --------- in this derive macro expansion
...
LL | struct Dealigned<T>(u8, T);
   |
   = note: this error: internal compiler error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

thread 'rustc' (3) panicked at compiler/rustc_mir_transform/src/check_packed_ref.rs:50:21:
---
note: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [mir_built] building MIR for `<impl at /checkout/tests/ui/resolve/proc_macro_generated_packed.rs:15:10: 15:19>::eq`
#1 [check_unsafety] unsafety-checking `<impl at /checkout/tests/ui/resolve/proc_macro_generated_packed.rs:15:10: 15:19>::eq`
error: aborting due to 1 previous error
------------------------------------------



---- [ui] tests/ui/test-attrs/test-thread-capture.rs stdout ----
diff of run.stdout:

10 fie
11 foe
12 fum
- thread 'thready_fail' panicked at $DIR/test-thread-capture.rs:32:5:
+ thread 'thready_fail' (2) panicked at $DIR/test-thread-capture.rs:32:5:
15 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
16 



The actual run.stdout differed from the expected run.stdout.
Actual run.stdout saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-capture/test-thread-capture.run.stdout
error: 1 errors occurred comparing run output.
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-capture" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-capture/a" "--test-threads=1"
--- stdout -------------------------------
---
fee
fie
foe
fum
thread 'thready_fail' (2) panicked at /checkout/tests/ui/test-attrs/test-thread-capture.rs:32:5:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
---

---- [ui] tests/ui/test-attrs/test-thread-nocapture.rs stdout ----
diff of run.stderr:

- thread 'thready_fail' panicked at $DIR/test-thread-nocapture.rs:32:5:
+ thread 'thready_fail' (2) panicked at $DIR/test-thread-nocapture.rs:32:5:
3 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
4 



The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-nocapture/test-thread-nocapture.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-nocapture" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-thread-nocapture/a" "--test-threads=1" "--nocapture"

running 2 tests
test thready_fail ... fee
fie
---

test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
------------------------------------------
--- stderr -------------------------------
thread 'thready_fail' (2) panicked at /checkout/tests/ui/test-attrs/test-thread-nocapture.rs:32:5:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------


---
8   left: 2
9  right: 4


The actual run.stderr differed from the expected run.stderr.
Actual run.stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-panic-abort-nocapture/test-panic-abort-nocapture.run.stderr
error: 1 errors occurred comparing run output.
status: exit status: 101
status: exit status: 101
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-panic-abort-nocapture" && RUST_BACKTRACE="0" RUST_TEST_THREADS="16" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/test-attrs/test-panic-abort-nocapture/a" "--test-threads=1" "--nocapture"

running 4 tests
test it_fails ... about to fail
FAILED
---

---- [ui] tests/ui/track-diagnostics/track.rs stdout ----
diff of stderr:

24    = note: rustc $VERSION running on $TARGET
25    = note: compiler flags: ... -Z ui-testing ... -Z track-diagnostics
- thread 'rustc' panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC:
- thread 'rustc' panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC:
+ thread 'rustc' (3) panicked at compiler/rustc_hir_typeck/src/lib.rs:LL:CC:
29 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
30 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track/track.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args track-diagnostics/track.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/track-diagnostics/track.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/track-diagnostics/track/auxiliary" "-Z" "track-diagnostics"
--- stderr -------------------------------
error[E0425]: cannot find value `rust` in this scope
##[error]  --> /checkout/tests/ui/track-diagnostics/track.rs:17:11
   |
   |
LL |     break rust
   |           ^^^^ not found in this scope
-Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:424:36

error[E0268]: `break` outside of a loop or labeled block
   |
LL |     break rust
LL |     break rust
   |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
-Ztrack-diagnostics: created at compiler/rustc_passes/src/loops.rs:357:33

error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?
   |
LL |     break rust
   |     ^^^^^^^^^^
-Ztrack-diagnostics: created at compiler/rustc_hir_typeck/src/lib.rs:400:24
-Ztrack-diagnostics: created at compiler/rustc_hir_typeck/src/lib.rs:400:24
   |
   = note: the compiler expectedly panicked. this is a feature.
   = note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675
   = note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu
   = note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z track-diagnostics
thread 'rustc' (3) panicked at compiler/rustc_hir_typeck/src/lib.rs:416:10:
Box<dyn Any>
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


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: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z track-diagnostics
query stack during panic:
query stack during panic:
#0 [typeck] type-checking `main`
end of query stack
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0268, E0425.
Some errors have detailed explanations: E0268, E0425.
For more information about an error, try `rustc --explain E0268`.
------------------------------------------


---- [ui] tests/ui/treat-err-as-bug/err.rs stdout ----
diff of stderr:

4 LL | pub static C: u32 = 0 - 1;
6 
+ thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
+ thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
+ aborting due to `-Z treat-err-as-bug=1`
8 
9 query stack during panic:



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/err/err.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args treat-err-as-bug/err.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/treat-err-as-bug/err.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/err" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/err/auxiliary" "-Ztreat-err-as-bug"
--- stderr -------------------------------
error: internal compiler error[E0080]: could not evaluate static initializer
##[error]  --> /checkout/tests/ui/treat-err-as-bug/err.rs:11:21
   |
   |
LL | pub static C: u32 = 0 - 1;

thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
aborting due to `-Z treat-err-as-bug=1`

error: 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: 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: please make sure that you have updated to the latest nightly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z treat-err-as-bug
query stack during panic:
query stack during panic:
#0 [eval_static_initializer] evaluating initializer of static `C`
end of query stack
------------------------------------------



---- [ui] tests/ui/treat-err-as-bug/span_delayed_bug.rs stdout ----
diff of stderr:

4 LL | fn main() {}
5    | ^^^^^^^^^
6 
+ thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
+ aborting due to `-Z treat-err-as-bug=1`
8 
9 query stack during panic:



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/span_delayed_bug/span_delayed_bug.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args treat-err-as-bug/span_delayed_bug.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/treat-err-as-bug/span_delayed_bug.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/span_delayed_bug" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/treat-err-as-bug/span_delayed_bug/auxiliary" "-Ztreat-err-as-bug" "-Zeagerly-emit-delayed-bugs"
--- stderr -------------------------------
--- stderr -------------------------------
error: internal compiler error: delayed bug triggered by #[rustc_error(delayed_bug_from_inside_query)]
   |
LL | fn main() {}
   | ^^^^^^^^^


thread 'rustc' (3) panicked at compiler/rustc_errors/src/lib.rs:1757:17:
aborting due to `-Z treat-err-as-bug=1`

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly
note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.81.0-nightly (0b3b4acef 2024-06-19) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z treat-err-as-bug -Z eagerly-emit-delayed-bugs
query stack during panic:
query stack during panic:
#0 [trigger_delayed_bug] triggering a delayed bug for testing incremental
------------------------------------------



@tgross35
Copy link
Contributor Author

@joshtriplett was the above enough to resolve your concern? I think we just need to go forward assuming we won't have the OS TID for a while, though I do think it makes sense to develop a way to access (separately). So just need libs to indicate a preferred syntax :)

@joshtriplett
Copy link
Member

We discussed this in today's @rust-lang/libs meeting.

We don't necessarily need a separate way to get the thread ID; the standard library just needs a way to obtain it internally so it can print it. (It can either do this at panic time or use it from thread-local data if we already have it there.)

This doesn't have to be perfect; not all platforms will necessarily have this. It would be fine to plumb it through for the tier 1 targets at first (Windows/macOS/Linux), and use non-OS thread IDs for now on other targets until those targets wire it up.

(Also, for future reference, there was no objection in the meeting to showing both, iff anyone has a need for the Rust thread ID and they're both clearly identified, though we didn't have an immediate idea of something that'd need the Rust thread ID.)

@joshtriplett
Copy link
Member

joshtriplett commented Sep 4, 2024

Speaking for myself and not the team, these formats seemed reasonable to me (where the number is the OS thread ID if available):

thread 'foo' (1234) panicked at foo.rs:10:10:
thread '<unnamed>' (4321) panicked at foo.rs:10:10:

@joshtriplett
Copy link
Member

Following up on this, to check about switching to the OS thread ID here.

(Also, the title should be updated, since this is now printing the thread ID unconditionally.)

@tgross35 tgross35 changed the title Print thread ID in panic message if thread name is unknown Print thread ID in panic message Oct 23, 2024
@tgross35
Copy link
Contributor Author

tgross35 commented Oct 23, 2024

Following up on this, to check about switching to the OS thread ID here.

When I looked at it before it seemed easiest for the purposes of this PR to just call gettid at panic time - I just haven't gotten around to doing this (will try to soonish). Eventually providing a user-accessible API as a method on Thread will be trickier, without an update to glibc I think thread startup code will have to store this ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.