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

Prevent UB in child process after calling libc::fork #102460

Merged
merged 6 commits into from
Oct 12, 2022

Conversation

flba-eb
Copy link
Contributor

@flba-eb flba-eb commented Sep 29, 2022

After calling libc::fork, the child process tried to access a TLS variable when processing a panic. This caused a memory allocation which is UB in the child.
To prevent this from happening, the panic handler will not access the TLS variable in case panic::always_abort was called before.

Fixes #85261 (not only on Android systems, but also on Linux/QNX with TLS disabled, see issue for more details)

Main drawbacks of this fix:

  • Panic messages can incorrectly omit core::panic::PanicInfo struct in case several panics (of multiple threads) occur at the same time. The handler cannot distinguish between multiple panics in different threads or recursive ones in the same thread, but the message will contain a hint about the uncertainty.
  • panic_count::increase() will be a bit slower as it has an additional if, but this should be irrelevant as it is only called in case of a panic.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Sep 29, 2022
@rust-highfive
Copy link
Collaborator

r? @thomcc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2022
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mostly in favor here but there are a couple changes that I'd like.

@@ -644,7 +659,13 @@ fn rust_panic_with_hook(
if panics > 2 {
// 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");
if must_abort {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for adding this conditional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason is to print out a different message so that the user is aware about the uncertainty. I thought it might be helpful but is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra message is removed as it is not very helpful and only in very rare cases.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From zulip (talking about the case where this branch is hit)

Thom Chiovoloni: there's a slight race where

  • T1 panics, calls increase
  • T2 forks, panics in child before exec
  • T1 (in parent) calls decrease

Thom Chiovoloni: T2 can't look at the local panic count and only global, so it can't if this is different from

  • some thread panics
  • while unwinding, the same thread forks and the child panics before exec

right?

I think this means that we ideally would handle this case the must_abort case in here the same as below (but without the panic info). In other words: rtprintpanic!("panicked after panic::always_abort(), aborting.\n");

Or is there some other case where this matters?

(All that said, I'm kind of fine leaving this with the existing message, since this is suuuuch an edge case. That said, giving a slightly better message can't hurt).

library/std/src/panic.rs Outdated Show resolved Hide resolved
@flba-eb flba-eb force-pushed the fix_85261_prevent_alloc_after_fork branch from d73dd95 to f5c0a2c Compare September 29, 2022 09:31
@flba-eb flba-eb marked this pull request as ready for review September 29, 2022 10:04
@rustbot
Copy link
Collaborator

rustbot commented Sep 29, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@flba-eb flba-eb force-pushed the fix_85261_prevent_alloc_after_fork branch from f5c0a2c to fa07702 Compare September 29, 2022 13:32
@thomcc
Copy link
Member

thomcc commented Sep 29, 2022

Looks good to me.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 29, 2022

📌 Commit fa07702cb25d25c1dc9dde633d7bbe6bfd6a0545 has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 29, 2022
@thomcc
Copy link
Member

thomcc commented Sep 29, 2022

@flba-eb reached out and wants to clean up the comments (which might be a little misleading).

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 29, 2022
@flba-eb flba-eb force-pushed the fix_85261_prevent_alloc_after_fork branch from fa07702 to aa5cadf Compare September 29, 2022 16:05
@thomcc
Copy link
Member

thomcc commented Sep 29, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 29, 2022

📌 Commit aa5cadf has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 29, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 29, 2022
…ter_fork, r=thomcc

Prevent UB in child process after calling libc::fork

After calling libc::fork, the child process tried to access a TLS variable when processing a panic. This caused a memory allocation which is UB in the child.
To prevent this from happening, the panic handler will not access the TLS variable in case `panic::always_abort` was called before.

Fixes rust-lang#85261 (not only on Android systems, but also on Linux/QNX with TLS disabled, see issue for more details)

Main drawbacks of this fix:
* Panic messages can incorrectly omit `core::panic::PanicInfo` struct in case several panics (of multiple threads) occur at the same time. The handler cannot distinguish between multiple panics in different threads or recursive ones in the same thread, but the message will contain a hint about the uncertainty.
* `panic_count::increase()` will be a bit slower as it has an additional `if`, but this should be irrelevant as it is only called in case of a panic.
@matthiaskrgr
Copy link
Member

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 29, 2022
@bors
Copy link
Contributor

bors commented Oct 4, 2022

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

@flba-eb flba-eb force-pushed the fix_85261_prevent_alloc_after_fork branch from aa5cadf to d56ebf3 Compare October 6, 2022 06:47
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2022
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux-alt failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2022-10-10T17:01:34Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:01:34Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2022-10-10T17:01:34Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpAEzCZE#bitmaps@3.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:01:36Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2022-10-10T17:01:36Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpAEzCZE#bitmaps@3.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpAEzCZE/incremental-state"
[2022-10-10T17:01:39Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:01:39Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpAEzCZE#bitmaps@3.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpAEzCZE/incremental-state"
[2022-10-10T17:01:40Z DEBUG collector::execute] applying println to "/tmp/.tmpAEzCZE"
[2022-10-10T17:01:40Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:01:40Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:01:40Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpAEzCZE#bitmaps@3.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpAEzCZE/incremental-state"
[2022-10-10T17:01:41Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:01:41Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:01:41Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpP3IUUz#bitmaps@3.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:01:43Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
---
[2022-10-10T17:01:49Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:01:49Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:01:49Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp6WEtjo#bitmaps@3.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:01:51Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:01:51Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp6WEtjo#bitmaps@3.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp6WEtjo/incremental-state"
[2022-10-10T17:01:54Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:01:54Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp6WEtjo#bitmaps@3.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp6WEtjo/incremental-state"
[2022-10-10T17:01:55Z DEBUG collector::execute] applying println to "/tmp/.tmp6WEtjo"
[2022-10-10T17:01:55Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:01:55Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:01:55Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmp6WEtjo#bitmaps@3.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmp6WEtjo/incremental-state"
Executing benchmark cargo-0.60.0 (2/8)
Preparing cargo-0.60.0
[2022-10-10T17:01:56Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2022-10-10T17:01:56Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=None, patch=None
---
[2022-10-10T17:09:33Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:09:33Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:09:33Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpahABcy#ctfe-stress-5@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:09:42Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:09:42Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpahABcy#ctfe-stress-5@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpahABcy/incremental-state"
[2022-10-10T17:09:53Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:09:53Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpahABcy#ctfe-stress-5@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpahABcy/incremental-state"
[2022-10-10T17:09:54Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:09:54Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:09:54Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpJKlO4s#ctfe-stress-5@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:10:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:10:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:10:03Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpJKlO4s#ctfe-stress-5@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpJKlO4s/incremental-state"
[2022-10-10T17:10:13Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:10:13Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpJKlO4s#ctfe-stress-5@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpJKlO4s/incremental-state"
Executing benchmark diesel-1.4.8 (4/8)
Preparing diesel-1.4.8
[2022-10-10T17:10:14Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
[2022-10-10T17:10:14Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
---
[2022-10-10T17:10:35Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:10:35Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2022-10-10T17:10:35Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpQIRJkn#diesel@1.4.8" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:10:51Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2022-10-10T17:10:51Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpQIRJkn#diesel@1.4.8" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpQIRJkn/incremental-state"
[2022-10-10T17:11:11Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:11:11Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpQIRJkn#diesel@1.4.8" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpQIRJkn/incremental-state"
[2022-10-10T17:11:14Z DEBUG collector::execute] applying println to "/tmp/.tmpQIRJkn"
[2022-10-10T17:11:14Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:11:14Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:11:14Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpQIRJkn#diesel@1.4.8" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpQIRJkn/incremental-state"
[2022-10-10T17:11:18Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:11:18Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:11:18Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwLkzsd#diesel@1.4.8" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:11:36Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:11:36Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:11:36Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwLkzsd#diesel@1.4.8" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwLkzsd/incremental-state"
[2022-10-10T17:11:59Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:11:59Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwLkzsd#diesel@1.4.8" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwLkzsd/incremental-state"
[2022-10-10T17:12:03Z DEBUG collector::execute] applying println to "/tmp/.tmpwLkzsd"
[2022-10-10T17:12:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:12:03Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("println"), path: "0-println.patch" })
[2022-10-10T17:12:03Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpwLkzsd#diesel@1.4.8" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpwLkzsd/incremental-state"
[2022-10-10T17:12:07Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:12:07Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:12:07Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpy7pBbI#diesel@1.4.8" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:12:25Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
---
[2022-10-10T17:13:04Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:04Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2022-10-10T17:13:04Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpnukv7N#match-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:06Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:06Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpnukv7N#match-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpnukv7N/incremental-state"
[2022-10-10T17:13:09Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:09Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpnukv7N#match-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpnukv7N/incremental-state"
[2022-10-10T17:13:11Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:11Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:13:11Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpImLmX2#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:13Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:13Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:13Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpImLmX2#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpImLmX2/incremental-state"
[2022-10-10T17:13:17Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:17Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpImLmX2#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpImLmX2/incremental-state"
[2022-10-10T17:13:18Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:18Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:13:18Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpMAosTe#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:21Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:21Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpMAosTe#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpMAosTe/incremental-state"
[2022-10-10T17:13:24Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:24Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpMAosTe#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpMAosTe/incremental-state"
Executing benchmark token-stream-stress (7/8)
Preparing token-stream-stress
[2022-10-10T17:13:25Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None
[2022-10-10T17:13:25Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2022-10-10T17:13:27Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:27Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:13:27Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpdxIIl9#token-stream-stress@0.0.0" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:27Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:27Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpdxIIl9#token-stream-stress@0.0.0" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpdxIIl9/incremental-state"
[2022-10-10T17:13:27Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:27Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpdxIIl9#token-stream-stress@0.0.0" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpdxIIl9/incremental-state"
[2022-10-10T17:13:27Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:13:28Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphhiBQX#token-stream-stress@0.0.0" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:28Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphhiBQX#token-stream-stress@0.0.0" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmphhiBQX/incremental-state"
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:28Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmphhiBQX#token-stream-stress@0.0.0" "--release" "--bin" "token-stream-stress-bin" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmphhiBQX/incremental-state"
Executing benchmark tuple-stress (8/8)
Preparing tuple-stress
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=None, patch=None
[2022-10-10T17:13:28Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None
---
[2022-10-10T17:13:29Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:29Z INFO  collector::execute] run_rustc with incremental=false, profile=Check, scenario=Some(Full), patch=None
[2022-10-10T17:13:29Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpRgScMJ#tuple-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:34Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:34Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpRgScMJ#tuple-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpRgScMJ/incremental-state"
[2022-10-10T17:13:40Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:40Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpRgScMJ#tuple-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpRgScMJ/incremental-state"
[2022-10-10T17:13:42Z DEBUG collector::execute] applying new row to "/tmp/.tmpRgScMJ"
[2022-10-10T17:13:42Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:13:42Z INFO  collector::execute] run_rustc with incremental=true, profile=Check, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:13:42Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpRgScMJ#tuple-stress@0.1.0" "--profile" "check" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpRgScMJ/incremental-state"
[2022-10-10T17:13:48Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:13:48Z INFO  collector::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None
[2022-10-10T17:13:48Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpoHLGeb#tuple-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:13:53Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:53Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None
[2022-10-10T17:13:53Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpoHLGeb#tuple-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpoHLGeb/incremental-state"
[2022-10-10T17:13:59Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:13:59Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpoHLGeb#tuple-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpoHLGeb/incremental-state"
[2022-10-10T17:14:01Z DEBUG collector::execute] applying new row to "/tmp/.tmpoHLGeb"
[2022-10-10T17:14:01Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:14:01Z INFO  collector::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:14:01Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpoHLGeb#tuple-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpoHLGeb/incremental-state"
[2022-10-10T17:14:07Z DEBUG collector::execute] Benchmark iteration 1/1
[2022-10-10T17:14:07Z INFO  collector::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None
[2022-10-10T17:14:07Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpeyfJT0#tuple-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2022-10-10T17:14:12Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:14:12Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None
[2022-10-10T17:14:12Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpeyfJT0#tuple-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpeyfJT0/incremental-state"
[2022-10-10T17:14:19Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None
[2022-10-10T17:14:19Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpeyfJT0#tuple-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpeyfJT0/incremental-state"
[2022-10-10T17:14:20Z DEBUG collector::execute] applying new row to "/tmp/.tmpeyfJT0"
[2022-10-10T17:14:20Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:14:20Z INFO  collector::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrPatched), patch=Some(Patch { index: 0, name: PatchName("new row"), path: "0-new-row.patch" })
[2022-10-10T17:14:20Z DEBUG collector::execute] "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustc" "--manifest-path" "Cargo.toml" "-p" "file:///tmp/.tmpeyfJT0#tuple-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=/tmp/.tmpeyfJT0/incremental-state"
+ cd /checkout/obj
+ RUSTC_PROFILE_MERGED_FILE=/tmp/tmp-pgo/rustc-pgo.profdata
+ /checkout/obj/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-profdata merge -o /tmp/tmp-pgo/rustc-pgo.profdata /tmp/tmp-pgo/rustc-pgo
+ echo 'Rustc PGO statistics'
---
BOLT-INFO: the input contains 7252 (dynamic count : 19737716726) opportunities for macro-fusion optimization. Will fix instances on a hot path.
BOLT-INFO: 586621 instructions were shortened
BOLT-INFO: removed 1615 empty blocks
BOLT-INFO: removed 18 'repz' prefixes with estimated execution count of 69824083 times.
BOLT-INFO: ICF folded 1253 out of 106155 functions in 3 passes. 1 functions had jump tables.
BOLT-INFO: Removing all identical functions will save 123.26 KB of code space. Folded functions were called 1194107331 times based on profile.
BOLT-INFO: basic block reordering modified layout of 8580 (8.18%) functions
BOLT-INFO: UCE removed 5 blocks and 145 bytes of code.
BOLT-INFO: splitting separates 11449708 hot bytes from 9052836 cold bytes (55.85% of split functions is hot).
BOLT-INFO: 83 Functions were reordered by LoopInversionPass
BOLT-INFO: hfsort+ reduced the number of chains from 15219 to 6752
BOLT-INFO: program-wide dynostats after all optimizations before SCTC and FOP:
       1151927418125 : executed forward branches
        128679685423 : taken forward branches
        240479789396 : executed backward branches
        150775560709 : taken backward branches
---
[RUSTC-TIMING] build_script_build test:false 0.390
   Compiling lock_api v0.4.7
[RUSTC-TIMING] unicode_width test:false 0.484
   Compiling ena v0.14.0
warning: rustc_graphviz.769c8373-cgu.10: no profile data available for function _RNvMNtNtNtCs8fE5ZIj2Dja_4core4iter8adapters3revINtB2_3RevINtNtNtB8_3ops5range5RangejEE3newCsd4miHoBBJsd_14rustc_graphviz Hash = 742261418966908927 up to 0 count discarded
[RUSTC-TIMING] smallvec test:false 0.652
   Compiling crossbeam-channel v0.5.4
   Compiling unic-ucd-version v0.9.0
[RUSTC-TIMING] build_script_main test:false 1.072
---
   Compiling petgraph v0.5.1
   Compiling object v0.29.0
   Compiling gimli v0.26.1
[RUSTC-TIMING] indexmap test:false 0.820
warning: rustc_serialize.a317d961-cgu.3: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRjECshLydsfzbhQb_15rustc_serialize Hash = 742261418966908927 up to 0 count discarded

warning: rustc_serialize.a317d961-cgu.3: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core9panicking13assert_failedjjECshLydsfzbhQb_15rustc_serialize Hash = 742261418966908927 up to 0 count discarded

warning: rustc_serialize.a317d961-cgu.5: no profile data available for function _RNvXsV_NtCs8fE5ZIj2Dja_4core3fmtRjNtB5_5Debug3fmtCshLydsfzbhQb_15rustc_serialize Hash = 1124680650125156080 up to 0 count discarded
[RUSTC-TIMING] rustc_serialize test:false 0.611
warning: `rustc_serialize` (lib) generated 3 warnings
[RUSTC-TIMING] fluent_bundle test:false 0.916
   Compiling rustc_macros v0.1.0 (/checkout/compiler/rustc_macros)
---
   Compiling rustc_feature v0.0.0 (/checkout/compiler/rustc_feature)
   Compiling rustc_ast v0.0.0 (/checkout/compiler/rustc_ast)
   Compiling rustc_error_messages v0.0.0 (/checkout/compiler/rustc_error_messages)
   Compiling rustc_target v0.0.0 (/checkout/compiler/rustc_target)
warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvMsH_NtCsdNuRplmtRUE_12tracing_core5fieldNtB6_8FieldSet9value_setATRNtB6_5FieldINtNtCs8fE5ZIj2Dja_4core6option6OptionRDNtB6_5ValueEL_EEj1_ECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvMsH_NtCsdNuRplmtRUE_12tracing_core5fieldNtB6_8FieldSet9value_setATRNtB6_5FieldINtNtCs8fE5ZIj2Dja_4core6option6OptionRDNtB6_5ValueEL_EEj2_ECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvMsH_NtCsdNuRplmtRUE_12tracing_core5fieldNtB6_8FieldSet9value_setATRNtB6_5FieldINtNtCs8fE5ZIj2Dja_4core6option6OptionRDNtB6_5ValueEL_EEj5_ECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRINtNtB4_6option6OptionNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRINtNtB4_6option6OptionNtNtCskDg8l1urSmw_3std4path7PathBufEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRINtNtB4_6option6OptionRNtNtCskDg8l1urSmw_3std4path4PathEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRINtNtCs3j0Se0hlEr3_5alloc3vec3VecNtNtCskDg8l1urSmw_3std4path7PathBufEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRNtNtCsbFIzVOtJsMp_13fluent_bundle8resource14FluentResourceECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRNtNtCskDg8l1urSmw_3std4path7PathBufECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRQNtNtCskDg8l1urSmw_3std4path7PathBufECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCs8fE5ZIj2Dja_4core3ptr13drop_in_placeRRSReECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRINtNtCs3j0Se0hlEr3_5alloc3vec3VecNtNtCskDg8l1urSmw_3std4path7PathBufEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRINtNtCs8fE5ZIj2Dja_4core6option6OptionNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRINtNtCs8fE5ZIj2Dja_4core6option6OptionNtNtCskDg8l1urSmw_3std4path7PathBufEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRINtNtCs8fE5ZIj2Dja_4core6option6OptionRNtNtCskDg8l1urSmw_3std4path4PathEECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRNtNtCsbFIzVOtJsMp_13fluent_bundle8resource14FluentResourceECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRNtNtCskDg8l1urSmw_3std4path7PathBufECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRQNtNtCskDg8l1urSmw_3std4path7PathBufECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RINvNtCsdNuRplmtRUE_12tracing_core5field5debugRRSReECs6YUQPUIOf2D_20rustc_error_messages Hash = 742261418966908927 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRINtNtCs3j0Se0hlEr3_5alloc3vec3VecNtNtCskDg8l1urSmw_3std4path7PathBufEENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRINtNtCs8fE5ZIj2Dja_4core6option6OptionNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierEENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRINtNtCs8fE5ZIj2Dja_4core6option6OptionNtNtCskDg8l1urSmw_3std4path7PathBufEENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRINtNtCs8fE5ZIj2Dja_4core6option6OptionRNtNtCskDg8l1urSmw_3std4path4PathEENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRNtCshq6lv1zH0m8_16unic_langid_impl18LanguageIdentifierENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRNtNtCsbFIzVOtJsMp_13fluent_bundle8resource14FluentResourceENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRNtNtCskDg8l1urSmw_3std4path7PathBufENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRQNtNtCskDg8l1urSmw_3std4path7PathBufENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded

warning: rustc_error_messages.4576acd1-cgu.14: no profile data available for function _RNvXsu_NtCsdNuRplmtRUE_12tracing_core5fieldINtB5_10DebugValueRRSReENtB5_5Value6recordCs6YUQPUIOf2D_20rustc_error_messages Hash = 170957022131388415 up to 0 count discarded
[RUSTC-TIMING] rustc_feature test:false 1.985
[RUSTC-TIMING] rustc_error_messages test:false 2.176
warning: `rustc_error_messages` (lib) generated 30 warnings
[RUSTC-TIMING] rustc_span test:false 5.269
---
[RUSTC-TIMING] rustc_borrowck test:false 84.827
[RUSTC-TIMING] rustc_const_eval test:false 106.349
[RUSTC-TIMING] rustc_hir_analysis test:false 92.760
   Compiling rustc_driver v0.0.0 (/checkout/compiler/rustc_driver)
error: couldn't create a temp dir: Read-only file system (os error 30) at path "/tmp/rustc8Kb1o1"
error: could not compile `rustc_driver` due to previous error
Build completed unsuccessfully in 0:21:28
Build completed unsuccessfully in 0:21:28
== clock drift check ==
  local time: Mon Oct 10 18:14:03 UTC 2022
  network time: Mon, 10 Oct 2022 18:14:03 GMT
== end clock drift check ==
time="2022-10-10T18:14:03Z" level=error msg="Error waiting for container: container abd70ba4b959ef1b78266f3083cecaca09ac68545c04ba222961f47ff45bf45b: driver \"overlay2\" failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/156012a8a8f6e5143bf2be0f6a1c7036db3da697540299d5325cc73ed8681cb8: read-only file system"
##[error]Process completed with exit code 125.
##[error]Read-only file system : '/home/runner/runners/2.298.2/_diag/pages/70ba09fd-1fda-4ebd-8f21-49fc09267c3d_05e30b09-217f-43ae-826e-dea76afd7ad3_1.log'

@thomcc
Copy link
Member

thomcc commented Oct 11, 2022

error: couldn't create a temp dir: Read-only file system (os error 30) at path "/tmp/rustc8Kb1o1"

Seems to be a spurious failure.

@bors r+

@bors
Copy link
Contributor

bors commented Oct 11, 2022

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Oct 11, 2022

📌 Commit 4c5d6bb has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 11, 2022
@bors
Copy link
Contributor

bors commented Oct 11, 2022

⌛ Testing commit 4c5d6bb with merge 84ac4ffdae5e3c4031380966ab284361cdedcc51...

@bors
Copy link
Contributor

bors commented Oct 12, 2022

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 12, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@flba-eb
Copy link
Contributor Author

flba-eb commented Oct 12, 2022

@bors retry

@bors
Copy link
Contributor

bors commented Oct 12, 2022

@flba-eb: 🔑 Insufficient privileges: not in try users

@thomcc
Copy link
Member

thomcc commented Oct 12, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Oct 12, 2022

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: Rollup of 8 pull requests #102948

@bors
Copy link
Contributor

bors commented Oct 12, 2022

📌 Commit 4c5d6bb has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2022
@bors
Copy link
Contributor

bors commented Oct 12, 2022

⌛ Testing commit 4c5d6bb with merge 50f6d33...

@bors
Copy link
Contributor

bors commented Oct 12, 2022

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 50f6d33 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 12, 2022
@bors bors merged commit 50f6d33 into rust-lang:master Oct 12, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 12, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (50f6d33): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.9%, -0.6%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-0.9%, -0.6%] 6

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-4.0%, -1.5%] 39
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
1.7% [1.7%, 1.7%] 1
Regressions ❌
(secondary)
2.4% [2.1%, 2.6%] 2
Improvements ✅
(primary)
-2.3% [-2.5%, -2.1%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-2.5%, 1.7%] 3

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@flba-eb flba-eb deleted the fix_85261_prevent_alloc_after_fork branch October 13, 2022 13:14
@Mark-Simulacrum
Copy link
Member

This wasn't actually a instruction count improvement, just noise from diesel.

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…r_fork, r=thomcc

Prevent UB in child process after calling libc::fork

After calling libc::fork, the child process tried to access a TLS variable when processing a panic. This caused a memory allocation which is UB in the child.
To prevent this from happening, the panic handler will not access the TLS variable in case `panic::always_abort` was called before.

Fixes rust-lang#85261 (not only on Android systems, but also on Linux/QNX with TLS disabled, see issue for more details)

Main drawbacks of this fix:
* Panic messages can incorrectly omit `core::panic::PanicInfo` struct in case several panics (of multiple threads) occur at the same time. The handler cannot distinguish between multiple panics in different threads or recursive ones in the same thread, but the message will contain a hint about the uncertainty.
* `panic_count::increase()` will be a bit slower as it has an additional `if`, but this should be irrelevant as it is only called in case of a panic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Allocation after libc::fork on Android
9 participants