内核 IRP 生命周期分诊
windbg-kernel-irp-lifecycle-triage
当内核证据显示 I/O 停滞、电源 IRP 或完成/取消使用不当时使用;检查请求状态和驱动程序所有权。不适用于将受限转储文件中空的 IRP 搜索结果解读为 I/O 健康的证明。
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 510
- Forks
- 41
01 前言 Front Matter
- name
- windbg-kernel-irp-lifecycle-triage
- description
- 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.
02 资源文件 5
- 参考文档examples/azure.yaml767 B
- 参考文档references/iac-and-environments.md6.8 KB
- 参考文档references/official-docs.md3.6 KB
- 参考文档references/project-structure.md5.3 KB
- 参考文档references/security-cicd-operations.md7.3 KB
03 SKILL.md 正文
IRP Lifecycle Triage
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.
Scope
Investigate I/O Request Packets in a kernel dump or authorized live kernel
session. Examples include 0x9F power failures and hangs where progress
depends on a driver request. Apply the parameter table for the specific
bugcheck subtype rather than assuming every 0x9F identifies the same object.
For 0x9F with P1 equal to 3, P4 is the blocked IRP. Inspect that directly
before running a system-wide search.
Workflow
1. Decode the known request
!analyze -v
!irp <irp-address>
When no request address is known and the dump has the required pool data:
!irpfind
!irpfind can be expensive in a live session and incomplete in a limited dump.
Use supported filters where appropriate. No result does not prove there are
no outstanding requests.
2. Follow the stack and ownership
Record the major/minor operation, current stack location, device/driver stack, completion routine, pending flags, cancellation state, and any relevant thread. Use the available device stack and driver source to establish which component is expected to advance or complete the request.
Do not identify an offending driver solely by the last name printed in the IRP stack. A completion routine, downstream dependency, or framework-owned request may change the responsible path.
3. Correlate dependencies
| Evidence | Next investigation |
|---|---|
| I/O verifier violation or available shadow history | windbg-kernel-verifier-triage |
| Owner/waiter kernel lock chain | windbg-kernel-lock-deadlock-triage |
| Exception or trap during request handling | windbg-kernel-bugcheck-triage |
Preserve evidence between skills; avoid repeatedly handing the same unchanged IRP back and forth.
4. Test the request protocol
- Power request: inspect the subtype's objects and power/PnP state, current stack location, and completion dependency.
- Cancellation race: establish which routine owns completion, how cancellation synchronizes with normal completion, and whether the request can be completed twice or retained after cancellation.
- Double completion: trace competing terminal paths; a single live IRP snapshot may not contain enough history.
- Pending request: verify API/framework-specific pending and completion rules, remove/shutdown paths, and who promises eventual progress.
WDM and WDF have different ownership APIs. Do not transplant a raw WDM completion/cancel pattern into a framework-owned request without checking its contract. This skill establishes evidence; it is not a complete I/O protocol reference or a decoder for every power subtype.
Validation
Name the operation, current owner/dependency, and supported protocol violation or stalled path. Test normal completion, concurrent cancellation, removal, power transitions, and shutdown where relevant. If history is missing, propose an approved instrumented test using the verifier skill rather than inventing which driver lost the completion.
References
Feedback
Follow FEEDBACK.md and report only reviewed, sanitized feedback to
WinDbg-Feedback.
Include windbg-kernel-irp-lifecycle-triage and the package version from plugin.json; no
automatic kernel dump or request-content upload.
04 同仓库更多 Skills
技能目录测试示例
sample-skill
用于测试目录工具的示例技能。在测试 CI 时使用。不用于实际工作。
WinDbg 等待链阻塞分析
windbg-user-wait-chain-analysis
当应用、服务或用户态驱动宿主程序因锁、COM/RPC、I/O 或其他进程而无响应时,用于追踪阻塞链。不适用于仅由异常栈导致的崩溃。
WinDbg 虚拟内存耗尽分析
windbg-user-virtual-memory-exhaustion
当原生应用、服务或用户态驱动宿主程序分配失败时使用;用于区分虚拟地址(VA)耗尽、碎片化和提交内存(commit)压力。不适用于托管 .NET 堆增长、仅凭单个快照证明内存泄漏,或内存损坏场景。
WinDbg TTD 时序反向调试分析
windbg-user-ttd-reverse-debugging-triage
当应用、服务或用户态驱动宿主程序有 TTD(Time Travel Debugging)录制,且需要追溯早期的调用、写入或对象生命周期时使用。不适用于内核回放,也不适用于从普通转储文件获取历史记录。
WinDbg 协程互斥锁挂起排查
windbg-user-mutex-held-across-co-await
当应用、服务或用户态驱动的 C++ 协程代码在挂起点持有线程关联锁,随后发生挂起或失败时使用。不适用于所有协程崩溃场景,也不用于锁的性能选型。
WinDbg 用户态堆损坏排查
windbg-user-heap-corruption-investigation
当应用、服务或用户态驱动宿主程序堆分配失败,或 Application Verifier 检测到损坏时使用;可检查历史记录与内存边界。不适用于内核池损坏或普通的内存不足(OOM)。