Repository navigation
Add LLDB native unwind test for createdump dumps (PAC on ARM64) - #6256
Draft
max-charlamb wants to merge 4 commits into
Draft
max-charlamb wants to merge 4 commits into
max-charlamb wants to merge 4 commits into
Conversation
Verifies LLDB can unwind the crashing thread of a createdump core through libcoreclr and JIT code back to the host. On Linux ARM64 with pointer authentication, createdump does not write the NT_ARM_PAC_MASK note, so LLDB cannot strip PAC bits from saved return addresses and the unwind stops early. Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
Combine into a single SosTheory over cdb/LLDB and assert the crash thread unwinds through at least three coreclr frames. Skip musl, where stripped libc lacks unwind info. Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
This was referenced Nov 18, 2026
Docker-based Helix queues (e.g. Ubuntu 26.04 ARM64) mount the correlation payload read-only, so runtests.sh copies dotnet-cli into the work item before overlaying the private runtime. The harness picks up the copy via SOSHARNESS_DOTNET_ROOT. Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
max-charlamb
added a commit
to dotnet/runtime
that referenced
this pull request
Nov 18, 2026
- Capture the Linux ARM64 `NT_ARM_PAC_MASK` regset for each thread and write it as a `LINUX` ELF core note when available. - Include emitted notes in the `PT_NOTE` size and report unexpected regset failures without preventing dump creation. - This allows native tooling to unwind dumps created with createdump when the system has ARM-PAC enabled. Related to #109457. Validation (A/B on Ubuntu 26.04 / glibc 2.43, both using dotnet/diagnostics#6256). The temporary queue change used for validation (dd159c9) has been reverted from this PR; the baseline carries only that queue change: - [Baseline: queue change only (#137796), run 1687082](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687082) - expected to fail `NativeUnwindTests` on Linux ARM64. - [This PR at dd159c9: queue change + fix, run 1687081](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687081) - expected to pass. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
2 of 4 tasks
steveisok
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 20, 2026
Backport of #137777 to release/11.0. Manual backport: the bot cherry-pick conflicted because createdump was reorganized into `shared/` on main. Changes are ported to the `release/11.0` layout (`ThreadSnapshot` -> `ThreadInfo`, `createdumpcore.h` -> `createdump.h`, `CrashInfo::Threads()` holds `ThreadInfo*`). Logic is unchanged. ## Customer Impact - [ ] Customer reported - [x] Found internally On Linux ARM64 systems where glibc signs return addresses with PAC (e.g. Ubuntu 26.04 / glibc 2.43), dumps created by createdump omit the `NT_ARM_PAC_MASK` note. Without it, LLDB cannot strip PAC bits from return addresses and native stack unwinding stops after the first libc frames, so crash dumps cannot be fully analyzed. ## Regression - [ ] Yes - [x] No Exposed by newer distros that enable PAC by default; createdump never wrote this note. ## Testing dotnet/diagnostics#6256 adds `NativeUnwindTests`, which asserts LLDB unwinds through multiple runtime frames in a createdump dump. A/B on the Ubuntu 26.04 ARM64 queue against main: baseline without fix (run 1687082) vs. with fix (run 1687081). ## Risk Low. ARM64 Linux only. Adds one optional per-thread ELF note when the kernel exposes the PAC mask regset; failures to read it are logged and do not prevent dump creation. Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: d35a41b1-6332-4188-8ee8-793457babe03
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.
Adds an LLDB-only, dump-based SOS test that runs raw
thread backtraceon the crashing thread of a createdump-generated core (SimpleThrow, Core flavor). It asserts that the unwind reacheslibcoreclr.soand the host'scorehost_main.The newer glibc on the Linux ARM64 Helix image enables PAC return addresses. createdump does not write the
NT_ARM_PAC_MASK(0x406) note per thread, which kernel cores include. Without that note, LLDB cannot strip PAC bits and the native unwind stops early. This test is expected to fail on Linux ARM64 until createdump is fixed in dotnet/runtime, and to pass on x64.Draft: opened to observe the result on the ARM64 Helix queue.