Android Tombstone Symbolication
.NET (Microsoft)OfficialPublished by .NET (Microsoft)
- Skill
- Workflow
- Software development
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for triaging native crashes in .NET Android applications (MAUI, Xamarin, Mono). It guides the user through parsing Android tombstone files, identifying .NET runtime libraries, downloading the correct debug symbols from the Microsoft symbol server, and using llvm-symbolizer to map PC offsets to specific function names, source files, and line numbers. It is designed to help developers investigate native signals like SIGSEGV or SIGABRT originating from the .NET runtime.
What it does
- Parses native backtrace frames from Android tombstone files.
- Identifies .NET runtime libraries like libmonosgen-2.0.so and libcoreclr.so.
- Downloads debug symbols from the Microsoft symbol server using ELF BuildIds.
- Resolves PC offsets to function names and source locations using llvm-symbolizer.
- Automates the process via a provided PowerShell script.
- Maps CI-based source paths to the .NET VMR repository structure.
When to use it
- When investigating native crashes (SIGSEGV, SIGABRT) in .NET MAUI or Mono Android apps.
- When you need to resolve native backtrace frames in .NET runtime libraries.
- When you have a tombstone file containing BuildIds and PC offsets.
- When you need to identify the specific .NET runtime version and source commit associated with a crash.
Advantages
- Enables deep debugging of native runtime crashes that are otherwise opaque.
- Provides clear mapping to source code locations for faster root cause analysis.
- Automates the complex manual steps of symbol retrieval and symbolication.
- Integrates with standard Android NDK and LLVM toolchains.
Usage examples
- “How do I symbolicate a crash in my .NET MAUI app using a tombstone file?”
- The agent will guide you to use the Symbolicate-Tombstone.ps1 script, pointing you to provide the tombstone file and the path to your llvm-symbolizer executable.
- “I have a SIGSEGV in libmonosgen-2.0.so, how can I find the source line?”
- The agent will explain how to extract the BuildId and PC offset from the tombstone, download the corresponding debug symbols from the Microsoft server, and run llvm-symbolizer.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/dotnet/android-tombstone-symbolication/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip android-tombstone-symbolication.zip -d .agents/skills
Documentation by .NET (Microsoft)
Android Tombstone .NET Symbolication
Resolves native backtrace frames from .NET Android app crashes (MAUI, Xamarin, Mono) to function names, source files, and line numbers using ELF BuildIds and Microsoft's symbol server.
Inputs: Tombstone file or logcat crash output, llvm-symbolizer (from Android NDK or any LLVM 14+ toolchain), internet access for symbol downloads.
Do not use when: The crash is a managed .NET exception (visible in logcat with a managed stack trace), the crashing library is not a .NET component (e.g., libart.so), or the tombstone is from iOS.
Workflow
Step 1: Parse the Tombstone Backtrace
Each backtrace frame has this format:
#NN pc OFFSET /path/to/library.so (optional_symbol+0xNN) (BuildId: HEXSTRING)Extract: frame number, PC offset (hex, already library-relative), library name, and BuildId (32–40 hex chars).
Symbolicate all threads by default (background threads like GC/finalizer often have useful .NET frames). The crashing thread's backtrace is listed first; additional threads appear after --- --- --- markers.
Format notes:
The script auto-detects
#NN pcframe lines with or without abacktrace:header, and strips logcat timestamp/tag prefixes automatically.Logcat-captured tombstones often omit BuildIds. Recover via
adb shell readelf -n, CI build artifacts, or the .NET runtime NuGet package.GitHub issue pastes may mangle
#1 pcinto issue links — replaceorg/repo#N pcwith#N pcbefore saving to a file.If the script fails to parse a format, fall back to manual extraction of
#NN pc OFFSET library.so (BuildId: HEX)tuples.
Step 2: Identify .NET Runtime Libraries
Filter frames to .NET runtime libraries:
| Library | Runtime |
|---|---|
libmonosgen-2.0.so | Mono (MAUI, Xamarin, interpreter) |
libcoreclr.so | CoreCLR (JIT mode) |
libSystem.*.so | .NET BCL native components (Native, Globalization.Native, IO.Compression.Native, Security.Cryptography.Native.OpenSsl, Net.Security.Native) |
NativeAOT: No libcoreclr.so or libmonosgen-2.0.so — the runtime is statically linked into the app binary (e.g., libMyApp.so). The libSystem.*.so BCL libraries remain separate and can be symbolicated via the symbol server. For the app binary itself, you need the app's own debug symbols.
Skip libc.so, libart.so, and other Android system libraries unless the user specifically asks.
Step 3: Download Debug Symbols
For each unique .NET BuildId, download debug symbols:
https://msdl.microsoft.com/download/symbols/_.debug/elf-buildid-sym-<BUILDID>/_.debugcurl -sL "https://msdl.microsoft.com/download/symbols/_.debug/elf-buildid-sym-1eb39fc72918c7c6c0c610b79eb3d3d47b2f81be/_.debug" \
-o libmonosgen-2.0.so.debugVerify with file libmonosgen-2.0.so.debug — should show ELF 64-bit ... with debug_info, not stripped. If the download returns 404 or HTML, symbols are not published for that build. Do not add or subtract library base addresses — offsets in tombstones are already library-relative.
Step 4: Symbolicate Each Frame
llvm-symbolizer --obj=libmonosgen-2.0.so.debug -f -C 0x222098Output:
ves_icall_System_Environment_FailFast
/__w/1/s/src/runtime/src/mono/mono/metadata/icall.c:6244The /__w/1/s/ prefix is the CI workspace root — the meaningful path starts at src/runtime/, mapping to dotnet/dotnet VMR.
Step 5: Present the Symbolicated Backtrace
Combine original frame numbers with resolved function names and source locations:
#00 libc.so abort+164
#01 libmonosgen-2.0.so ves_icall_System_Environment_FailFast (mono/metadata/icall.c:6244)
#02 libmonosgen-2.0.so do_icall (mono/mini/interp.c:2457)
#03 libmonosgen-2.0.so mono_interp_exec_method (mono/mini/interp.c)For unresolved frames (??), keep the original line with BuildId and PC offset.
Automation Script
scripts/Symbolicate-Tombstone.ps1 automates the full workflow:
pwsh scripts/Symbolicate-Tombstone.ps1 -TombstoneFile tombstone_01.txt -LlvmSymbolizer llvm-symbolizerFlags: -CrashingThreadOnly (limit to crashing thread), -OutputFile path (write to file), -ParseOnly (report libraries/BuildIds/URLs without downloading), -SkipVersionLookup (skip runtime version identification).
Finding llvm-symbolizer
Check the Android NDK first: $ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/*/bin/llvm-symbolizer or $ANDROID_HOME/ndk/*/toolchains/llvm/prebuilt/*/bin/llvm-symbolizer. Also available via brew install llvm, apt install llvm, or xcrun --find llvm-symbolizer on macOS.
If unavailable, complete steps 1–3 and present the download commands and llvm-symbolizer commands for the user to run. Do not spend time installing LLVM.
Understanding the Output
CI source paths use these prefixes:
| Path prefix | Maps to |
|---|---|
/__w/1/s/src/runtime/ | src/runtime/ in dotnet/dotnet VMR |
/__w/1/s/src/mono/ | src/mono/ in the VMR (older builds) |
/__w/1/s/ | VMR root |
Runtime Version Identification
The script identifies the exact .NET runtime version by matching BuildIds against locally-installed runtime packs. It searches: SDK packs ($DOTNET_ROOT/packs/), NuGet cache (~/.nuget/packages/), and NuGet.org as an online fallback. When found, it extracts the version and source commit from the .nuspec <repository commit="..." /> element. Pass -SkipVersionLookup to disable. Requires llvm-readelf (auto-discovered from the NDK).
Validation
file <debug-file>showsELF ... with debug_info, not strippedAt least one .NET frame resolves to a function name (not
??)Resolved paths contain recognizable .NET runtime structure (e.g.,
mono/metadata/,mono/mini/)
Stop Signals
No .NET frames found: Report parsed frames and stop.
All frames resolved: Present symbolicated backtrace. Do not trace into source or attempt to build/debug the runtime.
Symbols not available (404): One attempt per BuildId, then stop. Report unsymbolicated frames with BuildIds and offsets.
llvm-symbolizer not available: Use
-ParseOnly, present manual commands. Do not install LLVM.
Common Pitfalls
Missing BuildIds: Logcat tombstones often omit BuildIds. Recover via:
adb shell readelf -n /path/to/lib.so, CI build artifacts, or the runtime NuGet package (~/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.android-arm64/<version>/). Prefer pulling raw tombstone files (adb shell cat /data/tombstones/tombstone_XX) which always include BuildIds.Symbols not found (404): Pre-release/internal builds may not publish symbols. Check for local unstripped
.so/.so.dbgin build artifacts or the NuGet runtime pack.NativeAOT: No runtime
.soin the tombstone — runtime is in the app binary.libSystem.*.soBCL libraries still work with the symbol server; the app binary needs its own debug symbols.Wrong llvm-symbolizer version: Use LLVM 14+ for best DWARF compatibility.
Multiple BuildIds: Each .NET library has its own BuildId — download symbols for each separately.
Files
- ATTRIBUTION.mdAdded by AutoGineer873 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md8.0 KiB
- scripts/Symbolicate-Tombstone.ps1Script29.5 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs network access
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- .NET (Microsoft)
- Publisher
- .NET (Microsoft) (Official)
- Source
- dotnet/skills · plugins/dotnet-diag/skills/android-tombstone-symbolication · commit 96c3d68
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by .NET (Microsoft) or .NET (Microsoft).
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download android-tombstone-symbolication.zip