Debugging Tools for Windows

Bug Check 0xC9: DRIVER_VERIFIER_IOMANAGER_VIOLATION

The DRIVER_VERIFIER_IOMANAGER_VIOLATION bug check has a value of 0x000000C9. This is the bug check code for all Driver Verifier I/O Verification violations.

Parameters

When Driver Verifier is active and I/O Verification is selected, various I/O violations will cause this bug check to be issued. The following parameters will be displayed on the blue screen. Parameter 1 identifies the type of violation.

Parameter 1 Parameter 2 Parameter 3 Parameter 4 Cause of Error
0x01 Address of IRP being freed 0 0 The driver attempted to free an object whose type is not IO_TYPE_IRP.
0x02 Address of IRP being freed 0 0 The driver attempted to free an IRP that is still associated with a thread.
0x03 Address of IRP being sent 0 0 The driver passed IoCallDriver an IRP Type not equal to IRP_TYPE.
0x04 Address of device object 0 0 The driver passed IoCallDriver an invalid device object.
0x05 Address of device object associated with offending driver IRQL before IoCallDriver IRQL after IoCallDriver The IRQL changed during a call to the driver dispatch routine.
0x06 IRP status Address of IRP being completed 0 The driver called IoCompleteRequest with a status marked as pending (or equal to -1).
0x07 Address of cancel routine Address of IRP being completed 0 The driver called IoCompleteRequest while its cancel routine was still set.
0x08 Address of device object IRP major function code Exception status code The driver passed IoBuildAsynchronousFsdRequest an invalid buffer.
0x09 Address of device object I/O control code Exception status code The driver passed IoBuildDeviceIoControlRequest an invalid buffer.
0x0A Address of device object 0 0 The driver passed IoInitializeTimer a device object with an already-initialized timer.
0x0C Address of I/O status block 0 0 The driver passed an I/O status block to an IRP, but this block is allocated on a stack which has already unwound past that point.
0x0D Address of user event object 0 0 The driver passed a user event to an IRP, but this event is allocated on a stack which has already unwound past that point.
0x0E Current IRQL Address of IRP 0 The driver called IoCompleteRequest with IRQL > DISPATCH_LEVEL.
0x0F Address of the device object to which the IRP is being sent Pointer to the IRP Pointer to file object The driver sent a create request with a file object that has been closed, or that had its open canceled.

In addition to the errors mentioned in the previous table, there are a number of I/O Verification errors that will cause Driver Verifier to halt the system, but which are not actually bug checks.

These errors cause messages to be displayed on the blue screen, in a crash dump file, and in a kernel debugger. These messages will appear differently in each of these locations. When these errors occur, the hexadecimal bug check code 0xC9 and the bug check string DRIVER_VERIFIER_IOMANAGER_VIOLATION do not appear on the blue screen or in the debugger, although they will appear in a crash dump file.

On the blue screen, the following data will be displayed:

If a kernel-mode crash dump has been enabled, the following information will appear in the crash dump file:

If a kernel debugger is attached to the system which has caused this violation, the following information will be sent to the debugger:

Note  No other bug checks can be ignored in this manner. Only this kind of I/O Verification errors can be ignored, and even these errors can only be ignored if a kernel debugger is attached.

The following table lists those I/O Verification errors that can appear. In Windows 2000, these errors will only be displayed if I/O Verification is set to Level 2.

