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

[beta] backports #136017

Merged
merged 12 commits into from
Jan 26, 2025
Merged

[beta] backports #136017

merged 12 commits into from
Jan 26, 2025

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jan 24, 2025

r? cuviper

estebank and others added 7 commits January 23, 2025 08:44
Creating a "trimmed DefID path" when no error is being emitted is an ICE (on purpose). If we create a trimmed path for a lint that is then silenced before being emitted causes a known ICE. This side-steps the issue by always using `with_no_trimmed_path!`.

This was verified to fix https://github.com/quinn-rs/quinn/, but couldn't write a repro case for the test suite.

Fix rust-lang#135289.

(cherry picked from commit 93a1950)
There is a chance that these tools are being installed from an external LLVM
and we have no control over them. If any of these tools use symlinks, they will
fail during tarball distribution. This change makes copying process to resolve
symlinks just before placing them into the destination path.

Signed-off-by: onur-ozkan <[email protected]>
(cherry picked from commit cde58dd)
(cherry picked from commit 94bf8f0)
(cherry picked from commit 0910173)
…tions with dummy spans instead of dropping them entirely

Revert most of rust-lang#133194 (except the test and the comment fixes). Then refix
not emitting locations at all when the correct location discriminator value
exceeds LLVM's capacity.

(cherry picked from commit 45ef927)
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jan 24, 2025
@cuviper
Copy link
Member Author

cuviper commented Jan 24, 2025

@bors r+ rollup=never p=1

(small priority bump because the current queue is long, and I want this to land before I add many of the same PRs to stable backports early next week)

@bors
Copy link
Contributor

bors commented Jan 24, 2025

📌 Commit 17a1a4f has been approved by cuviper

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 Jan 24, 2025
@bors
Copy link
Contributor

bors commented Jan 24, 2025

⌛ Testing commit 17a1a4f with merge 750a870...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 24, 2025
[beta] backports

- Always force non-trimming of path in `unreachable_patterns` lint rust-lang#135310
- Add Profile Override for Non-Git Sources rust-lang#135433
- resolve symlinks of LLVM tool binaries before copying them rust-lang#135585
- add cache to `AmbiguityCausesVisitor` rust-lang#135618
- When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely rust-lang#135643
- Temporarily bring back `Rvalue::Len` rust-lang#135709
- make it possible to use ci-rustc on tarball sources rust-lang#135722
- Remove test panic from File::open rust-lang#135837
- Only assert the `Parser` size on specific arches rust-lang#135855

r? cuviper
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 24, 2025

💔 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 Jan 24, 2025
@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2025

Can you add #135843 to this?

@cuviper
Copy link
Member Author

cuviper commented Jan 25, 2025

Added! And I'm hoping that failure was a fluke...

@bors r+

@bors
Copy link
Contributor

bors commented Jan 25, 2025

📌 Commit d2b10f1 has been approved by cuviper

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 Jan 25, 2025
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jan 25, 2025

💔 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 Jan 25, 2025
@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2025

The error seems to start with 016422a.

@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2025

Here's a relatively small config.toml which reproduces it:

build.build-stage = 2
build.test-stage = 2
llvm.download-ci-llvm = "if-unchanged"
rust.codegen-backends = ["llvm"]
rust.download-rustc  = "if-unchanged"
rust.jemalloc        = true
rust.verbose-tests   = true

stage = 2 seems to be important.

@jieyouxu
Copy link
Member

cc @lqd do u know if we had any ensure stack or something?

@lqd
Copy link
Member

lqd commented Jan 25, 2025

I haven’t seen it but I do not know for sure yet, I’ll try to find more PRs that may have changed these areas after the initial cleanups. Quite strange.

@cuviper
Copy link
Member Author

cuviper commented Jan 25, 2025

Here's a relatively small config.toml which reproduces it:

Only on macOS and/or aarch64 though? At least, that config still works for me on Fedora 41 x86_64.

@lqd
Copy link
Member

lqd commented Jan 25, 2025

That config does reproduce the issue for me on aarch64-apple-darwin.

@lqd
Copy link
Member

lqd commented Jan 25, 2025

The fact this only appears at stage 2 sounds bad.

The parent commit of #133734 expectedly doesn't trigger the issue either. I've looked for other PRs that may be related and missing from backports, there was one related to PtrMetadata but is not related to this issue — and other than that nothing jumped at me (but may have missed it, there are 450 PRs).

As I said, I can reproduce the stack overflow, so if anyone has ideas on how to identify what's going on on beta and doesn't on nightly, via complex git bisections or else, I can test them out. Other than that I'm not sure how to make tangible progress.

I'll also cc @scottmcm just in case he's seen something like this related to the original work, however unlikely.

@scottmcm
Copy link
Member

Hmm, no idea why the revert would be showing something odd here :/

But if it's potentially mir-related, maybe try forcing on mir validation at every step? -Z validate-mir=yes, I think? I don't know if we always do that anyway or not, but it can't hurt to try...

@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2025

Reproduces:

  • aarch64-apple-darwin
  • x86_64-apple-darwin
  • aarch64-unknown-linux-gnu
  • aarch64-pc-windows-msvc

Does not reproduce:

  • x86_64-pc-windows-msvc
  • x86_64-unknown-linux-gnu

onur-ozkan and others added 5 commits January 25, 2025 16:48
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure
the commit has to download precompiled rustc artifact from CI, which was leading builds to
fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project
source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on
git-managed source and read `git-commit-hash` file otherwise.

Signed-off-by: onur-ozkan <[email protected]>
(cherry picked from commit 903cddb)
(cherry picked from commit fed5f98)
The size of this struct depends on the alignment of `u128`, for example
powerpc64le and s390x have align-8 and end up with only 280 bytes. Our
64-bit tier-1 arches are the same though, so let's just assert on those.

(cherry picked from commit aef640a)
- Improve the discussion of `unsafe` blocks within `unsafe` functions.
- Fix formatting in Appendix A
@cuviper
Copy link
Member Author

cuviper commented Jan 26, 2025

I'm dropping the #135709 backport for now, but I saved that state of the branch in https://github.com/cuviper/rust/tree/beta-failed-135709, so those exact commits aren't lost.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2025

📌 Commit 130f951 has been approved by cuviper

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 Jan 26, 2025
@bors
Copy link
Contributor

bors commented Jan 26, 2025

⌛ Testing commit 130f951 with merge 14445aa...

@bors
Copy link
Contributor

bors commented Jan 26, 2025

☀️ Test successful - checks-actions
Approved by: cuviper
Pushing 14445aa to beta...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 26, 2025
@bors bors merged commit 14445aa into rust-lang:beta Jan 26, 2025
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.