跳到正文
cccskills
Microsoft 官方免费在 GitHub 公开

windbg-user-virtual-memory-exhaustion

Use when a native app, service, or user-mode driver host allocation fails; distinguish VA exhaustion, fragmentation, and commit pressure. Not for managed .NET heap growth, proving a leak from one snapshot, or corruption.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md5.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Virtual Memory Exhaustion

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

Investigate E_OUTOFMEMORY (0x8007000E), STATUS_NO_MEMORY (0xC0000017), bad_alloc, or failed heap/virtual allocations in an application, service, or user-mode driver host (including UMDF). Record the actual API, requested size/alignment, architecture, flags, and error. Free physical RAM does not rule out insufficient virtual address space, commit pressure, or applicable limits.

Workflow

1. Examine the process VA map

!address -summary
!address
!heap -s

Compare available regions with the attempted allocation's contiguous range and alignment requirements. Distinguish reserved, committed, free, image, mapped, stack, and heap ranges. A large reservation consumes VA without committing its entire range. Heap internals may require more than the user's requested bytes.

Report unavailable pages/map data rather than inferring completeness from a limited dump.

2. Separate pressure mechanisms

MechanismEvidence needed
VA exhaustionProcess address range/architecture and little usable free VA
FragmentationFree space exists, but no suitable contiguous/aligned region
System commit pressureCommit usage/limit near the failure, not just free RAM
Process/job memory limitActual configured limit and relevant usage/accounting
Allocation policy/API failureAPI-specific constraints, flags, or allocator policy

Use contemporaneous system memory counters or an appropriate live/kernel session for system commit data. A process PEB is not a documented MaximumCommit source. A process's committed bytes alone do not establish a system-wide or job limit.

For 32-bit targets inspect /LARGEADDRESSAWARE and the host architecture; 2 GB versus up to 4 GB depends on those settings. Verify current documented limits for the target Windows version and architecture instead of applying one 64-bit limit to every system.

3. Identify dominant consumers

!address -f:Heap
!address -f:Stack
!heap -stat -h <heap-address>

Use !address -? and !heap -? for allocator/version-specific support. Classify dominant heaps, stacks, mappings, images, and reserved arenas. Large or numerous allocations are not automatically leaks: map them to cache policy, owners, workload, and expected lifetimes.

4. Establish growth with history

Collect authorized time-series counters, repeated comparable snapshots, or allocation/free tracing across the workload. Compare warm-up with steady-state behavior and verify whether memory is reclaimed when work finishes.

One snapshot plus process uptime cannot prove a leak rate. For a suitable user-mode recording use windbg-user-ttd-reverse-debugging-triage; for damaged allocations use windbg-user-heap-corruption-investigation instead.

Fix patterns

  • Bound caches by an appropriate size/cost policy and verify eviction. Define the lifetime of any references returned before eviction.
  • Match VirtualAlloc reservations with the correct VirtualFree release contract; distinguish decommit from release.
  • Use RAII to release resources on all supported exit/error paths.
  • Reduce large contiguous allocation requirements where the design permits.
  • Do not blindly increase limits or stack reservations before finding the pressure source, and do not convert a failed allocation into a silent success.

Validation

Name the failing allocation and pressure mechanism, identify the consumer with evidence, and exercise the remedy through warm-up, sustained load, and cleanup. Verify memory remains bounded or the intended allocation succeeds under the required constraints. Document configured system/job limits separately.

References

Feedback

Follow FEEDBACK.md and submit reviewed, sanitized feedback to WinDbg-Feedback. Include windbg-user-virtual-memory-exhaustion and the package version from plugin.json; no automatic dump or memory-content upload.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

windbg-diagnostic-method

Microsoft 官方免费

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-skills4752026年10月20日 更新

windbg-kernel-bugcheck-triage

Microsoft 官方免费

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-skills4752026年10月20日 更新

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-skills4752026年10月20日 更新

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-skills4752026年10月20日 更新

windbg-kernel-verifier-triage

Microsoft 官方免费

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-skills4752026年10月20日 更新

windbg-user-exception-triage

Microsoft 官方免费

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-skills4752026年10月20日 更新

查看 microsoft 的全部技能

报告此技能的问题