Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Debugging LUN reset

Suresh_PatilSuresh_Patil Member Posts: 119

What are the best practices to debug a LUN reset (SRB_FUNCTION_RESET_LOGICAL_UNIT) in a storport miniport driver?
Since the LUN reset is issued when the driver didn't complete some SRB within it's timeout period, is there any way to find out which SRB actually experienced such timeout?

We are observing a LUN reset during one of our tests. We instrumented our driver by timestamping the arrival and return of each SRB, and comparing the time difference with the SRB timeout value, but none of them exceed the timeout!
The closest we have seen is 107 seconds against the timeout value of 120 seconds, but it is still less than the timeout value. Most of the SRBs anyway get completed within 2 seconds max.

Any pointers will be appreciated.

Regards,
Suresh

Comments

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,135

    StorageKD might help. Set a breakpoint on your reset handler, run !storagekd.help, and start clicking around.

    -scott
    OSR

  • Suresh_PatilSuresh_Patil Member Posts: 119

    Thanks Scott for the response. We did try that out though but not much luck.
    I was hoping that StorageKD somewhere provides the SRB which timed out and caused the LUN Reset. If it did, it would help inspecting that particular SRB and the related internal data structures to probe the reason of timeout.

    Regards,
    Suresh

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,135

    If there's a lost SRB it should show up in the output somewhere. Did you check !storclass as well? And does the adapter log under !storadapter say anything? There's a link to the appropriate !storloglist command at the end of the !storadapter output.

    -scott
    OSR

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA