본문으로 건너뛰기
cccskills
무료GitHub에 공개

windbg-user-wait-chain-analysis

Use when an app, service, or user-mode driver host is unresponsive on locks, COM/RPC, I/O, or another process; follow the blocker chain. Not for a crash solely from an exception stack.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cross-Process Wait Chain Analysis

Load windbg-diagnostic-method first if it is not already loaded in this conversation, and apply it throughout for evidence ranking, hypothesis testing, confidence calibration, independent review, and report validation. This skill adds the bug-family-specific commands and evidence requirements.

Detection

Look for blocked work in an application, service, or user-mode driver host (including UMDF), and threads in wait, COM, RPC, or I/O paths. The process displaying the symptom may not own the underlying defect. Idle worker threads waiting normally are not evidence of a hang.

Workflow

1. Identify the affected operation and its thread

.lastevent
~*kb
!runaway

Confirm why the dump was collected. A dump is a snapshot; .lastevent does not by itself certify "hang" or "no crash." Identify the UI/serving thread from application evidence instead of assuming thread zero is always the UI thread. If work is spinning rather than blocked, collect appropriate CPU evidence.

2. Identify each wait and its owner

Inspect frames around WaitForSingleObject, WaitForMultipleObjects, COM send/receive, and RPC calls. Use matching symbols/source for your own proxy, interface, and server registration to determine what was requested.

For each edge record:

process / thread -> waited resource or request -> owner / serving thread

Do not guess a server PID from undocumented private COM layouts. Use available Wait Chain Traversal, RPC/COM tracing, application correlation IDs, or registration/process information, and explicitly mark unresolved edges.

3. Gather corresponding server evidence

Obtain authorized dumps or live state of the relevant server processes close enough in time to represent the same operation. Inspect their serving threads. For kernel context use documented commands such as:

!process 0 7
!thread <ethread>

Available user pages and symbol/context support vary by dump type. If the chain ends in a kernel lock use windbg-kernel-lock-deadlock-triage; if blocked I/O is supported by IRP evidence use windbg-kernel-irp-lifecycle-triage. Do not promise process heaps or user stacks absent from the dump.

4. Distinguish a cycle from a slow or missing responder

  • Cycle: show every required wait/owner edge back to the starting actor.
  • Contention: a runnable owner may eventually release the resource.
  • Starvation: queued work cannot obtain execution capacity.
  • Lost completion: the actor/event expected to unblock the waiter no longer exists or no path signals it.
  • Slow server: the endpoint is doing work, blocked on another dependency, or looping; gather its evidence before blaming the client.

Multiple snapshots or tracing may be needed to distinguish transient waits from persistent blocking.

Fix patterns and COM boundaries

A synchronous COM call from an STA can pump messages and permit reentrancy. It is not automatically a deadlock. Investigate locks held across calls, callbacks, apartment access, and any non-pumping waits that form an actual dependency cycle.

Possible remedies include asynchronous APIs, shorter lock scopes, moving destruction/cross-process calls outside critical sections, and bounded wait/cancellation protocols where the API supports them. A timeout on the caller does not cancel server work by itself.

If work moves to another apartment, marshal apartment-bound interfaces, keep captured state alive, and dispatch UI updates to the correct thread. Merely capturing a COM pointer and this in a worker lambda is not a safe fix.

Validation

Identify the affected thread, relevant resources and owners, and demonstrated cycle or deepest supported blocker. Test the proposed remedy under concurrency, reentrancy, shutdown, and timeout/cancellation. Do not stop at "waiting in RPC." If the server dump or an owner edge is missing, state the unresolved hypothesis.

References

Feedback

Follow FEEDBACK.md and submit only reviewed, sanitized feedback to WinDbg-Feedback. Include windbg-user-wait-chain-analysis and the package version from plugin.json; no automatic capture or public upload of process dumps or full diagnostic transcripts.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use with every WinDbg plugin investigation to apply evidence-first reasoning, confidence calibration, contrarian review, structured reporting, and deterministic validation. Not a bug-family-specific triage skill.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

Use when a kernel dump reports a Windows bugcheck; decode parameters and recover exception or trap context before investigating your driver. Not for user-mode process crashes or blaming a module from its name alone.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

Use when kernel evidence shows stalled I/O, a power IRP, or completion/cancellation misuse; inspect request state and driver ownership. Not for interpreting an empty IRP search in a limited dump as proof of healthy I/O.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

Use when kernel threads block on driver synchronization or Verifier reports a lock-order violation; build an owner/waiter graph. Not for treating every watchdog stop as a deadlock or listing every lock type with !locks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

Use when a kernel dump contains Driver Verifier violations; inspect flags, bugcheck subcodes, and available I/O shadow state. Not for Application Verifier user-mode stops or inferring a violation from enabled flags alone.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

Use when a native C/C++ app, service, or user-mode driver host (including UMDF) crashes with a structured exception in a dump or WinDbg session, including native faults inside managed processes. Not for managed .NET exceptions, WinUI/XAML app errors, or kernel bugchecks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

microsoft/win-dev-skills4742026년 10월 14일 업데이트

microsoft의 스킬 모두 보기

이 스킬의 문제 신고