VirtualBox

Ticket #477 (reopened defect)

Opened 16 years ago

Last modified 3 years ago

Hardware breakpoints don't work in Virtualbox (software virtualization only)

Reported by: marius_mtm Owned by:
Component: VMM Version: VirtualBox 3.1.6
Keywords: hardware breakpoints Cc:
Guest type: other Host type: other

Description (last modified by frank) (diff)

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger). [Hardware, on Execution] WinXP guest

Attachments

VBox.log Download (39.5 KB) - added by MarioVilas 14 years ago.

Change History

comment:1 follow-up: ↓ 5 Changed 15 years ago by sandervl73

Being worked on at the moment, but will not show up until after 1.6.2.

comment:2 Changed 15 years ago by sandervl73

  • Version changed from VirtualBox 1.4.0 to VirtualBox 1.6.0

comment:3 Changed 15 years ago by sandervl73

  • priority changed from major to critical
  • Summary changed from Hardware breakpoints doesn't work in Virtualbox to Hardware breakpoints don't work in Virtualbox

comment:4 Changed 15 years ago by frank

  • Component changed from other to VMM

comment:5 in reply to: ↑ 1 Changed 15 years ago by marius_mtm

Replying to sandervl73:

Being worked on at the moment, but will not show up until after 1.6.2.

Anything on this? Doesn't work in 1.6.4 Thx.

comment:6 Changed 15 years ago by zashone

hi guys , virtualbox is the more user friendly virtual machine , for use , configuration and installation under linux. but with that lack you disappoint all a community of driver developers and reverse engineers.we are waiting for this more than one year now !!!!!

comment:7 Changed 15 years ago by frank

Yelling loud any writing dozens of exclamation marks does not help. Where did you attach the patch to fix that bug? The VirtualBox source code is freely available.

comment:8 Changed 15 years ago by Tim Sobolev

Here are files for testing this issue


Where did you attach the patch to fix that bug? The VirtualBox source code is freely available.

Not everyone can spend enough time to explore the source of VirtualBox to fix that bug. So many of them choose VMware instead VirtualBox solely because of this problem.

comment:9 Changed 15 years ago by sandervl73

I've implemented it for VT-x and AMD-V, but haven't had time to test it yet. Hopefully later this week.

comment:10 Changed 15 years ago by sandervl73

  • priority changed from critical to major
  • Version changed from VirtualBox 1.6.0 to VirtualBox 2.0.2

Successfully tested with windbg (kernel debugging session). Code is already in SVN.

comment:11 in reply to: ↑ description Changed 14 years ago by stephanecharette

Replying to marius_mtm:

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger).

What does "don't work" means? I'm trying to figure out if this is the same problem I'm seeing.

With ddd/gdb, when it hits a breakpoint it (sometimes? always?) causes the host and guest to lock hard. System completely locks up. Cannot CTRL+ALT+DEL, must physically reboot the entire system.

I'm attempting to debug a simple C++ app on my Debian Etch-64bit guest. Host is Ubuntu 8.04-64bit. VB is 2.0.2.

comment:12 follow-ups: ↓ 13 ↓ 14 Changed 14 years ago by frank

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

comment:13 in reply to: ↑ 12 Changed 14 years ago by stephanecharette

Replying to frank:

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

That's just the things -- this problem, or a different one that I'm seeing? At this point I cannot confirm whether or not the problem I'm seeing is the same thing, or something else.

comment:14 in reply to: ↑ 12 Changed 14 years ago by stephanecharette

Replying to frank:

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

This is causing me lots of pain. (The inability to debug my C++ applications.) Do we know approximately when VB 2.1 is scheduled to be released? Or is there a workaround that can be applied to VB 2.0.4?

comment:15 follow-up: ↓ 16 Changed 14 years ago by sandervl73

Fixed in 2.1 for VT-x and AMD-V.

comment:16 in reply to: ↑ 15 Changed 14 years ago by Tim Sobolev

Replying to sandervl73:

Fixed in 2.1 for VT-x and AMD-V.

And what about processors without hardware virtualization?

comment:17 Changed 14 years ago by netip

Still not work to me, windows xp sp3 host, and windows 2003 RC2 sp2 guest, set "ba" command on windbg but doesn't work, vmware and host are work fine.

comment:18 Changed 14 years ago by sandervl73

netip: with or without VT-x/AMD-V? I have tried it myself and it worked.

comment:19 Changed 14 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

No response, closing.

comment:20 Changed 14 years ago by sandervl73

  • Status changed from closed to reopened
  • Resolution fixed deleted

Actually this is still valid. Hardware breakpoints don't work with software virtualization.

comment:21 Changed 14 years ago by dalius

I can confirm this problem. VT-x not enabled (actually even not available).

comment:22 Changed 14 years ago by MarioVilas

I can also confirm this problem. Hardware breakpoints used to work normally until I enabled VT-x in the BIOS.

Furthermore, what seems to be happening is that the value of the Dr6 register is corrupted, so debuggers receive the corresponding debug event through the Win32 API, but they can't relate it to any of their breakpoints. At least that's what's happening to me right now.

In my machine the value of Dr6 is always 0xffff4ff0 no matter what breakpoint is hit. This is clearly wrong since at least one of the four low order bits of the register should be set when a hardware breakpoint is hit, and in my experience all other bits are always cleared (see the  Wikipedia for further reference).

