I am currently encountering a race-condition with a KMDF (1.7) USB driver on Windows 7. Not seen this before on Vista,XP etc.
Note sure if it is down to some difference in Win7? I have 2 instances of my WDF device running at the same time.
Firstly - any ideas as to how to get more out of this dump - both procs are running code in my driver: Proc0 is running my DPC (EvtDataReadComplete) which is calling WdfObjectAcquireLock. Proc 1 is running my EvtWdfDeviceWdmIrpPreprocess which is also calling WdfObjectAcquireLock (for the same device as Proc0.
I’m getting a
Assertion: *** DPC execution time exceeds system limit
This is NOT a break in update time
This is a BUG in a DPC routine
Perform a stack trace to find the culprit
The time out limit will be doubled on continuation
Use gh to continue!!
DPC_TIMEOUT_TYPE: SINGLE_DPC_TIMEOUT_EXCEEDED
DPC_RUNTIME: 283
DPC_TIME_LIMIT: 282
presumably due to my DPC blocking on its call to WdfObjectAcquireLock
Presumably this is either a race-condition within WdfObjectAcquireLock itself or the lock has already been acquired elsewhere so both of these Procs are blocked.
1: kd> !running -t
System Processors: (00000003)
Idle Processors: (00000000)
Prcbs Current Next
0 81945d20 83aa1d48 …
ChildEBP RetAddr
8078ac28 81887342 nt!KeAccumulateTicks+0x316
8078ac68 818871ef nt!KeUpdateRunTime+0x145
8078acc4 8188c577 nt!KeUpdateSystemTime+0x613
8078acc4 81c2f74f nt!KeUpdateSystemTimeAssist+0x13
8078ad48 81fa8a72 hal!KeAcquireSpinLockRaiseToSynch+0x3f
8078ad58 81fc28c4 Wdf01000!FxCallbackSpinLock::Lock+0x55
8078ad74 88539e73 Wdf01000!imp_WdfObjectAcquireLock+0xc1
8078adb0 81f93ea5 EvtDataReadComplete+0xf1
8078addc 81fa8317 Wdf01000!FxUsbPipeContinuousReader::_FxUsbPipeRequestComplete+0x3c
8078ae08 81f8cc36 Wdf01000!FxRequestBase::CompleteSubmitted+0xf6
8078ae24 81f8ccde Wdf01000!FxIoTarget::RequestCompletionRoutine+0x12d
8078ae34 818a5896 Wdf01000!FxIoTarget::_RequestCompletionRoutine+0x35
8078ae5c 81884b33 nt!IopUnloadSafeCompletion+0x45
8078aea0 8b7b3868 nt!IopfCompleteRequest+0x128
8078aed0 8b7b4178 USBPORT!USBPORT_Core_iCompleteDoneTransfer+0x6e0
8078aefc 8b7b79af USBPORT!USBPORT_Core_iIrpCsqCompleteDoneTransfer+0x33b
8078af24 8b7b1d18 USBPORT!USBPORT_Core_UsbIocDpc_Worker+0xbc
8078af48 818843b5 USBPORT!USBPORT_Xdpc_Worker+0x173
8078afa4 81884218 nt!KiExecuteAllDpcs+0xf9
8078aff4 818839dc nt!KiRetireDpcList+0xd5
8078aff8 89073b10 nt!KiDispatchInterrupt+0x2c
WARNING: Frame IP not in any known module. Following frames may be wrong.
818839dc 00000000 0x89073b10
1 807ea120 85692158 …
ChildEBP RetAddr
95f20a10 81fa8a72 hal!KeAcquireSpinLockRaiseToSynch+0x39
95f20a20 81fc28c4 Wdf01000!FxCallbackSpinLock::Lock+0x55
95f20a3c 88536898 Wdf01000!imp_WdfObjectAcquireLock+0xc1
95f20a7c 81fa72c7 EvtWdfDeviceWdmIrpPreprocess+0x62
…
Can I determine the current state of the device lock and, if it is already locked, anymore about where it was locked etc.?
Thanks
Will