Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Driver verifier IO SYSTEM VERIFICATION ERROR 226

Reply
Thread Tools Display Modes

Driver verifier IO SYSTEM VERIFICATION ERROR 226

 
 
v_mirgorodsky@yahoo.com
Guest
Posts: n/a

 
      07-06-2005
Hi, ALL!

I got the following problem with my USB driver running on Windows XP
SP2. Everything works fine, sleep, wake-up, hot-unplug, regular unplug,
data transfers and so on, except when I try to shutdown the system with
my device plugged in and, consequently, my driver loaded. System gets
all the way through shutdown procedure, saves all unsaved data, blanks
the screen and then turns it on back and displays the message from
Driver Verifier "IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)".
I never saw any problem during regular shutdown without Driver Verifier
activated. I double-checked all my handlers - none of them leaves IRP
uncompleted or not passed down the stack.

With best regards,
Vladimir S. Mirgorodsky

 
Reply With Quote
 
 
 
 
Calvin Guan
Guest
Posts: n/a

 
      07-06-2005
Can you post the output of !analyze -v? DV won't dream up such an idea,
there must be something wrong in your code. I suggest enabling DV as eariler
as you can load your driver before any feature is added to the driver.


--
Calvin Guan (Windows DDK MVP)
Staff SW Engineer NetXtreme MINIPORT
Broadcom Corp. Irvine, CA
www.broadcom.com

<> wrote in message
news: ups.com...
> Hi, ALL!
>
> I got the following problem with my USB driver running on Windows XP
> SP2. Everything works fine, sleep, wake-up, hot-unplug, regular unplug,
> data transfers and so on, except when I try to shutdown the system with
> my device plugged in and, consequently, my driver loaded. System gets
> all the way through shutdown procedure, saves all unsaved data, blanks
> the screen and then turns it on back and displays the message from
> Driver Verifier "IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)".
> I never saw any problem during regular shutdown without Driver Verifier
> activated. I double-checked all my handlers - none of them leaves IRP
> uncompleted or not passed down the stack.
>
> With best regards,
> Vladimir S. Mirgorodsky
>



 
Reply With Quote
 
v_mirgorodsky@yahoo.com
Guest
Posts: n/a

 
      07-07-2005
I found that it is a problem in PowerHandler(), at least DV claims
that. I will share results of my investigation as soon as I get the
problem solved.

With best regards,
Vladimir S. Mirgorodsky

 
Reply With Quote
 
v_mirgorodsky@yahoo.com
Guest
Posts: n/a

 
      07-07-2005
My power handler was installing completion routine on the system power
IRP and was passing it down the stack. As usual, I returned from my
power handler the value, returned by PoCallDriver() call. The system
was accepting such behavior without any complains, but Driver Verifier
decided that the power IRP was not completed appropriately and asserted
with the system IRP. I cure the problem by returning STATUS_PENDING
whenever I install completion routine on either device power IRP or
system power IRP. Now DV does not have any objections to my code.

I think this is a bug in Driver Verifier, since I always suppose to
return the same status as returned by IoCallDriver() or PoCallDriver()
from my dispatch routines. Please, correct me if I am wrong about this
issue.

With best regards,
Vladimir S. Mirgorodsky

 
Reply With Quote
 
Calvin Guan
Guest
Posts: n/a

 
      07-07-2005
> but Driver Verifier decided that the power IRP was not
> completed appropriately and asserted with the system IRP.


What exactly is the bugcheck code and parameters? What status does lower
return?

--
Calvin Guan (Windows DDK MVP)
Staff SW Engineer NetXtreme MINIPORT
Broadcom Corp. Irvine, CA
www.broadcom.com


 
Reply With Quote
 
v_mirgorodsky@yahoo.com
Guest
Posts: n/a

 
      07-07-2005
I have the following code:

NTSTATUS DispatchPower()
{
...
IoMarkIrpPending(Irp);
status = IoSetCompletionRoutine(Irp, ...);
status = PoCallDriver(pdx->LowerDeviceObject, Irp);
// Return the same status as PoCallDriver() returned
return status;
}

