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

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

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Debugging LUN reset

Suresh_PatilSuresh_Patil Member Posts: 122

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,299

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

    -scott
    OSR

  • Suresh_PatilSuresh_Patil Member Posts: 122

    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,299

    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
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA