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

Perform ThinLTO on x86_64-pc-windows-msvc dist builder #128947

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Aug 10, 2024

This reenables ThinLTO on x86_64-pc-windows-msvc.

Depends on #122790

try-job: dist-x86_64-msvc

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 10, 2024
@jieyouxu
Copy link
Member

FYI @rust-lang/infra

@lqd
Copy link
Member

lqd commented Aug 11, 2024

I don't think we're in a situation where we can yet have a definite yes/no answer for this PR yet.

Marking as blocked on #122790. The discussions and underlying issues there shouldn't be split amongst PRs.

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2024
@bors
Copy link
Contributor

bors commented Sep 20, 2024

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

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 11, 2025

@rustbot ready

This is no longer blocked, at least not on my previous PR.

Are the binaries built by dist jobs properly tested now?
Are there any other knowns issues with ThinLTO on Windows?

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 11, 2025
@Kobzol
Copy link
Contributor

Kobzol commented Mar 11, 2025

They are tested, not sure if properly :) Last time we tried it, one test was still miscompiled, we could try again.

  • comment out DIST_TRY_BUILD insrc/ci/github-actions/jobs.yml
  • add a line try-job: dist-x86_64-msvc to the PR description
  • run a try build

@jieyouxu
Copy link
Member

jieyouxu commented Mar 11, 2025

They are tested, not sure if properly :)

As far as I know, Windows dist artifacts are not tested at all (note that dist artifacts are not necessarily equivalent to test job artifacts; and usually they are not equivalent due to configuration differences). We do have Windows test jobs that run the full test suites but they aren't testing the dist artifacts.

EDIT: x86_64-pc-windows-msvc goes through opt-dist but not the other i686-pc-windows-msvc apparently.

Recently we broke i686-pc-windows-gnu rustc binaries in a way that caused rustc binary to completely not work (rustc -vV failed) but no tests caught it.

@lqd
Copy link
Member

lqd commented Mar 11, 2025

As far as I know, Windows dist artifacts are not tested at all

We do test dist x64 msvc artifacts in opt-dist.

@jieyouxu
Copy link
Member

jieyouxu commented Mar 11, 2025

Huh. I must be thinking of x86_64 windows-gnu or maybe the 32 bit windows-msvc target?

EDIT: in any case you're right:

https://github.com/rust-lang/rust/blob/master/src%2Fci%2Fgithub-actions%2Fjobs.yml#L584

@Kobzol
Copy link
Contributor

Kobzol commented Mar 13, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

This reenables ThinLTO on x86_64-pc-windows-msvc.

Depends on rust-lang#122790

try-job: dist-x86_64-msvc
@bors
Copy link
Contributor

bors commented Mar 13, 2025

⌛ Trying commit 3d3aba0 with merge b9d7ae0...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 13, 2025

💔 Test failed - checks-actions

@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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2025
@Kobzol
Copy link
Contributor

Kobzol commented Mar 13, 2025

@bors try

@bors
Copy link
Contributor

bors commented Mar 13, 2025

⌛ Trying commit a832199 with merge 359c9af...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

This reenables ThinLTO on x86_64-pc-windows-msvc.

Depends on rust-lang#122790

