| Previous | Next |
| ERROR_HV_NOT_PRESENT | ERROR_VID_TOO_MANY_HANDLERS |
ERROR_VID_DUPLICATE_HANDLER
ERROR_VID_DUPLICATE_HANDLER is HRESULT 0xC0370001 in the VID handler registration area of the Windows virtualization stack. It applies to registration of a host-side VID message handler that already has an owner.
State and ownership model
The handler key or message class is already registered in the current virtualization-stack generation. Look for duplicate initialization, module reload, or teardown that failed to unregister.
Neighboring result: TOO_MANY_HANDLERS is capacity exhaustion; HANDLER_NOT_PRESENT is lookup failure. DUPLICATE_HANDLER instead proves a matching registration already exists.
Capture before changing anything
| Evidence | Why it changes the diagnosis |
|---|---|
| Handler key | Record message class, callback identity, owner module, and target partition. |
| First registration | Keep the successful registration stack and generation. |
| Second registration | Capture the duplicate caller and whether it followed service restart, VM restore, or module reload. |
| Teardown symmetry | Compare unregister calls with successful registrations. |
Reduce the case safely
- Make registration idempotent only if the existing owner is exactly the intended one.
- Pair every successful registration with teardown in the same object instance.
- Stress start/stop and failure rollback paths.
- Do not blindly ignore the code; an unexpected existing handler can route messages to stale state.
Reproduce this condition with bounded producers and a fully instrumented consumer. Preserve message ordering, queue generation, handler ownership, target VP, and acknowledgement timestamps while changing only one concurrency condition.
What comparison can tell you
| Control | Interpretation | Hold constant |
|---|---|---|
| Fresh channel generation | A new queue or handler generation changing it points to stale registration, backlog, or incomplete teardown. | Keep payload, producer order, and host build unchanged in the test. |
| Controlled stall or burst | Deliberately slow the consumer or bound the producer rate. The threshold at which it appears identifies backpressure versus lifecycle failure. | Record queue depth, oldest-item age, and acknowledgement timing. |
| Single producer and consumer | If it disappears with serialized ownership, the queue, handler, acknowledgement, or delivery race is implicated. | Preserve message type, partition, target VP, and queue capacity. |
Do not erase the evidence
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.
Closure criteria
The fix yields one active handler per key and repeated create/destroy cycles leave registration counts at baseline.
Technical references
- Microsoft Open Specifications: HRESULT values — used to interpret this result.
- Microsoft TLFS: inter-partition communication — used to interpret this result.
- Microsoft TLFS: HV_MESSAGE — used to interpret this result.
- Microsoft: Hyper-V architecture — used to interpret this result.
Looking for a different code? Search another status or error code.