Hi, Chris Aseltine, following is the stuck irp’ executed environment:
when received IRP_MN_START_DEVICE,
1 send the request to lower and wait to be finished successfully
2 then initialize the DPC(set the CustomDpc routine) and timer,then set the
timer(5 seconds interval)
In the CustomDpc routine, i allocate a workitem and queue it.
In the workitem routine, i did the following:
1 allocate an irp ,
2 initialize it(note:i have set srb.TimeOutValue = 10)
3 set iocompletion routine for the irp
4 call the next lower driver.The code piece like the following:
status = IoCallDriver(fdoExtension->CommonExtension.LowerDeviceObject, irp);
if (status == STATUS_PENDING)
{
DbgPrintEx(DPFLTR_IHVDRIVER_ID,DPFLTR_ERROR_LEVEL,“***********
Wait IRP to finished \n”);
status = KeWaitForSingleObject(&event, Executive, KernelMode, FALSE,
NULL);//&WaitInterval);
DbgPrintEx(DPFLTR_IHVDRIVER_ID,DPFLTR_ERROR_LEVEL,“*********** Wait IRP
success\n”);
status = ioStatus.Status;
}
The stick irp is allocated and pass to the lower in the way about( through a work item), i suspect the reason that the irp is pended and never been completed related to those object more or less. In fact, i allocate and pass the irps to lower driver many times in my driver, but they are not use the way above, i means they aren’t allocated and pass to the lower in a system work thread environment, and they never been stuck.