Wdf and double fault

What we have:

  1. kmdf 1.5 driver for usb;
  2. continuous reading loop of two functions. It starts with EvtDeviceD0Entry.
    a)first function begins request

WdfUsbTargetPipeFormatRequestForRead(PIPE, Request,memBuffer,NULL)
WdfRequestSetCompletionRoutine(Request, SecondFunction, context);
WdfRequestSend(Request, WdfUsbTargetPipeGetIoTarget(PIPE), WDF_NO_SEND_OPTIONS))

b)second function complets request and than call first function

KdPrint((“Completed.\n”));
FirstFunction(context)

  1. It works well, if we repeatedly call EvtIoRead.
  2. But if we don’t call ReadFile for a long time, the system crushes.

EvtIoRead just read the memBuffer used in the loop.
What can be the reason for this behaviour?

A call stack with the output of !analyze -v would be very helpful.

Is the request that you formatting in EvtDeviceD0Entry with WdfUsbTargetPipeFormatRequestForRead() a request you created on your own? or one that is presented to you by EvtIoRead? If it is one that you created yourself, you cannot call WdfRequestComplete on it.

Are you using the built in continuous reader that KMDF implements ? If not, is there a reason why you are not using the built in continuous reader?

d

I’m now trying to install symbols. It wants symbols for ialmnt5.sys. I don’t where synbols for it.


Oh, really. Yes, I ccreate this request. But sometimes it works. :slight_smile:


I don’t use it, as i should control the size of packets from device.