How to find out why my kernel driver is hanging the system.


  1. Posts : 48
    windows 10 home
       #1

    How to find out why my kernel driver is hanging the system.


    I wrote a kernel driver that uses IoConnectInterrupt to register a handler for an interrupt vector. If I don't actually enable interrupts on the hardware, no problem, but with interrupts enabled, the system freezes after a short time. I can't use the mouse or keyboard, not even ctrl-alt-delete. So I have to pull the plug on my PC in order to reboot. There's no minidump.
    My question is, what tools can I use to find out what's wrong when the freeze occurs?
    Any help would be greatly appreciated.
    I've posted another thread about the strategy I use to select the parameters for the IoConnectInterrupt call, so if there's an answer there that solves the problem, then I won't need an answer to the present thread. However, an answer might be useful to someone else anyway.
      My Computer


  2. Posts : 41,459
    windows 10 professional version 1607 build 14393.969 64 bit
       #2

    What happens when the computer is in safe mode?
    What happens when the computer is in clean boot?

    If you can use safe mode or clean boot then you may be able to have testing options on the next boot.

    Without keyboard and mouse the options are very limited.

    This tool can be used for boot problems but you will need to use keyboard/mouse to set it up.
    Windows performance recorder - Microsoft Community

    Microsoft Systernals are additional troubleshooting options.
    They also typically require the use of the keyboard/mouse.
    Windows Sysinternals - Windows Sysinternals | Microsoft Docs
      My Computer


  3. Posts : 48
    windows 10 home
    Thread Starter
       #3

    Thanks.

    In safe mode, I can't run my driver, so I can't reproduce the problem.

    I don't know what you mean by a "clean boot." If you mean just a normal bootup, then I am doing that already, except that I am running with DSE disabled so that I can run my (unsigned) driver.

    I was hoping for a way to tell the system to do a bug check when it gets hung up, perhaps to define a hot key to do it manually. Or even to take a minidump when I cut off the power or hit the reset button on the computer.

    Or a tool that can run in the background and periodically snapshot the kernel to a file that I can analyze later?

    Also, you have any comments re my other post today about what my driver is doing that leads to the hangup?
    Last edited by mrolle; 26 Dec 2017 at 17:13. Reason: Update info on safe mode
      My Computer

  4.   My Computer


  5. Posts : 48
    windows 10 home
    Thread Starter
       #5

    I've found another answer. That is to manually cause a bugcheck from the keyboard. Details are at Forcing a System Crash from the Keyboard | Microsoft Docs.
    The article mentions that if whatever is spinning in the system is at a higher priority than the keyboard driver, the keyboard driver won't get a chance to crash the system.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:51.
Find Us




Windows 10 Forums