소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill dotnet-threads-analysis명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
| name | dotnet-threads-analysis |
| description | >- Use when this capability is needed. |
Diagnose thread contention, deadlocks, thread pool starvation, and sync-over-async issues in .NET applications using the standard Microsoft diagnostic CLI tools and custom ClrMD-based tools — no code changes to the target application required.
The following tools must be installed as global .NET CLI tools:
dotnet tool install -g dotnet-dump
dotnet tool install -g dotnet-counters
dotnet tool install -g dotnet-trace
dotnet tool install -g dotnet-pstacks
Verify with dotnet tool list -g. A .NET runtime (6.0+) is required on the
machine; an SDK is not needed to run the tools.
dotnet-dump analyze is interactive by default, which does not work well with
agents. Always use the -c flag to run SOS commands non-interactively:
dotnet-dump analyze <dump-path> -c "<command1>" -c "<command2>" -c "exit"
Multiple -c flags are executed in sequence. Always end with -c "exit".
Note
Always start with threads and dotnet-pstacks for a quick overview of thread state distribution before diving into individual call stacks. On Windows, if WinDbg is installed, use !locks and !runaway for additional native lock and CPU-time-per-thread details.
Use this workflow when the application is still running and you want to observe threading behavior or detect contention/starvation without taking a full dump.
dotnet-dump ps
Lists running .NET processes with PID and name. Confirm the target PID.
dotnet-counters monitor -p <PID> --counters System.Runtime
Key counters to watch:
threadpool-thread-count — climbing steadily = possible starvation or
sync-over-async patternthreadpool-queue-length — high values = work items waiting for threadsmonitor-lock-contention-count — spikes = lock contentionthreadpool-completed-items-count — compare with queue length to gauge
throughputWatch counters for at least 30 seconds to distinguish a genuine trend from a
transient spike. If threadpool-thread-count is steadily climbing (not
just spiking under load), this is a strong signal of sync-over-async or thread
pool starvation. Compare threadpool-queue-length against
threadpool-completed-items-count over time: a growing queue with flat
completions confirms the pool cannot keep up.
Press q to stop.
dotnet-trace collect -p <PID> --providers Microsoft-Windows-DotNETRuntime
Produces a .nettrace file for offline analysis. Add
Microsoft-DotNETCore-SampleProfiler for CPU profiling to identify hot threads.
If counters reveal contention or starvation but you need to see exact call stacks and lock ownership, capture a full dump:
dotnet-dump collect -p <PID>
Warning: This briefly freezes the process. Confirm with the user before running on a production system. Then continue with the Dump-Based Investigation workflow below.
Use this workflow when analyzing a .dmp file — either provided by the user or
captured via dotnet-dump collect.
dotnet-pstacks <dump>
Merges threads with identical call stacks. Quickly reveals:
dotnet-dump analyze <dump> -c "threads" -c "exit"
Shows thread ID, OS ID, state, lock count, and exception info.
dotnet-dump analyze <dump> -c "clrstack -all" -c "exit"
Look for Monitor.Enter, Monitor.Wait, SemaphoreSlim.Wait, or
ManualResetEventSlim.Wait frames to identify where threads are blocked.
dotnet-dump analyze <dump> -c "syncblk" -c "exit"
Shows which thread owns each monitor lock. Columns:
When the application is frozen and not responding:
syncblk to find which threads own locksclrstack -all to see where each thread is blockeddotnet-pstacks for visual confirmation of the circular wait patternQuick deadlock check sequence:
dotnet-dump analyze <dump> -c "syncblk" -c "threads" -c "clrstack -all" -c "exit"
Then run separately:
dotnet-pstacks <dump>
Report the deadlock cycle clearly: "Thread X holds Lock A (object 0x...) and waits for Lock B (object 0x...); Thread Y holds Lock B and waits for Lock A."
When a culprit is found (contended lock, deadlock participant, or sync-over-async blocker), inspect the lock object and surrounding code to understand the root cause:
dotnet-dump analyze <dump> -c "dumpobj <lock-object-address>" -c "exit"
Use dumpmt, dumpclass, and dumpil to examine the type that owns or acquires the
lock. Another strategy is to dump the assembly from the dump with .writemem on the
corresponding module and decompile the class methods with ilspycmd (to install with
dotnet tool install ilspycmd -g if needed) to review the actual lock acquisition
order, async call chains, or missing ConfigureAwait(false) calls.
| Symptom | Likely Cause | Key Command |
|---|---|---|
| Many threads at same lock frame | Lock contention | dotnet-pstacks + syncblk |
| App frozen, threads waiting on locks | Deadlock (circular dependency) | syncblk + clrstack -all + dotnet-pstacks |
| Thread pool count climbing (live) | Sync-over-async / starvation | dotnet-counters |
| High queue length, low completion rate | Thread pool exhaustion | dotnet-counters |
Threads blocked on SemaphoreSlim.Wait | Async throttle saturation | clrstack -all + dotnet-pstacks |
Many threads blocked at Task.Result / .GetAwaiter().GetResult() | Sync-over-async | clrstack -all + dotnet-pstacks |
Throughout the investigation, maintain a summary file with the following format <date>-<time>_thread_analysis_SUMMARY.md file in the current working directory. Create it before the first command and update it after
every step. Use the following structure:
# Thread Investigation Summary
**Date:** YYYY-MM-DD
**Target:** <process name / dump file path>
**Symptom:** <initial problem description>
## Investigation Steps
### Step N — <brief description>
**Command:**
\```
<exact command line>
\```
**Result:**
<relevant output excerpt — thread counts, parallel stacks groups, sync block
owners, deadlock cycles, counter snapshots, etc.>
**Interpretation:**
<what the result means for the investigation>
**Next action:**
<what will be done next and >
<!-- repeat for each step -->
| # | Command | Purpose |
|---|---------|---------|
| 1 | | Identify target process |
| 2 | | Parallel stacks overview |
| ... | ... | ... |
The file serves as a full audit trail the user can review, share, or archive.
dotnet-dump collect on production — it freezes the processdotnet-dump ps and confirm with the
user before proceedingSource: chrisnas/DebuggingExtensions — distributed by TomeVault.