VirtualBox

Ticket #3947 (closed defect: fixed)

Opened 5 years ago

Last modified 13 months ago

NetBSD-5.0 doesn't work without VT-x/AMD-V

Reported by: Zplay Owned by:
Priority: major Component: other
Version: VirtualBox 3.1.4 Keywords: netbsd 5.0
Cc: Guest type: BSD
Host type: other

Description (last modified by frank) (diff)

Hello

I'm using VirtualBox very often, this is the first time I report a bug for a software, I hope to make a "good ticket".

I just downloaded the netbsd-5.0 iso file, I verified the md5 checksum and it's right. I set up a virtual machine in virtualbox with a new virtual hard drive, no problem.

When I launch the machine, it start well, I can choose Install, Install no ACPI, Install no ACPI and no SMP or drop to boot prompt.

I tried the 3 first choices (normal, no acpi, no acpi/smp) and the problem is still here. I also tried to enable, disable, IO APIC, ACPI in the virtual machine option, doesn't work too.

The message I get during the boot is: (hope to make no mistake because I typed the whole message)

attimer0: attached to pcppi0
uvm_fault(0xc0b26cc0, 0, 1) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 0 eip c0100ca8 cs 8 eflags 246 cr2 0 ilevel 0
uvm_fault(0xc0b26cc0, 0, 1) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 0 eip c0100ca8 cs 8 eflags 246 cr2 c0a77474 ilevel 0
kernel: supervisor trap page fault, code=0
Stopped in pid 0.1 (system) at netbsd:spllower+0x28:     lock addl        %eax,0(%eax)
db{0}>

db{0}> is a prompt for something, I don't know exactly what I can do with this prompt.

I'm using Vbox 2.2.2 on a windows XP pro sp2 host, the cpu have no virtualisation feature.

I tried with another computer (windows 7 beta, 2x xeon 5420 with virtualisation activated) but I have exactly the same message.

Attachments

netbsd-5.0-2009-05-04-15-35-15.log Download (43.7 KB) - added by Zplay 5 years ago.
Logfile of virtualbox
i386cd-5.0-booting-and-logging-via-host-pipe-on-vb-2.2.4.txt Download (4.4 KB) - added by przemoc 5 years ago.
Log (serial port as host pipe) of booting from i386cd-5.0.iso on VirtualBox 2.2.4
NetBSD-2009-06-09-15-49-07.log Download (32.8 KB) - added by przemoc 5 years ago.
Log (VirtualBox) of booting from i386cd-5.0.iso on VirtualBox 2.2.4
VBox.log Download (53.1 KB) - added by Mkop 4 years ago.
Trying to boot from NetBSD iso file built from source.
VBox.2.log Download (40.4 KB) - added by laurent.malvert 3 years ago.
vbox-4.0.4 with NetBSD 5.1 installation ISO

Change History

Changed 5 years ago by Zplay

Logfile of virtualbox

comment:1 Changed 5 years ago by Zplay

