VirtualBox

Ticket #2977 (closed defect: duplicate)

Opened 5 years ago

Last modified 5 years ago

Unable to use gdb debugger on Linux guest -> fixed in SVN/2.1.4

Reported by: nhathaway Owned by:
Priority: major Component: VMM/RAW
Version: VirtualBox 2.1.0 Keywords: gdb
Cc: Guest type: Linux
Host type: Windows

Description

I am using an Ubuntu 8.10 guest on a Windows host.

When I run gdb I get this:

nigel@kubuntu810:~/flash/test$ gdb ./norboottest
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /home/nigel/flash/test/norboottest
Couldn't write registers: Input/output error.
(gdb)

It worked fine before I upgraded to VirtualBox 2.1.0. With this new version of VirtualBox I cannot debug programs.

Attachments

virtualbox.PNG Download (64.1 KB) - added by nhathaway 5 years ago.
Screenshot showing settings
VBox.log Download (96.6 KB) - added by nhathaway 5 years ago.
Virtualbox log file

Change History

comment:1 Changed 5 years ago by michael

Does this work if you enable hardware virtualisation?

comment:2 Changed 5 years ago by nhathaway

The hardware is a Dell Latitude D620. The problem is the same whether "VT-x/AMD-V" is enabled or not.

comment:3 Changed 5 years ago by nhathaway

This problem was also reported by someone else on the Ubuntu launchpad:

 https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/312176

comment:4 Changed 5 years ago by michael

Are you sure that you successfully enabled hardware virtualisation? I get this issue too without, but when I enable it the issue goes away. The log file should tell you if hw virtualisaion is properly enabled or not - if you like, you can attach it (not copy/paste!) here.

Changed 5 years ago by nhathaway

Screenshot showing settings

Changed 5 years ago by nhathaway

Virtualbox log file

comment:5 Changed 5 years ago by cbissell

I'd like to report the exact same problem. Vista SP1 32x host, Ubuntu 8.10 guest. It throws the error regardless of whether or not hardware virtualization is enabled (though I'm not sure from the logs whether or not it was successfully enabled).

comment:6 Changed 5 years ago by michael

nhathaway: yes, hwvirt is enabled. Sorry for double checking, we have had lots of people thinking it was enabled when it wasn't.

comment:7 follow-up: ↓ 12 Changed 5 years ago by dti.enovales

I have run into this issue as well, running XP SP 3 on a Core 2 Duo, guesting Ubuntu 8.10. The issue occurs regardless of whether or not I have the hardware virtualization checkbox enabled. (I also checked the log file and HWVirtExt _is_ enabled when I have the checkbox set.)

This bug does not occur if I roll back to 2.0.6.

comment:8 Changed 5 years ago by sandervl73

nhatahway: you have VT-x enabled, but it's not being used, because it's not enabled properly or at all in your host BIOS.

Not that it really matters as you said it used to work in 2.0.6. That is, if it worked with VT-x disabled there too.

comment:9 Changed 5 years ago by nhathaway

I went into the BIOS and enabled hardware virtualisation support (which was disabled previously, as you say). I tried the same thing again, and this time things worked OK.

So, it appears that this problem is restricted to the case where VT-x is disabled.

Note: it would be useful if it could give you a warning if you have enabled VT-x in the GUI but it is disabled in the BIOS.

comment:10 Changed 5 years ago by sandervl73

Can you then confirm (again) that it works with 2.0.6 without VT-x? If it does, then it's a regression in 2.1.0. Thanks.

comment:11 Changed 5 years ago by nhathaway

I don't have time, I'm afraid. I can confirm that I made no changes to any settings before and after the upgrade. User dti.enovales also did the same thing. So I would say this is pretty conclusive evidence.

I would suggest the next stage is for the developers to confirm they can reproduce it.

comment:12 in reply to: ↑ 7 Changed 5 years ago by dti.enovales

Replying to dti.enovales:

I have run into this issue as well, running XP SP 3 on a Core 2 Duo, guesting Ubuntu 8.10. The issue occurs regardless of whether or not I have the hardware virtualization checkbox enabled. (I also checked the log file and HWVirtExt _is_ enabled when I have the checkbox set.)

This bug does not occur if I roll back to 2.0.6.

I realized after reading the followups that I didn't have the virtualization support enabled in my BIOS (again, it would be nice to have a bit better notification about this in VirtualBox), so I turned it on. gdb debugging now works under 2.1.0 with virtualization support enabled -- however, the issue still occurs if the virtualization support is turned off.

In summary: gdb (host: Windows, guest: Ubuntu 8.10) works under 2.1.0 _only_ if virtualization is enabled in the BIOS and in the VirtualBox settings.

Sorry for adding to the confusion.

comment:13 Changed 5 years ago by cbissell

Enabling VT-x in the bios also resolved my debugging issue. Thanks for the followups!

comment:14 follow-up: ↓ 15 Changed 5 years ago by frank

  • Component changed from other to VMM/RAW

comment:15 in reply to: ↑ 14 Changed 5 years ago by csglinux

Replying to frank: I have the same problem and unfortunately my Dell XPS M1330 does not allow me to enable VT-x support in the BIOS, so I cannot use gdb with Virtualbox 2.1.2 :-(

comment:16 Changed 5 years ago by mrcrispin

VirtualBox greeted me this morning with a "time to update" message. I innocently complied, and now I have the same problem. I have VT-x support enabled in VirtualBox. My machine's BIOS doesn't provide any means to do so though.

This is a bad bug. It's crippling my work until this is fixed. What's worse, it told me that it changed my virtual machine in some incompatible way so I can't roll back.

Please fix as soon as possible.

comment:17 Changed 5 years ago by sandervl73

You can go back to 2.0.x by copying the old config files back (yes, I know it's annoying) and reinstalling that version.

comment:18 Changed 5 years ago by sandervl73

With Ubuntu 8.04 gdb seems to work well. Setting breakpoints and stepping over instructions.

comment:19 follow-up: ↓ 21 Changed 5 years ago by sandervl73

Ok, reproduced with Ubuntu 8.10. Will fix it.

comment:20 Changed 5 years ago by mrcrispin

I was able to roll back to 2.0.6 and use my current virtual machine after deleting the XML file. That's a relief.

For what it's worth, in case any of this information is helpful in coming up with a fix:

I'm running the 64-bit version of VirtualBox under Ubuntu 8.04 (the actual hardware is an HP Pavilion dv6985se laptop dual-boot between Ubuntu and Windows Vista, both 64-bit).

The virtual machine is 32-bit Ubuntu 8.10. The software that I am working on has components that don't fully run in 64-bit (yet...they will), hence the need for a 32-bit VM.

In the working version (2.0.6), the "Enable VT-x/AMD-V" checkbox is disabled and greyed out. In the broken version (2.1.2) that checkbox is enabled and active, but doesn't seem to have any effect otherwise.

The BIOS has your typical useless laptop BIOS config that doesn't let you do much other than set date/time and device boot order. Nothing about VT-x.

Thanks for all your efforts!

comment:21 in reply to: ↑ 19 Changed 5 years ago by singh.gurjeet

Replying to sandervl73:

Ok, reproduced with Ubuntu 8.10. Will fix it.

So when can expect a fix for this? I have hit this bug on Fedora 10 Guest on Vista.

comment:22 Changed 5 years ago by sandervl73

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

Marked as a duplicate of #3245 as that one contains more technical info (strace).

comment:23 Changed 5 years ago by sandervl73

  • Summary changed from Unable to use gdb debugger on Linux guest to Unable to use gdb debugger on Linux guest -> fixed in SVN/2.1.4
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use