4d61726b / VirtualKD-Redux

VirtualKD-Redux - A revival and modernization of VirtualKD
GNU Lesser General Public License v2.1
777 stars 136 forks source link

Debuggee never connects #41

Closed bananabr closed 1 year ago

bananabr commented 2 years ago

Describe the bug Debuggee never connects to debug pipe.

To Reproduce Steps to reproduce the behavior: Follow the installation tutorial using the configuration below.

Expected behavior Debuggee connects to pipe and debugger breaks execution.

Screenshots

VirtualKD

Configuration (please complete the following information):

4d61726b commented 2 years ago

Thanks for creating a good writeup and providing the animated GIF, that helps a lot.

I noticed that you didn't press F8 and disable driver signature enforcement at the boot menu. Would you be able to try that first before I start to triage this?

bananabr commented 2 years ago

Sorry, @4d61726b,

It's my first time using VirtualKD. You are right; I was missing the F8 step. The problem now is that the VM will hang forever on the Windows boot logo when the debugger is connected.

image

I know things are supposed to run slower with a debugger connected, but I let it run the whole night, and it's still stuck on the boot screen.

Thanks for your help,

bananabr commented 2 years ago

I thought I did that already, but I will try that in a few and let you know the results.

bananabr commented 2 years ago

You can see the debuggee was already running in my last screenshot, but here is a new one anyway. CPU seems to be active be the VM is stuck in the boot screen.

image

bananabr commented 2 years ago

Just realized that even if I don't have vmmon running, nor a debugger, the VM won't start if the driver signature requirement is disabled.

4d61726b commented 2 years ago

@bananabr

Apologies, I have not had any free time yet to sit down and triage the cause of this issue. In the meantime, I might have a temporary workaround for you. Would you mind bumping the guest RAM down from 4096 to 2048 and seeing if that makes a difference? After making that change you should just need to boot again, press F8, and then select the option to disable driver signature enforcement.

You should then get the initial break in during boot and then after issuing the "g" command, the system should immediately continue booting.

chbest0102 commented 2 years ago

After decrease RAM from 4096 to 2048 in VMware, it still not work, it's still stuck on the boot screen.

RiabovAndrew commented 2 years ago

The easiest way to solve this bug is to reset virtual machine to the previous snapshot.

BTW, I tried to reinstall virtualKD on host and guest, but hadn't been gotten with any results. I use VMware, so this bug occurs on VMware too. XD

4d61726b commented 1 year ago

@bananabr @chbest0102 @RiabovAndrew

I've made several stability fixes in VirtualKD-Redux since this issue was filed. Since I've never been able to personally reproduce the problem described, would someone be able to try VirtualKD-Redux 2022.1 to see if that version addresses the problem?

For a proper test, it's critical that you rerun vminstall.exe from 2022.1 on the guest. You cannot use the vminstall.exe from an older version as that won't have all the fixes.

For an accurate test (and to reduce the chance of human error), I think it's best to just try this on a virtual machine that has never had VirtualKD-Redux ever installed.

4d61726b commented 1 year ago

I'm going to close this out for now, but if the issue still persists with the latest version, feel free to comment on this ticket with details.