try-job: dist-x86_64-msvc
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Updating files:  98% (51475/52525)
Updating files:  99% (52000/52525)
Updating files: 100% (52525/52525)
Updating files: 100% (52525/52525), done.
branch 'try' set up to track 'origin/try'.
Switched to a new branch 'try'
##[endgroup]
[command]"C:\Program Files\Git\bin\git.exe" log -1 --format=%H
359c9afb313d94d79ae83a7a841026f9673dd03b
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
---
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.url=https://github.com/rust-lang/rust
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
[2025-03-13T19:44:08Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2025-03-13T19:44:08Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:08Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpWNaZxS#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln"
[2025-03-13T19:44:10Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:10Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpWNaZxS#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpWNaZxS\\incremental-state"
[2025-03-13T19:44:12Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Debug, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:12Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpWNaZxS#match-stress@0.1.0" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpWNaZxS\\incremental-state"
Running match-stress: Opt + [Full, IncrFull, IncrUnchanged, IncrPatched] + Llvm
[2025-03-13T19:44:12Z DEBUG collector::compile::benchmark] Benchmark iteration 1/1
[2025-03-13T19:44:12Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Opt, scenario=Some(Full), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:12Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpZLraDR#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln"
[2025-03-13T19:44:14Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrFull), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:14Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpZLraDR#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpZLraDR\\incremental-state"
[2025-03-13T19:44:16Z INFO  collector::compile::execute] run_rustc with incremental=true, profile=Opt, scenario=Some(IncrUnchanged), patch=None, backend=Llvm, phase=benchmark
[2025-03-13T19:44:16Z DEBUG collector::compile::execute] "\\\\?\\C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage0\\bin\\cargo.exe" "rustc" "--manifest-path" "Cargo.toml" "-p" "path+file:///C:/Users/RUNNER~1/AppData/Local/Temp/.tmpZLraDR#match-stress@0.1.0" "--release" "--" "--wrap-rustc-with" "Eprintln" "-C" "incremental=C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\.tmpZLraDR\\incremental-state"
Finished benchmark match-stress (6/8)
Executing benchmark token-stream-stress (7/8)
Preparing token-stream-stress
[2025-03-13T19:44:16Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Check, scenario=None, patch=None, backend=Llvm, phase=dependencies
[2025-03-13T19:44:16Z INFO  collector::compile::execute] run_rustc with incremental=false, profile=Debug, scenario=None, patch=None, backend=Llvm, phase=dependencies
---
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\..\..\backtrace\src\backtrace\win64.rs:85
   1:     0x7ff9e139790c - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff9e139790c - std::sys::backtrace::_print_fmt
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\sys\backtrace.rs:66
   3:     0x7ff9e139790c - std::sys::backtrace::impl$0::print::impl$0::fmt
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\sys\backtrace.rs:39
   4:     0x7ff9e0a18d4a - core::fmt::rt::Argument::fmt
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\core\src\fmt\rt.rs:185
   5:     0x7ff9e0a18d4a - core::fmt::write
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\core\src\fmt\mod.rs:1449
   6:     0x7ff9e138c508 - std::io::Write::write_fmt<std::sys::stdio::windows::Stderr>
---
   9:     0x7ff9e139c0a0 - std::panicking::default_hook
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\panicking.rs:325
  10:     0x7ff9e63897eb - rustc_driver_impl::install_ice_hook::closure$1
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/compiler\rustc_driver_impl\src\lib.rs:1325
  11:     0x7ff9e63897eb - alloc::boxed::impl$30::call
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\alloc\src\boxed.rs:1984
  12:     0x7ff9e63897eb - std::panicking::update_hook::closure$0<alloc::boxed::Box<rustc_driver_impl::install_ice_hook::closure_env$1,alloc::alloc::Global> >
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\panicking.rs:241
  13:     0x7ff9e139d1de - std::panicking::rust_panic_with_hook
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\panicking.rs:839
  14:     0x7ff9e139cef3 - std::panicking::begin_panic_handler::closure$0
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\panicking.rs:697
  15:     0x7ff9e139875f - std::sys::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\sys\backtrace.rs:168
  16:     0x7ff9e139cb2e - std::panicking::begin_panic_handler
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\std\src\panicking.rs:695
  17:     0x7ff9e5ca9cb1 - core::panicking::panic_fmt
                               at /rustc/359c9afb313d94d79ae83a7a841026f9673dd03b/library\core\src\panicking.rs:75
  18:     0x7ff9e5c446b8 - alloc::raw_vec::capacity_overflow
---
  34:     0x7ffa2dabbf2c - RtlUserThreadStart

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-rustdoc&template=ice.md

note: please make sure that you have updated to the latest nightly

note: please attach the file at `C:\a\rust\rust\rustc-ice-2025-03-13T20_30_37-3740.txt` to your bug report

note: compiler flags: -Z normalize-docs -Z unstable-options

query stack during panic:
end of query stack
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:13:05
[2025-03-13T20:30:37.893Z INFO  opt_dist::timer] Section `Stage 5 (final build)` ended: FAIL (785.60s)`
[2025-03-13T20:30:37.893Z INFO  opt_dist] Timer results
    -----------------------------------------------------------------
    Stage 1 (Rustc PGO):                            3997.58s (70.00%)

@bors
Copy link
Contributor

bors commented Mar 13, 2025

💔 Test failed - checks-actions

@bors
Copy link
Contributor

bors commented Mar 18, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants