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

Home NTDEV

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/


Before Posting...

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

WHQL test PNPDTest::PNPRemoveAndRestartDevice#metadataSet0 failure

Prem_PiluPrem_Pilu Member Posts: 3

WDTF_SIMPLE_IO : Device Status: Status Flags=0x1802501 (DN_ROOT_ENUMERATED DN_NEED_RESTART DN_HAS_PROBLEM DN_DISABLEABLE DN_NT_ENUMERATOR DN_NT_DRIVER) Problem Code=e (CM_PROB_NEED_RESTART) WexTraceInfo ThreadId=5676 ProcessId=3416 TimeStamp=2806638182 LogSessionId=1

Please help me with some suggestions on how to debug this WHQL failure. I am running driver verifier for all the drivers involved with standard verifier settings.
What might be common suspects in WDF driver for this kind of failure?

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,109

    CM_PROB_NEED_RESTART means your installation couldn't finish without restarting the computer. That can mean (a) your driver was already loaded and a handle was open, or (b) you require a newer version of KMDF than what is installed. What kind of driver is it?

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Prem_PiluPrem_Pilu Member Posts: 3

    Thanks Tim the issue was some what similar to option a.
    During RemoveDevice the driver creates a workitem to cleanup the device and the sync was done using a timeout on an event in the unload. But the workitem was taking a lot more time than timeout. So used the event and signaled the event at the end workitem callback, used a wait in unload then the WHQL test passed.
    I was able to figure out the problem by putting entry and exit prints in the remove device, unload and workitem callback, ran the WHQL test in the client machine with debugger attached. I could see the logs from the WHQL test coming after unload but before workitem exit.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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!
Internals & Software Drivers 15 November 2021 Live, Online
Writing WDF Drivers 24 January 2022 Live, Online
Developing Minifilters 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online