Stack Trace Crash Analysis for dd-trace-dotnet
40
38%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.claude/skills/analyze-crash/SKILL.mdYou are analyzing a crash stack trace for the dd-trace-dotnet repository. Perform a comprehensive investigation to help engineers understand and triage the crash. Focus on de-mystifying the crashing thread and explaining how the crash occurred.
The user has provided a crash stack trace. Parse and analyze it systematically.
When referencing files in the dd-trace-dotnet repository, always provide clickable GitHub links in addition to local paths:
Format:
[filename:line](https://github.com/DataDog/dd-trace-dotnet/blob/master/path/to/file#Lline)Examples:
[cor_profiler.cpp:1430](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp#L1430)[rejit_handler.cpp:263-296](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/rejit_handler.cpp#L263-L296)When to use:
Path construction:
https://github.com/DataDog/dd-trace-dotnet/blob/master/C:\Users\...\dd-trace-dotnet\ or similar prefixes)#L{lineNumber} for single line or #L{start}-L{end} for rangesC:\Users\...\dd-trace-dotnet\tracer\src\Datadog.Tracer.Native\cor_profiler.cpp:1430 becomes [cor_profiler.cpp:1430](https://github.com/DataDog/dd-trace-dotnet/blob/master/tracer/src/Datadog.Tracer.Native/cor_profiler.cpp#L1430)Extract all stack frames and classify each one:
Classification Categories:
ReJitManager::, ProfToEEInterfaceImpl::, ICorProfiler*, CLR DLL references (clr.dll, coreclr.dll, mscorwks.dll)trace::, debugger::, fault_tolerant::, iast::), or paths containing Datadog.Tracer.NativeDatadog.Trace.dll!Create a classification table showing frame number, type, location, and brief description.
For each dd-trace-dotnet frame that includes file path and line number:
Extract and normalize path: Remove build-specific prefixes
c:\mnt\, D:\a\_work\1\s\, /home/runner/work/dd-trace-dotnet/, etc.tracer/src/Datadog.Tracer.Native/{filename}Find file in repository:
**/Datadog.Tracer.Native/**/{filename}**/{filename}Read code with context:
For each critical dd-trace-dotnet frame:
// >>> CRASH POINT <<<Format each code section as:
### Frame X: {function_name} ([{file}:{line}](GitHub link))
```cpp
// {file}:{start_line}-{end_line}
{code with crash line marked}
```
**Analysis**: {Explanation of what this code does and why it failed}Build a narrative explaining the execution flow leading to the crash. This is the primary goal of the analysis - to help engineers understand what happened:
Write this as a clear, step-by-step narrative that someone unfamiliar with the code can follow. Focus on explaining HOW the crash happened based on the evidence in the stack trace and code, without prescribing a specific fix.
Use Bash tool with git commands to find relevant context, focusing on commits associated with PRs:
git log --oneline -10 {file}git log --grep="crash" --grep="fix" --oneline -20 (use keywords relevant to the crash area)https://github.com/DataDog/dd-trace-dotnet/pull/{number}Focus on commits with PR links - PRs provide valuable context including descriptions, discussions, and rationale that individual commits lack.
Generate a well-formatted markdown document with these sections:
# Crash Analysis Report
**Generated**: {ISO 8601 timestamp}
## Executive Summary
{2-3 sentence summary of what crashed and where in the code. Focus on demystifying the crash location and describing what the crashing thread was doing.}
## Stack Trace Classification
### Crashed Thread: #{thread_number}
| # | Type | Location | Description |
|---|------|----------|-------------|
| 0 | {type} | {function/location} | {brief description} |
| 1 | {type} | {function/location} | {brief description} |
| ... | ... | ... | ... |
{If multiple threads provided, note other interesting threads but focus on crashed thread}
## Code Context
{For each critical dd-trace-dotnet frame, show code with analysis}
### Frame X: {function} ([{file}:{line}](GitHub link))
```cpp
{code snippet with crash line marked}
```
**Analysis**: {Explanation of what this code does}
## Crash Flow Reconstruction
{Step-by-step narrative explaining the execution flow from start to crash point}
**Crash Type**: {Description of what type of crash this is - e.g., null pointer dereference, access violation, invalid module reference, race condition}
**How it happened**: {Clear explanation of the sequence of events that led to the crash based on the stack trace and code analysis}
## Related Code
**Relevant PRs and commits**:
- [#{PR number}](https://github.com/DataDog/dd-trace-dotnet/pull/{PR number}): {PR title/description} - {why relevant}
- [#{PR number}](https://github.com/DataDog/dd-trace-dotnet/pull/{PR number}): {PR title/description} - {why relevant}
{Only include commits without PR associations if they are particularly relevant}
**Related code locations**:
- [{file}:{line}](GitHub link) - {description}
- [{file}:{line}](GitHub link) - {description}
## Additional Context
{Any additional useful context about the application environment, runtime, features in use, or relevant background}
---
*Analysis generated by Claude Code /analyze-crash command*
*This analysis is intended to help understand and triage the crash. Engineers should review this analysis to determine if a code fix is needed.*powershell.exe -NoProfile -Command 'New-Item -ItemType Directory -Force -Path (Join-Path $env:USERPROFILE ".claude\analysis") | Select-Object -ExpandProperty FullName'mkdir -p ~/.claude/analysis && echo ~/.claude/analysis$env:USERPROFILEcrash-analysis-{YYYYMMDD-HHMMSS}.md (e.g., crash-analysis-20250316-143022.md)https://github.com/DataDog/dd-trace-dotnet/pull/{number}. Only include standalone commit links if particularly relevant and not part of a PRParse the stack trace provided by the user and follow the workflow above to generate a comprehensive crash analysis.
6249bb4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.