comment:23 Changed 14 years ago by MarioVilas

I forgot to mention, VT-x is enabled in the BIOS but disabled for the virtual machine I'm using.

comment:24 Changed 14 years ago by sid

I can verify this, Olly refuses to break on any hardware breakpoint, regardless of whether VT-x is enabled or not, with Vista as host and guest.

comment:25 Changed 14 years ago by MarioVilas

Do you have a chance to test it on XP?

I have XP (32 bits) as guest and Ubuntu 8.11 (64 bits) as host.

comment:26 Changed 14 years ago by MarioVilas

Sorry, I read "can't" instead of "can", my bad :P

comment:27 Changed 14 years ago by sandervl73

MarioVilas: I don't know how you come to your DR6 conclusion, but access breakpoints hit in windbg (kernel debugger) show up in DR6. Just checked again myself.

Why don't you first attach your VBox.log to prove that VT-x is indeed turned on?

comment:28 Changed 14 years ago by sid

It seems to work fine with both Ubuntu host/Vista guest and Ubuntu host/XP guest. I haven't tried Vista host/XP guest yet though.

comment:29 Changed 14 years ago by sandervl73

Also keep in mind that hardware breakpoints are a scarce resource, so debuggers tend not to use them for code breakpoints. They just insert 'int 3's. I had to force windbg to use them (ba e 1 address).

comment:30 Changed 14 years ago by MarioVilas

I'm afraid I could no longer reproduce that weird DR6 behavior :( however hardware breakpoints are still not working for me.

I'm attaching my VBox.log, it says nothing about VT-x (when it was disabled, I used to see a line saying "No VT-x or AMD-V CPU extension found. Reason VERR_VMX_MSR_LOCKED_OR_DISABLED"). The GUI shows this:

Base Memory: 512 MB Processor(s): 1 Boot Order: Floppy, CD/DVD-ROM, Hard Disk VT-x/AMD-V: Enabled Nested Paging: Disabled

Changed 14 years ago by MarioVilas

comment:31 Changed 13 years ago by sandervl73

MarioVilas: VT-x is indeed working. I've just fixed another issue with debug registers in VT-x (not AMD-V). Fix will be in 3.1.6

comment:32 Changed 13 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

comment:33 Changed 13 years ago by sandervl73

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Component changed from VMM to VMM/RAW
  • Summary changed from Hardware breakpoints don't work in Virtualbox to Hardware breakpoints don't work in Virtualbox (software virtualization only)

This is actually still valid as hardware breakpoints don't work in the software virtualization case.

comment:34 Changed 13 years ago by sandervl73

  • Version changed from VirtualBox 2.0.2 to VirtualBox 3.1.6

comment:35 in reply to: ↑ description Changed 13 years ago by Dinesh.Venkatesan

Today, I have faced the same issue with version 3.2.6 r63112

Replying to marius_mtm:

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger). [Hardware, on Execution] WinXP guest

comment:36 Changed 12 years ago by vldinesh

This bug seems to be fixed in the latest version 3.2.12. I just tested it with Ubuntu 8.04 host and XP sp2 guest.

comment:37 Changed 12 years ago by dimljajvbu

Broken in 4.1.2, W7 64 host/XP guest, software virtualization. Enable hardware virtualization, hardware breakpoints in OllyDbg now work.

comment:38 Changed 10 years ago by hwbpfan

still broken in latest version 424, debug registers 5&6 seem to be corrupt (zero, when they are not supposed to be zero).

Last edited 10 years ago by hwbpfan (previous) (diff)

comment:39 Changed 9 years ago by frank

  • Description modified (diff)

Might be improved with VBox 4.3.2.

comment:40 Changed 7 years ago by aeichner

  • Status changed from reopened to closed
  • Resolution set to obsolete

Please reopen if still relevant with a recent VirtualBox release.

comment:41 Changed 5 years ago by saycool

  • Status changed from closed to reopened
  • Resolution obsolete deleted

I don't know when this bug is reopened but I just found that I cannot disable VT-x/AMD-V. I have upgraded to v5.2.12 and I don't know former version has same issue or not. Whenever I uncheck VT-x/AMD-V, configuration window complaints saying "found mis-configured setting". I don't know exact message for english version, cause I'm using korean version but meaning is something like that. And if I focus my mouse on that icon, it says "It will automatically VT-x/AMD-V because my virtual machine is 64bit". Whenever I try to enable kgdb on my client, it is disabled with message following. "kgdb: Could not allocate hwbreakpoints<cr>Disabling the kernel debugger". I set rodata=off and nokaslr on boot command line parameter, which worked correctly for ubuntu1804-guest on ubuntu1804-host. My host is windows10 home, and my guest is ubuntu-1804 with 1 cpu and 2048MB memory, and I need enable kgdb on my client. And My machine is i7-6700HQ.

Last edited 5 years ago by saycool (previous) (diff)

comment:42 Changed 4 years ago by ONEZERONINE

I was directed here looking a solution for:

A debugger has been detected Unload the debugger and try again.

This with Prisoner Of War on a Windows 98, 2000 and Xp emulated system.

Cheers!

comment:43 Changed 3 years ago by aeichner

  • Component changed from VMM/RAW to VMM
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use