Add support for uploading symbols to a public symbol server #1064
Merged
mhegazy merged 6 commits intocompnerd:mainfrom Jan 20, 2026
Merged
Add support for uploading symbols to a public symbol server #1064mhegazy merged 6 commits intocompnerd:mainfrom
mhegazy merged 6 commits intocompnerd:mainfrom
Conversation
compnerd
reviewed
Jan 3, 2026
Owner
compnerd
left a comment
There was a problem hiding this comment.
Do we need to upload the symbols to both the public and private copies of the PDBs? Why not only retain the public (R2) and consider decommissioning the Azure storage?
Collaborator
Author
Not really. wanted to get some milage on this first, then we can switch. |
Steelskin
reviewed
Jan 5, 2026
b104708 to
ecc03df
Compare
Collaborator
Author
|
@Steelskin and @compnerd can i get another look. I also have an updated passing run in https://github.com/thebrowsercompany/swift-build/actions/runs/21041733569 |
Steelskin
approved these changes
Jan 16, 2026
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.
This change adds support to uploading symbols to a public symbol server hosted on R2. To get access to the symbols, you need to add the public swift-toolchain to your sym path
_NT_SYMBOL_PATHor simply add it windbg while debugging:Details:
We are using Symstore.exe to prepare the symbols and manage their state. This tool is ment to be used on a single build machine or with a network share. Since we are using R2, and R2/S3 do not implement locking guarantees this opens us up to concurrent access to the store. The good news is that there is little chance of symbols collision since they are stored under a hash of the pdb file, but there are 3 text files that symstore.exe uses to record state of the symbols. these files are used to enable pruning symbols from the server when needed.
The implementation here uses an optimistic concurrency model where each worker will attempt to grab the latest state and then update it. We use the S3/R2 atomic operation
if-matchto ensure that no state change happened in between, if so we also upload the symbols, if not we retry.The process of preparing the symbols is rather short, this whole action adds 2-3 minutes for each build job, including the installation of the tools, and the actual upload.
Downstream runs:
https://github.com/thebrowsercompany/swift-build/actions/runs/21041733569