I am debugging an issue related to DPC timeout. When I run “running -it” command on the dump file, I see the current running thread’s stack on most of the processors are waiting for custom shared lock except one thread that is currently holding the shared lock. I assume the “KeAcquireInStackQueuedSpinLock” function raises the IRQL to dispatch and then wait for the lock object in “KxWaitForLockOwnerShip”.
This is my question. Raising the IRQL to DISPATCH_LEVEL (internally by the function KeAcquireInStackQueuedSpinLock) and waiting prolonged time for the custom lock will cause the DPC timeout. What is the purpose of “KeYieldProcessorEx” function here. It allows the system to reset DPC or something.
It describes a problem that is quite similar to yours, but, unlike you, the poster provides the dump of the whole call stack up to the very end,
i.e. to KeBugCheckEx(). Judging from this dump,what KeYieldProcessorEx() does is simply calling the code that actually dispatches interrupts
and calls ISRs
REP NOP to allow the CPU to power down if it sees fit
if you want more help, share the implementation of the custom lock as I suspect that’s where the problem lies (with no actual information, so I could be totally wrong)