NTSTATUS PowCompletionRoutine(PDEVICE_OBJECT junk, PIRP Irp, ...)
{
...
Irp->IoStatus.Status = ctx->status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}

With DV enabled I see the blue screen with two lines of text:
IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)
SMX-I15x.sys+1A50, F125E400

The 1A50 offset is the start of DispatchPower() handler, I suppose,
F125E400 is the IRP DV treated as uncompleted. As soon as I change my
power handler to do the following the problem disapeared.

NTSTATUS DispatchPower()
{
...
IoMarkIrpPending(Irp);
status = IoSetCompletionRoutine(Irp, ...);
status = PoCallDriver(pdx->LowerDeviceObject, Irp);
return STATUS_PENDING;
}

I have a feeling, that this is wrong, since without DV enabled, whole
system works fine with the first edition of code.

With best regards,
Vladimir S. Mirgorodsky

Calvin Guan wrote:
> > but Driver Verifier decided that the power IRP was not
> > completed appropriately and asserted with the system IRP.

>
> What exactly is the bugcheck code and parameters? What status does lower
> return?
>
> --
> Calvin Guan (Windows DDK MVP)
> Staff SW Engineer NetXtreme MINIPORT
> Broadcom Corp. Irvine, CA
> www.broadcom.com


 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-07-2005
Forgettting to call PoStartNextPowerIrp is one of the possible cases.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com

<> wrote in message
news: ups.com...
> My power handler was installing completion routine on the system power
> IRP and was passing it down the stack. As usual, I returned from my
> power handler the value, returned by PoCallDriver() call. The system
> was accepting such behavior without any complains, but Driver Verifier
> decided that the power IRP was not completed appropriately and asserted
> with the system IRP. I cure the problem by returning STATUS_PENDING
> whenever I install completion routine on either device power IRP or
> system power IRP. Now DV does not have any objections to my code.
>
> I think this is a bug in Driver Verifier, since I always suppose to
> return the same status as returned by IoCallDriver() or PoCallDriver()
> from my dispatch routines. Please, correct me if I am wrong about this
> issue.
>
> With best regards,
> Vladimir S. Mirgorodsky
>



 
Reply With Quote
 
v_mirgorodsky@yahoo.com
Guest
Posts: n/a

 
      07-07-2005
I have a PoStartNextPowerIrp() call in my code. I just forget to put
it into code snipet.

 
Reply With Quote
 
Doron Holan [MS]
Guest
Posts: n/a

 
      07-08-2005
you need to call IoCopyCurrentIrpStackLocationToNext before calling
PoCallDriver. completion routines are per stack location. this only works
b/c the next stack location was not setting its own completion routine.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<> wrote in message
news: oups.com...
>I have the following code:
>
> NTSTATUS DispatchPower()
> {
> ...
> IoMarkIrpPending(Irp);
> status = IoSetCompletionRoutine(Irp, ...);
> status = PoCallDriver(pdx->LowerDeviceObject, Irp);
> // Return the same status as PoCallDriver() returned
> return status;
> }
>
> NTSTATUS PowCompletionRoutine(PDEVICE_OBJECT junk, PIRP Irp, ...)
> {
> ...
> Irp->IoStatus.Status = ctx->status;
> IoCompleteRequest(Irp, IO_NO_INCREMENT);
> return STATUS_SUCCESS;
> }
>
> With DV enabled I see the blue screen with two lines of text:
> IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)
> SMX-I15x.sys+1A50, F125E400
>
> The 1A50 offset is the start of DispatchPower() handler, I suppose,
> F125E400 is the IRP DV treated as uncompleted. As soon as I change my
> power handler to do the following the problem disapeared.
>
> NTSTATUS DispatchPower()
> {
> ...
> IoMarkIrpPending(Irp);
> status = IoSetCompletionRoutine(Irp, ...);
> status = PoCallDriver(pdx->LowerDeviceObject, Irp);
> return STATUS_PENDING;
> }
>
> I have a feeling, that this is wrong, since without DV enabled, whole
> system works fine with the first edition of code.
>
> With best regards,
> Vladimir S. Mirgorodsky
>
> Calvin Guan wrote:
>> > but Driver Verifier decided that the power IRP was not
>> > completed appropriately and asserted with the system IRP.

