Repository navigation
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-opt-distArea: opt-dist tooling and workflowC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsO-x86_64Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64)P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.WG-llvmWorking group: LLVM backend code generation
Description
Incident thread: #t-infra > 20261121 rust-lang/rust dist-x86_64-msvc CI outage
Symptom
[2026-11-21T04:27:16.964Z INFO opt_dist::exec] Executing `RUSTC=C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\rustc.exe RUSTC_BOOTSTRAP=1 C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0\bin\cargo.exe run -p collector --bin collector -- profile_local eprintln C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin\rustc.exe --id Test --cargo C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2-tools-bin\cargo.exe --profiles Debug,Opt --scenarios Full --exact-match syn-2.0.101,cargo-0.87.1,serde-1.0.219,ripgrep-14.1.1,regex-automata-0.4.8,clap_derive-4.5.32,hyper-1.6.0 --frontend-threads 1 --jobs 4 [at C:\a\rust\rust\opt-artifacts\rustc-perf]`
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.57s
warning: the following packages contain code that will be rejected by a future version of Rust: proc-macro-error2 v2.0.1
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
Running `target\debug\collector.exe profile_local eprintln 'C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2\bin\rustc.exe' --id Test --cargo 'C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2-tools-bin\cargo.exe' --profiles Debug,Opt --scenarios Full --exact-match syn-2.0.101,cargo-0.87.1,serde-1.0.219,ripgrep-14.1.1,regex-automata-0.4.8,clap_derive-4.5.32,hyper-1.6.0 --frontend-threads 1 --jobs 4`
Running with 4 job(s)
thread 'main' (5252) panicked at collector\src\bin\collector.rs:895:27:
Cannot determine host target tuple. Please make a `rustc` binary available in PATH.: expected success, got exit code: 0xc0000142
Seems that:
- We get past rustc/rustdoc/clippy/cranelift PGO training steps
- But we are failing at "Running benchmarks with PGO instrumented LLVM"
- At this point I think we use stage 2 rustc linked against instrumented LLVM (which would have to be rebuilt with MSVC toolchain from the runner image).
- We seem to be failing when we trying to query stage 2 rustc for version info, and the rustc process dies.
- It seems that, only
dist-x86_64-msvcis affected but notdist-i686-msvcordist-aarch64-msvc.
Relevant runs
Failed
Runner: windows-2025-vs2026
Image: 20261116.315.1 (https://github.com/actions/runner-images/releases/tag/win25-vs2026%2F20261116.315)
MSVC: 14.52.37025
- https://github.com/rust-lang/rust/actions/runs/44854993414/job/136695253636
- https://github.com/rust-lang/rust/actions/runs/44847089695/job/136669726748
- https://github.com/rust-lang/rust/actions/runs/44831735425/job/136618628308
- https://github.com/rust-lang/rust/actions/runs/44808151517/job/136538003193
Successful
Runner: windows-2025-vs2026
Image: 20261103.298.1 (https://github.com/actions/runner-images/releases/tag/win25-vs2026%2F20261103.298)
MSVC: 14.51.36231
- https://github.com/rust-lang/rust/actions/runs/44778747441/job/136436010815
- https://github.com/rust-lang/rust/actions/runs/44746138969/job/136322431975
- https://github.com/rust-lang/rust/actions/runs/44720577940/job/136235371702
- https://github.com/rust-lang/rust/actions/runs/44670457893/job/136070174070
- https://github.com/rust-lang/rust/actions/runs/44654387572/job/136017414594
- https://github.com/rust-lang/rust/actions/runs/44626842553/job/135923259848
- https://github.com/rust-lang/rust/actions/runs/44578406991/job/135752742129
- https://github.com/rust-lang/rust/actions/runs/44512652678/job/135521167698
- https://github.com/rust-lang/rust/actions/runs/44483982602/job/135423272902
- https://github.com/rust-lang/rust/actions/runs/44438439455/job/135273394908
Experiments
Try to bust LLVM cache: [DO NOT MERGE] ci: force LLVM rebuild #166303No good, same failure- Try to use an older MSVC toolchain: Pin MSVC to 14.44 #166302
Try to revert a recent-ish PGO change: [DO NOT MERGE] Revert "Re-enable rustc profile generation for static linked llvm on Windows x64 builds #164707" #166300This made the dist job pass, but we highly suspect the PGO fix PR Re-enable rustc profile generation for static linked llvm on Windows x64 builds #164707 was only "revealing" rather than root cause. Not inclined to revert.Try to enable LLVM assertions in the dist job: (DO NOT MERGE) Dummy PR for running try jobs #166289Same failure
Investigation log
TODO
Mitigations
- We will pin to older MSVC toolchain in Pin MSVC to 14.44 #166302.
- Once we get UB fix for
test-aarch64-msvc-{1,2}jobs are failing when trying to build with stage 1 compiler #165953, we will re-evaluate.
- Once we get UB fix for
Useful links
- Possibly same root cause (UB in an LLVM container that MSVC
14.52.*made "effectful"):test-aarch64-msvc-{1,2}jobs are failing when trying to build with stage 1 compiler #165953, can't rule out unless backport fix PR for that still fails on thedist-x86_64-msvcjob.
Reacted by Zalathar
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-opt-distArea: opt-dist tooling and workflowC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsO-x86_64Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64)P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.WG-llvmWorking group: LLVM backend code generation
Activity
jieyouxu commentedon Nov 21, 2026
It's quite plausible this is linked to #165953 and we'd need to backport the LLVM fix #165953 (comment) to rule that cause out. AFAIK that UB is not arch-specific.
Auto merge of #166302 - ChrisDenton:workaround-x64, r=jieyouxu
Auto merge of #166302 - ChrisDenton:workaround-x64, r=jieyouxu
Auto merge of #166302 - ChrisDenton:workaround-x64, r=jieyouxu
Auto merge of #166302 - ChrisDenton:workaround-x64, r=jieyouxu
Rollup merge of rust-lang#166306 - Zalathar:trim-paths, r=Urgau
Rollup merge of rust-lang#166306 - Zalathar:trim-paths, r=Urgau
Rollup merge of rust-lang#166306 - Zalathar:trim-paths, r=Urgau
Unrolled build for #166306 in rollup 166368
Rollup merge of #166306 - Zalathar:trim-paths, r=Urgau
Rollup merge of #166306 - Zalathar:trim-paths, r=Urgau