Avoid shared-file races in parallel CoreCLR builds - #132920
Open
EgorBo wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2174abe4-e659-4c3b-b004-ca86e91f14da
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR reduces cross-checkout build contention on Windows by removing shared-temp-file usage during Python discovery and by making PGO database inputs build-local to avoid sharing violations during concurrent CoreCLR builds.
Changes:
- Replace
%TEMP%\pythonlocation.txt-based Python discovery inrun.cmdandbuild-runtime.cmdwith in-process capture viafor /f. - Update CoreCLR PGO support to copy MSVC PGO database files into the build tree before linking, avoiding shared-file access across parallel builds.
File summaries
| File | Description |
|---|---|
| src/tests/run.cmd | Avoids writing a shared temp file when discovering Python for test runs. |
| src/coreclr/build-runtime.cmd | Avoids writing a shared temp file when discovering Python for CoreCLR builds. |
| src/coreclr/pgosupport.cmake | Copies PGO database inputs into the build output tree to avoid Windows sharing violations during linking. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I build multiple dotnet/runtime repos on the same windows machine at the same time I quite often run into build failures.
Avoid cross-checkout file contention in Windows CoreCLR builds:
%TEMP%\pythonlocation.txtValidated with a Release
clr.runtimebuild and two concurrent isolated Release JIT builds.Addresses #45423 and #46018.
Note
This PR description was generated by GitHub Copilot.