Panic during IRP completion

I am seeing a panic in the IRP completion path. The IRP is created from the driver’s internal memory and initialized using IoInitializeIrp

fffffadf1d406828 fffff8000102e874 : 000000000000000a 0000000000000078 000000000000000c 0000000000000001 : nt!KeBugCheckEx
fffffadf1d406830 fffff8000102d807 : 0a35313030303030 fffffa800c9bb000 0000000000000000 fffffadf6f211231 : nt!KiBugCheckDispatch+0x74
fffffadf1d4069b0 fffff80001030f86 : 00002b992ddfa232 0000000000000000 fffffa8082a9f540 fffffadf2453d5d6 : nt!KiPageFault+0x207 (TrapFrame @ fffffadf1d4069b0) fffffadf1d406b40 fffff80001025519 : fffffadf1d406cc0 0000000000000000 00000000a0000003 fffffa800c9bb0c0 : nt!KeInsertQueueApc+0x46 fffffadf1d406b90 fffffadf242b39b5 : fffffadf245f2fd0 00000000c0000000 fffffadf758a9a40 fffffadf`1d406ce0 : nt!IopfCompleteRequest+0xa26

The IRP was created with a stack size of 2. However the !irp extension says that Irp is active with 4 being current.

0: kd> !irp fffffa80`0c9bb0c0
Irp is active with 2 stacks 4 is current (= 0xfffffa800c9bb268)
No Mdl: System buffer=fffffadf1d406ce0: Thread fffff80002072ff0: Irp is completed. Pending has been returned
cmd flg cl Device File Completion-Context
[0, 0] 0 2 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 0000000000000000
[e, 0] 0 2 fffffadf758bee60 00000000 fffffadf2453d5c0-fffffadf1d406cf8
\Driver\xxx xxx!IrpCompletionRoutine
Args: 00000000 00000000 00000000 00000000

Any idea where I might be messing up?

Thanks,
Jing

You can’t let this IRP complete back to the I/O manager. See the post here:

http://blogs.msdn.com/doronh/archive/2006/07/27/681179.aspx

Your IoInitializeIrp IRP counts as a non-threaded IRP.

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntdev…
> I am seeing a panic in the IRP completion path. The IRP is created from
> the driver’s internal memory and initialized using IoInitializeIrp
>
> fffffadf1d406828 fffff8000102e874 : 000000000000000a 0000000000000078
> 000000000000000c 0000000000000001 : nt!KeBugCheckEx
> fffffadf1d406830 fffff8000102d807 : 0a35313030303030 fffffa800c9bb000
> 0000000000000000 fffffadf6f211231 : nt!KiBugCheckDispatch+0x74
> fffffadf1d4069b0 fffff80001030f86 : 00002b992ddfa232 0000000000000000
> fffffa8082a9f540 fffffadf2453d5d6 : nt!KiPageFault+0x207 (TrapFrame @
> fffffadf1d4069b0)<br>&gt; fffffadf1d406b40 fffff80001025519 : fffffadf1d406cc0 0000000000000000 <br>&gt; 00000000a0000003 fffffa800c9bb0c0 : nt!KeInsertQueueApc+0x46<br>&gt; fffffadf1d406b90 fffffadf242b39b5 : fffffadf245f2fd0 00000000c0000000 <br>&gt; fffffadf758a9a40 fffffadf1d406ce0 : nt!IopfCompleteRequest+0xa26<br>&gt;<br>&gt; The IRP was created with a stack size of 2. However the !irp extension <br>&gt; says that Irp is active with 4 being current.<br>&gt;<br>&gt; 0: kd&gt; !irp fffffa800c9bb0c0
> Irp is active with 2 stacks 4 is current (= 0xfffffa800c9bb268)
> No Mdl: System buffer=fffffadf1d406ce0: Thread fffff80002072ff0: Irp is
> completed. Pending has been returned
> cmd flg cl Device File Completion-Context
> [0, 0] 0 2 00000000 00000000 00000000-00000000
>
> Args: 00000000 00000000 00000000 0000000000000000
> [e, 0] 0 2 fffffadf758bee60 00000000
> fffffadf2453d5c0-fffffadf1d406cf8
> \Driver\xxx xxx!IrpCompletionRoutine
> Args: 00000000 00000000 00000000 00000000
>
> Any idea where I might be messing up?
>
> Thanks,
> Jing
>

Thanks for info. My problem is resolved now.

Regards,
Jing

On Mon, Mar 22, 2010 at 3:30 PM, Scott Noone wrote:

> You can’t let this IRP complete back to the I/O manager. See the post here:
>
> http://blogs.msdn.com/doronh/archive/2006/07/27/681179.aspx
>
> Your IoInitializeIrp IRP counts as a non-threaded IRP.
>
> -scott
>
> –
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
> wrote in message news:xxxxx@ntdev…
>
> I am seeing a panic in the IRP completion path. The IRP is created from
>> the driver’s internal memory and initialized using IoInitializeIrp
>>
>> fffffadf1d406828 fffff8000102e874 : 000000000000000a 0000000000000078
>> 000000000000000c 0000000000000001 : nt!KeBugCheckEx
>> fffffadf1d406830 fffff8000102d807 : 0a35313030303030 fffffa800c9bb000
>> 0000000000000000 fffffadf6f211231 : nt!KiBugCheckDispatch+0x74
>> fffffadf1d4069b0 fffff80001030f86 : 00002b992ddfa232 0000000000000000
>> fffffa8082a9f540 fffffadf2453d5d6 : nt!KiPageFault+0x207 (TrapFrame @
>> fffffadf1d4069b0)<br>&gt;&gt; fffffadf1d406b40 fffff80001025519 : fffffadf1d406cc0 0000000000000000<br>&gt;&gt; 00000000a0000003 fffffa800c9bb0c0 : nt!KeInsertQueueApc+0x46<br>&gt;&gt; fffffadf1d406b90 fffffadf242b39b5 : fffffadf245f2fd0 00000000c0000000<br>&gt;&gt; fffffadf758a9a40 fffffadf1d406ce0 : nt!IopfCompleteRequest+0xa26<br>&gt;&gt;<br>&gt;&gt; The IRP was created with a stack size of 2. However the !irp extension<br>&gt;&gt; says that Irp is active with 4 being current.<br>&gt;&gt;<br>&gt;&gt; 0: kd&gt; !irp fffffa800c9bb0c0
>> Irp is active with 2 stacks 4 is current (= 0xfffffa800c9bb268)
>> No Mdl: System buffer=fffffadf1d406ce0: Thread fffff80002072ff0: Irp is
>> completed. Pending has been returned
>> cmd flg cl Device File Completion-Context
>> [0, 0] 0 2 00000000 00000000 00000000-00000000
>>
>> Args: 00000000 00000000 00000000 0000000000000000
>> [e, 0] 0 2 fffffadf758bee60 00000000
>> fffffadf2453d5c0-fffffadf1d406cf8
>> \Driver\xxx xxx!IrpCompletionRoutine
>> Args: 00000000 00000000 00000000 00000000
>>
>> Any idea where I might be messing up?
>>
>> Thanks,
>> Jing
>>
>>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>