createdump: fix macOS arm64 thread IDs in LLDB - #131962
Merged
max-charlamb merged 2 commits intoAug 7, 2026
Merged
Conversation
Apple Silicon rejects Mach-O core segments above its 47-bit user-space address limit. Write the createdump thread ID mapping at a valid address so LLDB can expose real OS thread IDs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7805386d-16fd-4306-bcc9-54d4ea7b65cf
Write OS thread IDs in LLDB's process metadata LC_NOTE format while retaining the special thread-info segment for compatibility. Align the Apple Silicon compatibility region with the established special metadata address scheme. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7805386d-16fd-4306-bcc9-54d4ea7b65cf
|
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. |
steveisok
self-requested a review
August 6, 2026 19:38
steveisok
approved these changes
Aug 6, 2026
max-charlamb
marked this pull request as ready for review
August 6, 2026 19:42
|
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
This was referenced Aug 7, 2026
noahfalk
approved these changes
Aug 7, 2026
max-charlamb
added a commit
to dotnet/diagnostics
that referenced
this pull request
Aug 10, 2026
## Summary - read macOS arm64 createdump thread metadata from the new 47-bit-valid address - fall back to the legacy address for compatibility with existing createdump output - use the selected address for all subsequent thread-info entries ## Motivation Apple Silicon LLDB rejects the legacy `0x7fffffff00000000` synthetic segment and assigns sequential thread IDs beginning at zero. SOS cannot then correlate LLDB threads with runtime OS thread IDs or retrieve the selected thread context. Coordinated writer change: dotnet/runtime#131962 ## Related precedent This follows @steveisok's coordinated Apple Silicon fix for `SpecialDiagInfoAddress`: - runtime writer: dotnet/runtime#130443 - diagnostics readers: #5823 ## Testing Draft pending coordinated macOS arm64 validation with the runtime writer change. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7805386d-16fd-4306-bcc9-54d4ea7b65cf
jtschuster
pushed a commit
to jtschuster/runtime
that referenced
this pull request
Aug 11, 2026
## Summary - write the macOS arm64 createdump thread-info region at a 47-bit-valid address - emit OS thread IDs using LLDB's `process metadata` `LC_NOTE` format - this is for future support so we can eventually remove the `SpecialThreadInfo` - retain the existing special thread-info segment while consumers migrate to the LLDB format ## Motivation Apple Silicon LLDB rejects the legacy `0x7fffffff00000000` synthetic segment and falls back to sequential thread IDs beginning at zero. SOS then cannot correlate LLDB threads with runtime OS thread IDs or retrieve the selected thread context. Coordinated SOS reader change: dotnet/diagnostics#5953 ## Related precedent This follows @steveisok's coordinated Apple Silicon fix for `SpecialDiagInfoAddress`: - runtime writer: dotnet#130443 - diagnostics readers: dotnet/diagnostics#5823 ## Testing Draft pending coordinated diagnostics validation on macOS arm64. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7805386d-16fd-4306-bcc9-54d4ea7b65cf
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.
Summary
process metadataLC_NOTEformatSpecialThreadInfoMotivation
Apple Silicon LLDB rejects the legacy
0x7fffffff00000000synthetic segment and falls back to sequential thread IDs beginning at zero. SOS then cannot correlate LLDB threads with runtime OS thread IDs or retrieve the selected thread context.Coordinated SOS reader change: dotnet/diagnostics#5953
Related precedent
This follows @steveisok's coordinated Apple Silicon fix for
SpecialDiagInfoAddress:Testing
Draft pending coordinated diagnostics validation on macOS arm64.