I would add that netbsd 5.0 boot, install and work fine with Microsoft Virtual PC 2007 (i've never used it before) on the same machine, I don't know if it can help. Maybe this prove that it's not a problem with netbsd or with the processor virtualisation feature.

comment:2 in reply to: ↑ description Changed 5 years ago by pkoistin

Replying to Zplay:

db{0}> is a prompt for something, I don't know exactly what I can do with this prompt.

Try typing "help" first, then you can type for example "trace" there:

db{0}> trace
spllower(0,0,0,0,0,0,0,0,cbd39758,0) at netbsd:spllower+0x28
wdc_drvprobe(cbd39848,0,0,0,0,cbd44d28,c045a88c,cb713a40,cb713a40,0) at netbsd:wdc_drvprove+0x27
atabus_thread(cdb28230,0,c01002cd,0,c01002cd,0,0,0,0,0) at netbsd:atabus_thread+0x72
db{0}>

So my guess is that something fails bad with harddisk detection. How big drive did you configure for NetBSD? Is in dynamic or fixed?

comment:3 Changed 5 years ago by frank

Please everyone who had the great idea to cut'n'paste logfiles into this defect: I removed these comments as they made the whole defect unreadable. Please ATTACH (there is an Attach button) the files to this defect.

Changed 5 years ago by przemoc

Log (serial port as host pipe) of booting from i386cd-5.0.iso on VirtualBox 2.2.4

Changed 5 years ago by przemoc

Log (VirtualBox) of booting from i386cd-5.0.iso on VirtualBox 2.2.4

comment:4 Changed 5 years ago by przemoc

I confirm that booting from i386cd-5.0.iso fails in every of install choices regardless of VM settings (attached or not disk, ACPI enabled/disabled, IO APIC enabled/disabled, any IDE Controller Type). Sample run dumped in my two previous attachments.

comment:5 Changed 5 years ago by Kenjiro

I am having the very same problem as the original reporter. VirtualBox 2.2.4 running on Bluewhite64 (linux x86_64). Trying to install NetBSD-5.0 (i386), giving 512MB of RAM and 5GB (dynamic) to the VM.

Hints?

comment:6 Changed 5 years ago by haad

I think that problem is in spllower which is patched during kernel boot process. I think that during hardisk detection is called first time and therefore we can see crash there. I think that problematic part of netbsd code is this [1]. This code works on real hardware ven on Vmware Fusion but it has some problems on Virtualbox.

[1] http://nxr.netbsd.org/source/xref/sys/arch/x86/x86/patch.c

comment:7 Changed 5 years ago by Kenjiro

Now we are on VirtualBox-3.0.0 and the bug remains.

Tried installing netbsd-5.0 using option 1 (regular install), 2 (no ACPI) and 3 (no ACPI and no SMP), all of them brought the same result as repported by the starting reporter.

Any improvements???

comment:8 Changed 5 years ago by Kenjiro

Well, I tried using "fixed size" hard disk (I was using Dynamic before) and the error is quite the same. So, that might be excluded from the possible causes :(

comment:9 follow-up: ↓ 10 Changed 5 years ago by gionn

I am using Virtualbox 3.0.2 on MacOsX and with VT-X enabled, netbsd installer hang before printing any sort of output. Without using VT-X (i386 netbsd), the kernel go to panic during hw detection.

comment:10 in reply to: ↑ 9 Changed 5 years ago by john.doe

Replying to gionn:

I am using Virtualbox 3.0.2 on MacOsX and with VT-X enabled, netbsd installer hang before printing any sort of output. Without using VT-X (i386 netbsd), the kernel go to panic during hw detection.

Same here with 3.0.4.

comment:11 in reply to: ↑ description Changed 5 years ago by john.doe

It seems to me that vb fails to patch `kernel_lock = 0xc0459cd0'

00:00:38.790 PATM: Failed to refresh dirty patch at c0459cd0. Disabling it.

comment:12 Changed 5 years ago by Kenjiro

I am still having the same problem as before, now running VBox 3.0.4. Still no good news? :(

comment:13 Changed 5 years ago by frank

  • Summary changed from NetBSD-5.0 doesn't work to NetBSD-5.0 doesn't work => Fixed in SVN/3.0.6

Fixed in SVN. The fix will be included in the next maintenance release.

comment:14 Changed 5 years ago by nelchael

Frank: Could you provide SVN revision number were it is fixed? SVN as exported on  http://www.virtualbox.org/svn/vbox/trunk is kind of hard to use as it hides user names (and presumably correct date of commit).

comment:15 Changed 5 years ago by sandervl73

21947, but you can just take the latest snapshot of the tree.

comment:16 Changed 5 years ago by sandervl73

That fix applies to VT-x only by the way and fixes the hang/crash when booting the NetBSD 5.0 live cd.

comment:17 Changed 5 years ago by nelchael

Thank you, I'm interested in patching 3.0.4 with only that change until 3.0.6 is available.

comment:18 Changed 5 years ago by frank

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

comment:19 Changed 4 years ago by MuffinFlavored

  • Status changed from closed to reopened
  • Resolution fixed deleted

NetBSD-5.0.1, VirtualBox 3.0.12, same exact problem

comment:20 Changed 4 years ago by frank

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

MuffinFlavored, you didn't attach a VBox.log file. Note that VT-x or AMD-V is required to get BSD work in VirtualBox. Please reopen if you are sure that VT-x or AMD-V is enabled for your host and when you attached a VBox.log file for such a session.

Changed 4 years ago by Mkop

Trying to boot from NetBSD iso file built from source.

comment:21 Changed 4 years ago by Mkop

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Using Virtualbox 3.1.4 and NetBSD 5.0 (built from source), this problem continues to exist.

Thanks for any help!

comment:22 Changed 4 years ago by frank

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

Mkop, did you read my last comment? VirtualBox requires VT-x or AMD-V for running BSD guests. It looks like your processor doesn't support VT-x so I fear it will BSD guests will not work for you.

comment:23 Changed 4 years ago by q10

  • Status changed from closed to reopened
  • Resolution worksforme deleted

@frank

I would accept this as an excuse for not being able to run NetBSD on my computer (no VT-x or AMD-V), except for the fact that on the very same computer, NetBSD can run without problem on Parallels and vmware. Thus, it should not be an excuse to allow virtualbox to continue not being able to run NetBSD, and I believe we should keep this ticket opened until it is fixed.

comment:24 Changed 4 years ago by sandervl73

  • Cc seriphyde@… removed
  • Version changed from VirtualBox 2.2.2 to VirtualBox 3.1.4
  • Summary changed from NetBSD-5.0 doesn't work => Fixed in SVN/3.0.6 to NetBSD-5.0 doesn't work without VT-x/AMD-V

q10: it's not an excuse, just a fact. We are currently not able to invest time and resources to get netbsd running without VT-x or AMD-V. External contributions are very welcome though.

We can leave the ticket open, but that's not going to change anything in the near future unfortunately.

comment:25 Changed 4 years ago by monzer4819

A workaround has been floating around the net found here:

 http://enorl.wordpress.com/2010/02/22/how-to-run-netbsd-in-virtualbox-without-vt-x/

Start VBox using this command $ VBoxSDL --norawr0 --startvm netbsd

comment:26 follow-up: ↓ 27 Changed 4 years ago by a39

A workaround has there :-)

0) Platform

  • Host CPU : Intel Pentium 4(Very Old), no Intel-VT!
  • Host OS : Windows XP SP3 + HotFix
  • VirtualBox : 3.2.4
  • Guest OS : NetBSD 5.0.2/5.1RC3/etc.

1) Create VM on VirtualBox GUI

2) Use Command

$ VBoxSDL --nopatm --startvm netbsd5.1rc3


I think PATM has bug.

And specify that the following application error occurs.

$ VBoxSDL --patm --startvm netbsd5.1rc3

And specify that kernel panic occurs.

$ VBoxSDL --startvm netbsd5.1rc3

It is defferent case.

comment:27 in reply to: ↑ 26 Changed 3 years ago by scorphus

Replying to a39:

A workaround has there :-)

[snippet]

Workaround confirmed. Thank you, a39.

My setup:

0) Platform

  • Host CPU : Intel Core2 Duo T6400, no Intel-VT!
  • Host OS : Debian SID amd64
  • VirtualBox : 3.2.10
  • Guest OS : NetBSD 5.1

1) Create VM on VirtualBox GUI

2) Use Command

$ VBoxSDL --nopatm --startvm netbsd5.1

Both installation and boot work. Using the guest system in this moment.

comment:28 follow-up: ↓ 29 Changed 3 years ago by laurent.malvert

I confirm that on 4.0.4 this problem still exists for me. And a39's workaround doesn't seem to work :(

uvm_fault(0xc0b82a00, 0, 2) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 2 eip c0100d27 cs 8 eflags 213246 cr2 0 ilevel 1
kernel: supervisor trap page fault, code=0
Stopped in pid 0.18 (system) at netbsd:Xspllower+0x17:  addb     %al,0(%eax)

trace:

Xspllower(0,0,0,0,caa332c0,c04b8ca0,0,c012002dv,caa33540,caa332c0) at netbsd:Xspllower+0x17
lwp_startup(caa33540,caa332c0,c01002,cd,0,c01002cd,0,0,0,0) at netbsd:lwp_startup+0x44

Attaching logs above.

Changed 3 years ago by laurent.malvert

vbox-4.0.4 with NetBSD 5.1 installation ISO

comment:29 in reply to: ↑ 28 Changed 3 years ago by laurent.malvert

Replying to laurent.malvert:

I confirm that on 4.0.4 this problem still exists for me. And a39's workaround doesn't seem to work :(

this does:

VBoxSDL --norawr0 --startvm NetBSD

see here:  http://mail-index.netbsd.org/netbsd-users/2010/08/14/msg006702.html

comment:30 Changed 13 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Description modified (diff)

Actually there was a related fix in VBox 4.2.0 which could be related to this bug. Please reopen if still relevant with VBox 4.2.10.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use