windbg-kernel-irp-lifecycle-triage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

IRP Lifecycle Triage

IRP 生命周期诊断

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.
如果尚未在当前对话中加载
windbg-diagnostic-method
,请先加载它,并在整个过程中应用它,以进行证据排序、假设检验、置信度校准、独立审查和报告验证。本 skill 会添加该 bug family 专属的命令和证据要求。

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.
在 kernel dump 或经授权的实时内核会话中调查 I/O Request Packet。示例包括
0x9F
power failure,以及进度取决于驱动请求的 hang。应针对具体的 bugcheck 子类型应用参数表,而不是假定每个
0x9F
都标识同一对象。
对于 P1 等于
3
的
0x9F
,P4 是被阻塞的 IRP。应在执行全系统搜索之前直接检查该 IRP。

Workflow

工作流

1. Decode the known request

1. 解码已知请求

text
!analyze -v
!irp <irp-address>
When no request address is known and the dump has the required pool data:
text
!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.
text
!analyze -v
!irp <irp-address>
当尚不清楚请求地址,且 dump 包含所需的 pool 数据时:
text
!irpfind
!irpfind
在实时会话中可能开销很大,而且在有限 dump 中可能无法完整搜索。适用时使用受支持的过滤器。没有结果并不能证明不存在未完成的请求。

2. Follow the stack and ownership

2. 跟踪栈与所有权

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.
记录主/次操作、当前栈位置、设备/驱动程序栈、完成例程、pending 标志、取消状态,以及任何相关线程。使用可用的设备栈和驱动程序源码来确认预期推进或完成请求的组件。
不要仅根据 IRP 栈中最后打印的名称来认定责任驱动。完成例程、下游依赖或框架拥有的请求,都可能改变责任路径。

3. Correlate dependencies

3. 关联依赖关系

EvidenceNext 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.
证据下一步调查
I/O verifier 违规或可用的 shadow history
windbg-kernel-verifier-triage
owner/waiter 内核锁链
windbg-kernel-lock-deadlock-triage
请求处理期间发生 exception 或 trap
windbg-kernel-bugcheck-triage
在各 skill 之间保留证据;避免反复将同一个未发生变化的 IRP 来回传递。

4. Test the request protocol

4. 测试请求协议

  • 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.
  • Power request: 检查该子类型的对象、power/PnP 状态、当前栈位置和完成依赖关系。
  • 取消竞争(cancellation race): 确认哪个例程负责完成请求、取消操作如何与正常完成同步,以及请求是否可能被完成两次或在取消后仍被保留。
  • 重复完成(double completion): 跟踪相互竞争的终止路径;单个实时 IRP 快照可能没有足够的历史信息。
  • Pending request: 验证 API/framework 特定的 pending 和完成规则、remove/shutdown 路径,以及由谁保证最终取得进展。
WDM 和 WDF 使用不同的所有权 API。未经检查相应 contract,不要将原生 WDM completion/cancel 模式套用到框架拥有的请求中。本 skill 用于确立证据;它不是完整的 I/O 协议参考,也不是所有 power 子类型的解码器。

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.
明确指出操作、当前 owner/dependency,以及有证据支持的协议违规或停滞路径。在相关场景中测试正常完成、并发取消、设备移除、电源状态转换和 shutdown。如果缺少历史信息,应使用 verifier skill 提出一个经过批准的插桩测试方案,而不是臆测哪个驱动丢失了 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.
遵循
FEEDBACK.md
,并且仅将经过审查和脱敏的反馈报告到 WinDbg-Feedback。包含
windbg-kernel-irp-lifecycle-triage
和
plugin.json
中的 package version;不得自动上传 kernel dump 或请求内容。