I/O Error Code Severity Cause of Error
0x200 Unknown This code covers all unknown I/O Verification errors.
0x201 Fatal error A device is deleting itself while there is another device beneath it in the driver stack. This may be because the caller has forgotten to call IoDetachDevice first, or the lower driver may have incorrectly deleted itself.
0x202 Fatal error A driver has attempted to detach from a device object that is not attached to anything. This may occur if detach was called twice on the same device object. (Device object specified.)
0x203 Fatal error A driver has called IoCallDriver without setting the cancel routine in the IRP to NULL. (IRP specified.)
0x204 Fatal error The caller has passed in NULL as a device object. This is fatal. (IRP specified.)
0x205 Fatal error The caller is forwarding an IRP that is currently queued beneath it. The code handling IRPs returning STATUS_PENDING in this driver appears to be broken. (IRP specified.)
0x206 Fatal error The caller has incorrectly forwarded an IRP (control field not zeroed). The driver should use IoCopyCurrentIrpStackLocationToNext or IoSkipCurrentIrpStackLocation. (IRP specified.)
0x207 Fatal error The caller has manually copied the stack and has inadvertently copied the upper layer's completion routine. The driver should use IoCopyCurrentIrpStackLocationToNext. (IRP specified.)
0x208 Fatal error This IRP is about to run out of stack locations. Someone may have forwarded this IRP from another stack. (IRP specified.)
0x209 Fatal error The caller is completing an IRP that is currently queued beneath it. The code handling IRPs returning STATUS_PENDING in this driver appears to be broken. (IRP specified.)
0x20A Fatal error The caller of IoFreeIrp is freeing an IRP that is still in use. (Original IRP and IRP in use specified.)
0x20B Fatal error The caller of IoFreeIrp is freeing an IRP that is still in use. (IRP specified.)
0x20C Fatal error The caller of IoFreeIrp is freeing an IRP that is still queued against a thread. (IRP specified.)
0x20D Fatal error The caller of IoInitializeIrp has passed an IRP that was allocated with IoAllocateIrp. This is illegal and unnecessary, and has caused a quota leak. Check the documentation for IoReuseIrp if this IRP is being recycled.
0x20E Non-fatal error A PNP IRP has an invalid status. (Any PNP IRP must have its status initialized to STATUS_NOT_SUPPORTED.) (IRP specified.)
0x20F Non-fatal error A Power IRP has an invalid status. (Any Power IRP must have its status initialized to STATUS_NOT_SUPPORTED.) (IRP specified.)
0x210 Non-fatal error A WMI IRP has an invalid status. (Any WMI IRP must have its status initialized to STATUS_NOT_SUPPORTED.) (IRP specified.)
0x211 Non-fatal error The caller has forwarded an IRP while skipping a device object in the stack. The caller is probably sending IRPs to the PDO instead of to the device returned by IoAttachDeviceToDeviceStack. (IRP specified.)
0x212 Non-fatal error The caller has trashed or has not properly copied the IRP's stack. (IRP specified.)
0x213 Non-fatal error The caller has changed the status field of an IRP it does not understand. (IRP specified.)
0x214 Non-fatal error The caller has changed the information field of an IRP it does not understand. (IRP specified.)
0x215 Non-fatal error A non-successful non-STATUS_NOT_SUPPORTED IRP status for IRP_MJ_PNP is being passed down stack. (IRP specified.) Failed PNP IRPs must be completed.
0x216 Non-fatal error The previously-set IRP_MJ_PNP status has been converted to STATUS_NOT_SUPPORTED. (IRP specified.)
0x217 Non-fatal error The driver has not handled a required IRP. The driver must update the status of the IRP to indicate whether or not it has been handled. (IRP specified.)
0x218 Non-fatal error The driver has responded to an IRP that is reserved for other device objects elsewhere in the stack. (IRP specified.)
0x219 Non-fatal error A non-successful non-STATUS_NOT_SUPPORTED IRP status for IRP_MJ_POWER is being passed down stack. (IRP specified.) Failed POWER IRPs must be completed.
0x21A Non-fatal error The previously-set IRP_MJ_POWER status has been converted to STATUS_NOT_SUPPORTED. (IRP specified.)
0x21B Non-fatal error A driver has returned a suspicious status. This is probably due to an uninitialized variable bug in the driver. (IRP specified.)
0x21C Warning The caller has copied the IRP stack but not set a completion routine. This is inefficient — use IoSkipCurrentIrpStackLocation instead. (IRP specified.)
0x21D Fatal error An IRP dispatch handler has not properly detached from the stack below it upon receiving a remove IRP. (Device object, dispatch routine, and IRP specified.)
0x21E Fatal error An IRP dispatch handler has not properly deleted its device object upon receiving a remove IRP. (Device object, dispatch routine, and IRP specified.)
0x21F Non-fatal error A driver has not filled out a dispatch routine for a required IRP major function. (IRP specified.)
0x220 Non-fatal error IRP_MJ_SYSTEM_CONTROL has been completed by someone other than the ProviderId. This IRP should either have been completed earlier or should have been passed down. (IRP specified, along with the device object where it was targeted.)
0x221 Fatal error An IRP dispatch handler for a PDO has deleted its device object, but the hardware has not been reported as missing in a bus relations query. (Device object, dispatch routine, and IRP specified.)
0x222 Fatal error A Bus Filter's IRP dispatch handler has detached upon receiving a remove IRP when the PDO is still alive. Bus Filters must clean up in FastIoDetach callbacks. (Device object, dispatch routine, and IRP specified.)
0x223 Fatal error An IRP dispatch handler for a bus filter has deleted its device object, but the PDO is still present. Bus filters must clean up in FastIoDetach callbacks. (Device object, dispatch routine, and IRP specified.)
0x224 Fatal error An IRP dispatch handler has returned a status that is inconsistent with the IRP's IoStatus.Status field. (Dispatch handler routine, IRP, IRP's IoStatus.Status, and returned Status specified.)
0x225 Non-fatal error An IRP dispatch handler has returned a status that is illegal (0xFFFFFFFF). This is probably due to an uninitialized stack variable. To debug this error, use the ln (List Nearest Symbols) command with the specified address.
0x226 Fatal error An IRP dispatch handler has returned without passing down or completing this IRP, or someone forgot to return STATUS_PENDING. (IRP specified.)
0x227 Fatal error An IRP completion routine is in pageable code. (This is never permitted.) (Routine and IRP specified.)
0x228 Non-fatal error A driver's completion routine has not marked the IRP pending if the PendingReturned field was set in the IRP passed to it. This may cause Windows to hang, especially if an error is returned by the stack. (Routine and IRP specified.)
0x229 Fatal error A cancel routine has been set for an IRP that is currently being processed by drivers lower in the stack, possibly stomping their cancel routine. (Routine and IRP specified.)
0x22A Non-fatal error The physical device object (PDO) has not responded to a required IRP. (IRP specified.)
0x22B Non-fatal error The physical device object (PDO) has forgotten to fill out the device relation list with the PDO for the TargetDeviceRelation query. (IRP specified.)
0x22C Fatal error The code implementing the TargetDeviceRelation query has not called ObReferenceObject on the PDO. (IRP specified.)
0x22D Non-fatal error The caller has completed a IRP_MJ_PNP it didn't understand instead of passing it down. (IRP specified.)
0x22E Non-fatal error The caller has completed a successful IRP_MJ_PNP instead of passing it down. (IRP specified.)
0x22F Non-fatal error The caller has completed an untouched IRP_MJ_PNP (instead of passing the IRP down), or non-PDO has failed the IRP using illegal value of STATUS_NOT_SUPPORTED. (IRP specified.)
0x230 Non-fatal error The caller has completed an IRP_MJ_POWER it didn't understand instead of passing it down. (IRP specified.)
0x231 Fatal error The caller has completed a successful IRP_MJ_POWER instead of passing it down. (IRP specified.)
0x232 Non-fatal error The caller has completed an untouched IRP_MJ_POWER (instead of passing the IRP down), or non-PDO has failed the IRP using illegal value of STATUS_NOT_SUPPORTED. (IRP specified.)
0x233 Non-fatal error The version field of the query capabilities structure in a query capabilities IRP was not properly initialized. (IRP specified.)
0x234 Non-fatal error The size field of the query capabilities structure in a query capabilities IRP was not properly initialized. (IRP specified.)
0x235 Non-fatal error The address field of the query capabilities structure in a query capabilities IRP was not properly initialized to -1. (IRP specified.)
0x236 Non-fatal error The UI Number field of the query capabilities structure in a query capabilities IRP was not properly initialized to -1. (IRP specified.)
0x237 Fatal error A driver has sent an IRP that is restricted for system use only. (IRP specified.)
0x238 Warning The caller of IoInitializeIrp has passed an IRP that was allocated with IoAllocateIrp. This is illegal, unnecessary, and negatively impacts performance in normal use. If this IRP is being recycled, see IoReuseIrp in the Windows Driver Kit.
0x239 Warning The caller of IoCompleteRequest is completing an IRP that has never been forwarded via a call to IoCallDriver or PoCallDriver. This may be a bug. (IRP specified.)
0x23A Fatal error A driver has forwarded an IRP at an IRQL that is illegal for this major code. (IRP specified.)
0x23B Non-fatal error The caller has changed the status field of an IRP it does not understand. (IRP specified.)

