question

JulienMatthey-4453 avatar image
0 Votes"
JulienMatthey-4453 asked ·

Enabling kernel debug causes BSOD [Windows 10 Pro] INVALID_KERNEL_HANDLE

Every time I enable kernel debugging with bcdedit /debug on and restart my machine, I get a BSOD on the user login screen at every boot. Then I have to open the troubleshooting command prompt and load my backup bcdedit store file.

I tried with and without secure boot to no avail. I want to do a kernel debugging session in WinDbg.

What is causing these crashes ? The error is INVALID_KERNEL_HANDLE.

windows-10-general
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyFeng-MSFT avatar image
1 Vote"
JennyFeng-MSFT answered ·

@JulienMatthey-4453
Hi,
The INVALID_KERNEL_HANDLE bug check indicates that some kernel code (for example, a server, redirector, or another driver) tried to close an invalid handle or a protected handle
For your reference:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x93--invalid-kernel-handle
You'd better try this:
Download Intel(R) Driver Update Utility
There are some ways of eliminating the problem with " INVALID_KERNEL_HANDLE":
https://recoveryutility.com/fix-bsod-invalid-kernel-handle-error
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Hope above information can help you.

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GaryNebbett avatar image
2 Votes"
GaryNebbett answered ·

Hello @JulienMatthey-4453,

As mentioned in the article https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x93--invalid-kernel-handle (provided by @JennyFeng-MSFT), there are 3 types of this bug check:

  1. A protected handle was closed. This is a handle created with OBJ_PROTECT_CLOSE set in the OBJECT_ATTRIBUTES Attributes member. Closing this type of handle always causes a bug check, so this is probably not your issue.

  2. An invalid handle was closed or referenced. This problem only results in a bug check if the kernel variable KdDebuggerEnabled is not zero (otherwise a failure status is returned). This may well be your problem. One option is to identify where the bad handle is coming from and prevent that happening. Another option is to either patch the code in NtClose or just instruct the kernel debugger to jump over the KeBugCheckEx call.

  3. The error occurred referencing an invalid kernel handle and bad handle detection was enabled. This bug check only occurs if FLG_ENABLE_HANDLE_EXCEPTIONS is set in NtGlobalFlags. If this flag is set then a bug check occurs regardless of whether a kernel debugger is present, so this is probably also not your issue.

Gary







·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JulienMatthey-4453 avatar image
0 Votes"
JulienMatthey-4453 answered ·

@GaryNebbett @JennyFeng-MSFT

I am updating every driver I can and also do the Windows 20H2 udpate and see if it works.

I found out (in the device manager) my bluetooth driver was bad and the bluetooth device could not start - I never use bluetooth.

Could it be the cause ?

Thanks.

EDIT. It worked! Not sure what the culprit was but I updated every driver I could + Windows. Possibly the bad bluetooth driver (just my guess).
Thank you.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.