What does HRESULT 0xC0370017 (ERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED) mean?

 
Previous Next
ERROR_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE ERROR_VID_INVALID_PPM_HANDLE

ERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED

ERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED is HRESULT 0xC0370017 in the VID memory-block page lock accounting area of the Windows virtualization stack. It applies to the number of simultaneous locks or mapped page references retained for a VID memory block.

Object lifecycle behind the result

The operation reached the memory-block lock limit. Investigate leaked locks, nested locking, and workload scale before treating it as general memory shortage.

Neighboring result: MBPS_ARE_LOCKED describes pages already locked when another operation requires them unlocked; LOCK_COUNT_EXCEEDED is the quantitative limit on retained locks.

Diagnostic evidence matrix

EvidenceWhy it changes the diagnosis
Lock inventoryCount active locks by block, GPA range, owner, and purpose.
Acquire/release balanceKeep successful locks, failed locks, unlocks, and rollback paths.
Nested behaviorRecord whether the same owner locks overlapping pages repeatedly.
ThresholdCapture the exact count and workload step at first failure.

Test one variable at a time

  1. Eliminate redundant overlapping locks where semantics permit.
  2. Release locks on cancellation and every error exit.
  3. Bound concurrency around one memory block.
  4. Run a long lock/unlock soak test and graph active count.

Use a controlled partition or disposable VM when a mapping, lock, or teardown test can be destructive. During the test run, keep page units, GPA boundaries, parent object, handle generation, and release order visible.

How to read the controls

ControlInterpretationHold constant
Same request under lower host pressureIf this result changes after controlled pressure is removed, quantify host/pool capacity; if not, focus on caller bookkeeping.Do not modify guest disks or unrelated VM devices during the result comparison.
Smaller exact rangeReduce only page count or mapped extent. If it moves, range arithmetic, object limits, or reserve capacity is involved.Keep the same block, GPA base, flags, and partition generation.
Balanced fresh lifecycleCreate, use, release, and destroy one object instance. If a different result appears after recreation, investigate leaked references, locks, handles, or mappings.Preserve sizes and operation order while changing only generation.

Scope of this status

A handle observed is generation-bound. Keep its parent partition and object type beside the token; never serialize it, copy it to another partition, or reuse it after the terminal transition.

Regression proof

Lock count returns to baseline after each operation and the intended peak workload remains below the observed limit.

Technical references


Looking for a different code? Search another status or error code.