Hello,
I have written a usb client driver , and am using it on 2k/XP.

when i open a handle to the driver from user mode and close the handle
, and later form the task bar , i click on safely remove hardware ,
and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
comes up.

The error does not come up if:

1) a handle to the driver was not opened
2) If i remove the device abruptly by pulling out the usb wire


any clues on how to debug this ? are there any kd commands helpful for
debugging this issue?

thanks
Taha

Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by Gary

Gary
Mon Sep 20 13:09:40 CDT 2004

You're doing kernel mode driver development and don't know how to debug a
device driver?

You're driver is completing the IRP more than once ... actually the second
time is blowing up because the IRP doesn't look right, so it panics the
system and you see this error code. Other forms of the crash could report
kernel memory problems, or simple access denied.

Use WinDbg and a second system to debug it. Run Driver Verifier and load the
checked build of the HAL and kernel.

--
The personal opinion of
Gary G. Little

Download the latest WinDbg
"M Taha Masood" <m.tahamasood@gmail.com> wrote in message
news:a350f7d.0409200748.51722d57@posting.google.com...
> Hello,
> I have written a usb client driver , and am using it on 2k/XP.
>
> when i open a handle to the driver from user mode and close the handle
> , and later form the task bar , i click on safely remove hardware ,
> and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> comes up.
>
> The error does not come up if:
>
> 1) a handle to the driver was not opened
> 2) If i remove the device abruptly by pulling out the usb wire
>
>
> any clues on how to debug this ? are there any kd commands helpful for
> debugging this issue?
>
> thanks
> Taha



Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by m

m
Mon Sep 20 17:15:54 CDT 2004

thanks for your message Garry but i already knew almost all of this .
what i was asking for was techiniques to pin down the cause of this ,
i already have a remote debugger attached to the OS on debuggee.
how would a checked build of HAL and kernel help?

thanks
Taha

"Gary G. Little" <gglittle.nospam@sbcglobal.net> wrote in message news:<E1F3d.64$q67.43@newssvr11.news.prodigy.com>...
> You're doing kernel mode driver development and don't know how to debug a
> device driver?
>
> You're driver is completing the IRP more than once ... actually the second
> time is blowing up because the IRP doesn't look right, so it panics the
> system and you see this error code. Other forms of the crash could report
> kernel memory problems, or simple access denied.
>
> Use WinDbg and a second system to debug it. Run Driver Verifier and load the
> checked build of the HAL and kernel.
>
> --
> The personal opinion of
> Gary G. Little
>
> Download the latest WinDbg
> "M Taha Masood" <m.tahamasood@gmail.com> wrote in message
> news:a350f7d.0409200748.51722d57@posting.google.com...
> > Hello,
> > I have written a usb client driver , and am using it on 2k/XP.
> >
> > when i open a handle to the driver from user mode and close the handle
> > , and later form the task bar , i click on safely remove hardware ,
> > and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> > comes up.
> >
> > The error does not come up if:
> >
> > 1) a handle to the driver was not opened
> > 2) If i remove the device abruptly by pulling out the usb wire
> >
> >
> > any clues on how to debug this ? are there any kd commands helpful for
> > debugging this issue?
> >
> > thanks
> > Taha

Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by nospam

nospam
Mon Sep 20 18:35:58 CDT 2004

If you do "!analyze -v" on the crash dump in the debugger, you should get a
stack dump showing the place of your code that attempted to complete an IRP
twice.


"M Taha Masood" <m.tahamasood@gmail.com> wrote in message
news:a350f7d.0409200748.51722d57@posting.google.com...
> Hello,
> I have written a usb client driver , and am using it on 2k/XP.
>
> when i open a handle to the driver from user mode and close the handle
> , and later form the task bar , i click on safely remove hardware ,
> and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> comes up.
>
> The error does not come up if:
>
> 1) a handle to the driver was not opened
> 2) If i remove the device abruptly by pulling out the usb wire
>
>
> any clues on how to debug this ? are there any kd commands helpful for
> debugging this issue?
>
> thanks
> Taha



Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by Walter

Walter
Mon Sep 20 22:18:24 CDT 2004

M Taha Masood wrote:
> when i open a handle to the driver from user mode and close the handle
> , and later form the task bar , i click on safely remove hardware ,
> and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> comes up.

A frequent cause of multiple IRP completion is when a driver sets the
pending flag in an IRP, returns a non-pending status from the dispatch
routine, and then later calls IoCompleteRequest. The problem in this
sequence is returning anything but STATUS_PENDING from the dispatch
routine.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com

Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by m

m
Tue Sep 21 03:14:43 CDT 2004

yup it shows that , but is there a way to see in this case from the
debugger where was it that first IoCompleteRequest was called for this
IRP ( the one that succeed ) prior to this second one which failed
regards
Taha


"nospam@cristalink.com" <cristalink@nospam.nospam> wrote in message news:<OpSdWq2nEHA.2764@TK2MSFTNGP11.phx.gbl>...
> If you do "!analyze -v" on the crash dump in the debugger, you should get a
> stack dump showing the place of your code that attempted to complete an IRP
> twice.
>
>
> "M Taha Masood" <m.tahamasood@gmail.com> wrote in message
> news:a350f7d.0409200748.51722d57@posting.google.com...
> > Hello,
> > I have written a usb client driver , and am using it on 2k/XP.
> >
> > when i open a handle to the driver from user mode and close the handle
> > , and later form the task bar , i click on safely remove hardware ,
> > and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> > comes up.
> >
> > The error does not come up if:
> >
> > 1) a handle to the driver was not opened
> > 2) If i remove the device abruptly by pulling out the usb wire
> >
> >
> > any clues on how to debug this ? are there any kd commands helpful for
> > debugging this issue?
> >
> > thanks
> > Taha

Re: MULTIPLE_IRP_COMPLETE_REQUEST stop error by Centis

Centis
Wed Sep 22 11:08:48 CDT 2004

What does your completion routine return, and are you calling
IoCompleteRequest()?

If you return STATUS_MORE_PROCESSING_REQUIRED then you must complete the IRP
processing with IoFreeIrp() or another call to IoCompleteRequest().

If you called IoSetCompletionRoutine() and specified that you did not want
to be notified of completion in the error case, then the IRP will have been
completed for you by the lowest level driver. Your call to
IoCompleteRequest() will fail.

"M Taha Masood" <m.tahamasood@gmail.com> wrote in message
news:a350f7d.0409200748.51722d57@posting.google.com...
> Hello,
> I have written a usb client driver , and am using it on 2k/XP.
>
> when i open a handle to the driver from user mode and close the handle
> , and later form the task bar , i click on safely remove hardware ,
> and then stop the device, then BSOD with MULTIPLE_IRP_COMPLETE_REQUEST
> comes up.
>
> The error does not come up if:
>
> 1) a handle to the driver was not opened
> 2) If i remove the device abruptly by pulling out the usb wire
>
>
> any clues on how to debug this ? are there any kd commands helpful for
> debugging this issue?
>
> thanks
> Taha