>>
>> What exactly is the bugcheck code and parameters? What status does lower
>> return?
>>
>> --
>> Calvin Guan (Windows DDK MVP)
>> Staff SW Engineer NetXtreme MINIPORT
>> Broadcom Corp. Irvine, CA
>> www.broadcom.com

>



 
Reply With Quote
 
Calvin Guan
Guest
Posts: n/a

 
      07-08-2005
You marked Irp pending and you must return STATUS_PENDING regardless what
lower has returned. If this wasn't an power irp (such as IOCTL/RD/WR), you
will get an MULTIPLE_IRP_COMPLETE_REQUESTS bugcheck if the lower returned
anything other than STATUS_PENDING.

If you don't want to blindly return STATUS_PENDING, you need to
conditionally propagate the pending flags in you completion routine instead
of marking it pending in the dispatch routine.

--
Calvin Guan (Windows DDK MVP)
Staff SW Engineer NetXtreme MINIPORT
Broadcom Corp. Irvine, CA
www.broadcom.com

<> wrote in message
news: oups.com...
>I have the following code:
>
> NTSTATUS DispatchPower()
> {
> ...
> IoMarkIrpPending(Irp);
> status = IoSetCompletionRoutine(Irp, ...);
> status = PoCallDriver(pdx->LowerDeviceObject, Irp);
> // Return the same status as PoCallDriver() returned
> return status;
> }
>
> NTSTATUS PowCompletionRoutine(PDEVICE_OBJECT junk, PIRP Irp, ...)
> {
> ...
> Irp->IoStatus.Status = ctx->status;
> IoCompleteRequest(Irp, IO_NO_INCREMENT);
> return STATUS_SUCCESS;
> }
>
> With DV enabled I see the blue screen with two lines of text:
> IO SYSTEM VERIFICATION ERROR (WDM DRIVER ERROR 226)
> SMX-I15x.sys+1A50, F125E400
>
> The 1A50 offset is the start of DispatchPower() handler, I suppose,
> F125E400 is the IRP DV treated as uncompleted. As soon as I change my
> power handler to do the following the problem disapeared.
>
> NTSTATUS DispatchPower()
> {
> ...
> IoMarkIrpPending(Irp);
> status = IoSetCompletionRoutine(Irp, ...);
> status = PoCallDriver(pdx->LowerDeviceObject, Irp);
> return STATUS_PENDING;
> }
>
> I have a feeling, that this is wrong, since without DV enabled, whole
> system works fine with the first edition of code.
>
> With best regards,
> Vladimir S. Mirgorodsky
>
> Calvin Guan wrote:
>> > but Driver Verifier decided that the power IRP was not
>> > completed appropriately and asserted with the system IRP.

>>
>> What exactly is the bugcheck code and parameters? What status does lower
>> return?
>>
>> --
>> Calvin Guan (Windows DDK MVP)
>> Staff SW Engineer NetXtreme MINIPORT
>> Broadcom Corp. Irvine, CA
>> www.broadcom.com

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HCT test failed (Driver verifier) on SCSI storage miniport driver Long Ta Windows Vista Drivers 0 11-12-2004 05:58 PM
Smart card driver verifier test caused BSOD & system restart .loop.... laudraup Windows Vista Drivers 3 07-12-2004 06:37 PM
Driver Verifier, MmMapLockedPagesSpecifyCache, error Daniel Steve Windows Vista Drivers 2 09-15-2003 04:17 PM
Re: Urgent: driver digital signature verification Ray Trent Windows Vista Drivers 0 09-05-2003 03:42 PM
Driver Verifier error 60 Pavel A. Windows Vista Drivers 1 09-03-2003 12:43 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59