阅读:4446回复:2
有人知道蓝屏代码为 MULTIPLE_IRP_COMPLETE_REQUESTS (44) 的调试方法吗
目前我的驱动程序碰到了一个新的问题。问题描述如下:
MULTIPLE_IRP_COMPLETE_REQUESTS (44) A driver has requested that an IRP be completed (IoCompleteRequest()), but the packet has already been completed. This is a tough bug to find because the easiest case, a driver actually attempted to complete its own packet twice, is generally not what happened. Rather, two separate drivers each believe that they own the packet, and each attempts to complete it. The first actually works, and the second fails. Tracking down which drivers in the system actually did this is difficult, generally because the trails of the first driver have been covered by the second. However, the driver stack for the current request can be found by examining the DeviceObject fields in each of the stack locations. Arguments: Arg1: 8c491a38, Address of the IRP Arg2: 00000252 Arg3: 00000000 Arg4: 00000000 STACK_TEXT: b9185654 80826967 00000003 00000001 00000000 nt!RtlpBreakWithStatusInstruction b91856a0 8082786b 00000003 80a5bf00 8cf40030 nt!KiBugCheckDebugBreak+0x19 b9185a38 80827c63 00000044 8c491a38 00000252 nt!KeBugCheck2+0x5e1 b9185a58 809b5822 00000044 8c491a38 00000252 nt!KeBugCheckEx+0x1b b9185ad0 bacdcb30 b9185b00 b9185af8 bace9e91 nt!IovCompleteRequest+0x13e b9185adc bace9e91 00000000 8cf40b00 00000001 KIrp::Complete+0x20 b9185af8 bacdeb74 8c491a38 8cf40000 8cf40bf0 KDriverManagedQueueCsq::NextIrp+0xf1 b9185b18 bacdf318 8c491a38 00000000 80006000 KDriverManagedQueueCsq::PnpNextIrp+0x54 b9185b34 bace102e 8c491a38 00000001 b9185b0e SerialDeviceControl+0xb8 b9185b54 bace9d46 8c491a38 8cf40bf0 b9185b78 StartIo+0x8e b9185b64 bacdf252 8c491a38 8cf400e8 00000000 KDriverManagedQueueCsq::QueueIrp+0x66 b9185b78 bace264e 8c491a38 ffffffff b9185bbc DeviceControl+0x22 b9185bb0 bace0c35 8c491a38 80a5bf00 8cf40030 KPnpDevice::DeviceIrpDispatch+0x41e b9185bc4 809b550c 8cf40030 8c491a38 8c491b0c KDriver::DriverIrpDispatch+0x55 b9185bf4 8081df33 809c560e b9185c14 809c560e nt!IovCallDriver+0x112 b9185c00 809c560e 80a5bf00 8cf3e020 00000000 nt!IofCallDriver+0x13 b9185c14 809b550c 8cf3e020 8c491a38 8c491a38 nt!ViFilterDispatchGeneric+0x2a b9185c44 8081df33 808f5437 b9185c64 808f5437 nt!IovCallDriver+0x112 b9185c50 808f5437 8c491b14 8c32b268 8c491a38 nt!IofCallDriver+0x13 b9185c64 808f61bf 8cf3e020 8c491a38 8c32b268 nt!IopSynchronousServiceTail+0x10b b9185d00 808eed08 00000154 00000000 00000000 nt!IopXxxControlFile+0x5e5 b9185d34 8088978c 00000154 00000000 00000000 nt!NtDeviceIoControlFile+0x2a b9185d34 7c9585ec 00000154 00000000 00000000 nt!KiFastCallEntry+0xfc 0012ecb4 7c956fcb 7c8016f5 00000154 00000000 ntdll!KiFastSystemCallRet 0012ecb8 7c8016f5 00000154 00000000 00000000 ntdll!NtDeviceIoControlFile+0xc 0012ed1c 100d6aa6 00000154 80006000 0012ee2c kernel32!DeviceIoControl+0x137 感觉这个蓝屏现象很难调试,在我的应用程序中会经常调用DeviceIoControl函数,出现蓝屏时也并非是第一次调用DeviceIoControl函数就发生了,而是调用了几百次甚至几千次以后才发生的,感觉这个问题很不好分析,请各位高手不吝赐教。谢谢。 |
|
沙发#
发布于:2009-06-25 14:48
在接收DeviceIoControl和完成DeviceIoControl时将IRP的指针都打印出来,用windbg跟踪到时那个Contorl code出了问题,然后分析这个control code的各种情况。 希望有用。
|
|
板凳#
发布于:2009-06-27 23:06
这个我遇到过,就是一个irp被多次IoCompleteRequest了,看看你的代码看有没有多次向下层发送该IRP的bug或者多次完成该IRP的bug
|
|