The following table lists additional I/O Verification errors that can appear in Windows XP and later. Some of these errors will only be revealed if Enhanced I/O Verification is activated.

I/O Error Code Severity Cause of Error
0x23C Fatal error A driver has completed an IRP without setting the cancel routine in the IRP to NULL. (IRP specified.)
0x23D Non-fatal error A driver has returned STATUS_PENDING but did not mark the IRP pending via a call to IoMarkIrpPending. (IRP specified.)
0x23E Non-fatal error A driver has marked an IRP pending but didn't return STATUS_PENDING. (IRP specified.)
0x23F Fatal error A driver has not inherited the DO_POWER_PAGABLE bit from the stack it has attached to. (Device object specified.)
0x240 Fatal error A driver is attempting to delete a device object that has already been deleted via a prior call to IoDeleteDevice.
0x241 Fatal error A driver has detached its device object during a surprise remove IRP. (IRP and device object specified.)
0x242 Fatal error A driver has deleted its device object during a surprise remove IRP. (IRP and device object specified.)
0x243 Fatal error A driver has failed to clear the DO_DEVICE_INITIALIZING flag at the end of AddDevice. (Device object specified.)
0x244 Fatal error A driver has not copied either the DO_BUFFERED_IO or the DO_DIRECT_IO flag from the device object it is attaching to. (Device object specified.)
0x245 Fatal error A driver has set both the DO_BUFFERED_IO and the DO_DIRECT_IO flags. These flags are mutually exclusive. (Device object specified.)
0x246 Fatal error A driver has failed to copy the DeviceType field from the device object it is attaching to. (Device object specified.)
0x247 Fatal error A driver has failed an IRP that cannot legally be failed. (IRP specified.)
0x248 Fatal error A driver has added a device object that is not a PDO to a device relations query. (IRP and device object specified.)
0x249 Non-fatal error A driver has enumerated two child PDOs that returned identical Device IDs. (Both device objects specified.)
0x24A Fatal error A driver has mistakenly called a file I/O function with IRQL not equal to PASSIVE_LEVEL.
0x24B Fatal error A driver has completed an IRP_MN_QUERY_DEVICE_RELATIONS request of type TargetDeviceRelation as successful, but did not properly fill out the request or forward the IRP to the underlying hardware stack. (Device object specified.)
0x24C Non-fatal error A driver has returned STATUS_PENDING but did not mark the IRP pending by a call to IoMarkIrpPending. (IRP specified.)
0x24D Fatal error A driver has passed an invalid device object to a function that requires a PDO. (Device object specified.)

Cause

See the description of each code in the Parameters section for a description of the cause.

Resolving the Problem

This bug check can only occur when Driver Verifier has been instructed to monitor one or more drivers. If you did not intend to use Driver Verifier, you should deactivate it. You might consider removing the driver which caused this problem as well.

If you are the driver writer, use the information obtained through this bug check to fix the bugs in your code.

For full details on Driver Verifier, see the Windows Driver Kit.

Build machine: CAPEBUILD