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/


Driver Verifier + Killing Application (Ctrl + C)

ajitabhsajitabhs Member Posts: 100

Hi All,
I am hitting a very strange problem with driver verifier. Here are the steps that I am following:-

  1. I have a multithreaded stress application which issues multiple commands to my device.
  2. I press a Ctrl+C to kill the application.
  3. In my driver I can see that I completed/Cancelled all the commands that I have. The driver only has a KMDF manual queue in which the commands resides forever.
  4. My application is stuck and never closes.
  5. I dump the KMDF queue it says that there is one command which is pending.

!wdfkd.wdfqueue 0x43f5b1168918

Dumping WDFQUEUE 0x000043f5b1168918

Manual, Power-managed, PowerOn, Can accept, Can dispatch, ExecutionLevelDispatch, SynchronizationScopeNone
Number of driver owned requests: 0
Number of waiting requests: 1
!wdfrequest 0x000043f5b0ef1488 !irp 0xffffbc0a52497cb0

31: kd> !wdfrequest 0x000043f5b0ef1488
Treating handle as a KMDF handle!
!irp 0xffffbc0a52497cb0

This is a manual KMDF queue, which should be flushed automatically and all the requests in it should be cancelled by IoManager when the application is terminated.
Are we supposed to do something with these KMDF queues/requests when the application closes?
What are we missing here?

Any thoughts appreciated.
Thanks
Aj

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!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online