IRP Completion check

Hi,
I am getting a kernel crash with bug check code 0x44
(MULTIPLE_IRP_COMPLETE_REQUESTS).
How can i avoid calling the IoCompleteRequest() for an IRP that has
already been completed? Is there any field in IRP structure which can tell
that IRP is complete or any function call to get the IRP status before
calling the IoCompleteRequest?

Best Regards,
Arvind.
----- Original Message -----
From: “Else Kluger”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 09, 2005 5:05 PM
Subject: [ntdev] Driver Unit Tests

> Hi,
>
> has anyone of you experience with unit testing in kernel mode ?
> I feel quite comfortable (and nearly secure) with Driver Verifier,
> having extensive registry configurable debug logs
> and running Prefast from time to time.
> And I have no idea how to mock OS functionality in a way to make
> it feel real for the driver.
>
> best regards
> Else
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
xxxxx@intersolutions.stpn.soft.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Him

Once your driver has called IoCompleteRequest on an IRP you no longer “own”
the IRP, so you can’t touch it at all. Touching it includes, but is not
limited to:

  1. Accessing any fields of the IRP
  2. Calling IoCompleteRequest

So, bottom line, you need to properly design/serialize your driver so that
this doesn’t happen.

-scott


Scott Noone
Software Engineer
OSR Open Systems Resources, Inc.
http://www.osronline.com

“Arvind” wrote in message
news:xxxxx@ntdev…
> Hi,
> I am getting a kernel crash with bug check code 0x44
> (MULTIPLE_IRP_COMPLETE_REQUESTS).
> How can i avoid calling the IoCompleteRequest() for an IRP that has
> already been completed? Is there any field in IRP structure which can tell
> that IRP is complete or any function call to get the IRP status before
> calling the IoCompleteRequest?
>
> Best Regards,
> Arvind.
> ----- Original Message -----
> From: “Else Kluger”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, December 09, 2005 5:05 PM
> Subject: [ntdev] Driver Unit Tests
>
>
>> Hi,
>>
>> has anyone of you experience with unit testing in kernel mode ?
>> I feel quite comfortable (and nearly secure) with Driver Verifier,
>> having extensive registry configurable debug logs
>> and running Prefast from time to time.
>> And I have no idea how to mock OS functionality in a way to make
>> it feel real for the driver.
>>
>> best regards
>> Else
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as:
> xxxxx@intersolutions.stpn.soft.net
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>

No there isn’t. There is nothing in the IRP you can check to see if it has
been completed since the very act of checking than field can cause a bug
check. Once completed you CANNOT touch that IRP for ANYTHING. You have
to work your logic such that this condition is not possible.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Arvind
Sent: Friday, December 09, 2005 5:06 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] IRP Completion check

Hi,
I am getting a kernel crash with bug check code 0x44
(MULTIPLE_IRP_COMPLETE_REQUESTS).
How can i avoid calling the IoCompleteRequest() for an IRP that has
already been completed? Is there any field in IRP structure which can tell
that IRP is complete or any function call to get the IRP status before
calling the IoCompleteRequest?

Best Regards,
Arvind.
----- Original Message -----
From: “Else Kluger”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 09, 2005 5:05 PM
Subject: [ntdev] Driver Unit Tests

> Hi,
>
> has anyone of you experience with unit testing in kernel mode ?
> I feel quite comfortable (and nearly secure) with Driver Verifier,
> having extensive registry configurable debug logs
> and running Prefast from time to time.
> And I have no idea how to mock OS functionality in a way to make
> it feel real for the driver.
>
> best regards
> Else
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
xxxxx@intersolutions.stpn.soft.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@seagate.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

This can occur due to IoMarkIrpPending, and then returning anything other
then STATUS_PENDING.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Arvind”
To: “Windows System Software Devs Interest List”
Sent: Friday, December 09, 2005 2:05 PM
Subject: [ntdev] IRP Completion check

> Hi,
> I am getting a kernel crash with bug check code 0x44
> (MULTIPLE_IRP_COMPLETE_REQUESTS).
> How can i avoid calling the IoCompleteRequest() for an IRP that has
> already been completed? Is there any field in IRP structure which can tell
> that IRP is complete or any function call to get the IRP status before
> calling the IoCompleteRequest?
>
> Best Regards,
> Arvind.
> ----- Original Message -----
> From: “Else Kluger”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, December 09, 2005 5:05 PM
> Subject: [ntdev] Driver Unit Tests
>
>
> > Hi,
> >
> > has anyone of you experience with unit testing in kernel mode ?
> > I feel quite comfortable (and nearly secure) with Driver Verifier,
> > having extensive registry configurable debug logs
> > and running Prefast from time to time.
> > And I have no idea how to mock OS functionality in a way to make
> > it feel real for the driver.
> >
> > best regards
> > Else
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> xxxxx@intersolutions.stpn.soft.net
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com