VirtualBox

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2977 closed defect (duplicate)

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

Reported by: Nigel Hathaway Owned by:
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 (2)

virtualbox.PNG (64.1 KB ) - added by Nigel Hathaway 15 years ago.
Screenshot showing settings
VBox.log (96.6 KB ) - added by Nigel Hathaway 15 years ago.
Virtualbox log file

Download all attachments as: .zip

Change History (25)

comment:1 by Michael Thayer, 15 years ago

Does this work if you enable hardware virtualisation?

comment:2 by Nigel Hathaway, 15 years ago

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

comment:3 by Nigel Hathaway, 15 years ago

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

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

comment:4 by Michael Thayer, 15 years ago

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.

by Nigel Hathaway, 15 years ago

Attachment: virtualbox.PNG added

Screenshot showing settings

by Nigel Hathaway, 15 years ago

Attachment: VBox.log added

Virtualbox log file

comment:5 by Chris, 15 years ago

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 by Michael Thayer, 15 years ago

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 by Erik Novales, 15 years ago

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 by Sander van Leeuwen, 15 years ago

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 by Nigel Hathaway, 15 years ago

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 by Sander van Leeuwen, 15 years ago

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 by Nigel Hathaway, 15 years ago

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.

in reply to:  7 comment:12 by Erik Novales, 15 years ago

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 by Chris, 15 years ago

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

comment:14 by Frank Mehnert, 15 years ago

Component: otherVMM/RAW

in reply to:  14 comment:15 by Paul Batten, 15 years ago

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 by mrcrispin, 15 years ago

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 by Sander van Leeuwen, 15 years ago

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 by Sander van Leeuwen, 15 years ago

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

comment:19 by Sander van Leeuwen, 15 years ago

Ok, reproduced with Ubuntu 8.10. Will fix it.

comment:20 by mrcrispin, 15 years ago

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!

in reply to:  19 comment:21 by Gurjeet Singh, 15 years ago

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 by Sander van Leeuwen, 15 years ago

Resolution: duplicate
Status: newclosed

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

comment:23 by Sander van Leeuwen, 15 years ago

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

© 2023 Oracle
ContactPrivacy policyTerms of Use