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

incr.comp.: Fix potential unstable Fingerprint error for BorrowCheckResult #98924

Conversation

michaelwoerister
Copy link
Member

This potentially fixes issue #96655, but I was not able to actually reproduce it.

r? @Aaron1011

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 5, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2022
@lqd
Copy link
Member

lqd commented Jul 5, 2022

@bors try

so we can the CI artifacts on the other issues

@bors
Copy link
Contributor

bors commented Jul 5, 2022

⌛ Trying commit 9421219 with merge 3d838c809141fd15465b18559757a34c360c11d4...

@bors
Copy link
Contributor

bors commented Jul 5, 2022

☀️ Try build successful - checks-actions
Build commit: 3d838c809141fd15465b18559757a34c360c11d4 (3d838c809141fd15465b18559757a34c360c11d4)

@Aaron1011
Copy link
Member

r=me once you've performed any additional testing with the CI artifact toolchain.

@michaelwoerister
Copy link
Member Author

@rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 6, 2022
@michaelwoerister
Copy link
Member Author

@rust-timer build 3d838c809141fd15465b18559757a34c360c11d4

@rust-timer
Copy link
Collaborator

Queued 3d838c809141fd15465b18559757a34c360c11d4 with parent 4045ce6, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3d838c809141fd15465b18559757a34c360c11d4): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.3% -1.7% 6
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-0.0% -0.0% 1
Improvements 🎉
(secondary)
-2.9% -2.9% 1
All 😿🎉 (primary) -0.0% -0.0% 1

Cycles

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regression found
mean1 max count2
Regressions 😿
(primary)
2.3% 2.5% 2
Regressions 😿
(secondary)
3.4% 3.4% 1
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 2.3% 2.5% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 6, 2022
@michaelwoerister
Copy link
Member Author

@bors r=Aaron1011

#98959 probably fixes the underlying source of indeterminism, but this PR doesn't seem to hurt performance and provides an additional safety measure if there are additional instabilities.

The real fix will be to make progress on #94188 and use a collection type that doesn't leak iteration order into fingerprints.

@bors
Copy link
Contributor

bors commented Jul 6, 2022

📌 Commit 9421219 has been approved by Aaron1011

@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 Jul 6, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 6, 2022
…oerister

Return a FxIndexSet in is_late_bound query.

This return value is iterated upon by borrowck, hence the need to preserve
a deterministic iteration order.

Fixes rust-lang#98890
Affects rust-lang#96655

I don't know if this supersedes rust-lang#98924 or fixes an unrelated bug.

r? `@michaelwoerister`
This may deserve a backport.
@bors
Copy link
Contributor

bors commented Jul 9, 2022

⌛ Testing commit 9421219 with merge 049ee8c62795b3ea3b662f89efc209ddbd78d5ec...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_borrowck v0.0.0 (/checkout/compiler/rustc_borrowck)
error[E0599]: no method named `create_stable_hashing_context` found for struct `TyCtxt<'tcx>` in the current scope
   --> compiler/rustc_borrowck/src/lib.rs:444:58
    |
444 |     opaque_type_values.sort_deterministically(&infcx.tcx.create_stable_hashing_context());
    |                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `with_stable_hashing_context`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `rustc_borrowck` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc_borrowck` due to previous error

@bors
Copy link
Contributor

bors commented Jul 9, 2022

💔 Test failed - checks-actions

@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 Jul 9, 2022
@bors
Copy link
Contributor

bors commented Jul 13, 2022

⌛ Testing commit 9421219 with merge e55a669443e142e23a46f3d12eae0c0dd7e9082f...

@bors
Copy link
Contributor

bors commented Jul 13, 2022

💔 Test failed - checks-actions

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
error[E0599]: no method named `create_stable_hashing_context` found for struct `TyCtxt<'tcx>` in the current scope
   --> compiler/rustc_borrowck/src/lib.rs:444:58
    |
444 |     opaque_type_values.sort_deterministically(&infcx.tcx.create_stable_hashing_context());
    |                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: there is an associated function with a similar name: `with_stable_hashing_context`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `rustc_borrowck` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc_borrowck` due to previous error

@apiraino
Copy link
Contributor

apiraino commented Aug 4, 2022

Based on the latest tests failures. I'll switch to waiting on author, if it's ok. Feel free to request a review with @rustbot ready, thanks!

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 4, 2022
@michaelwoerister
Copy link
Member Author

I'm closing this. #98959 has fixed the root cause and the work that will eventually come out of rust-lang/compiler-team#533 will provide nicer "hardening" than what's implemented in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants