New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel panic on VirtualBox 4.3.8 (Mac OS X) #260

Closed
sardaukar opened this Issue Feb 27, 2014 · 29 comments

Comments

Projects
None yet
@sardaukar

sardaukar commented Feb 27, 2014

Was working fine on 4.3.6, got the prompt to update, now I get this when I start up the VM:

screenshot 2014-02-27 10 04 12

As a trial, I got rid of the existing VM and did "boot2docker init" again, and I get this output:

2014-02-27 10:07:39] Creating VM boot2docker-vm
Virtual machine 'boot2docker-vm' is created and registered.
UUID: 850f50bd-6a46-4fc8-9928-73afe052f69b
Settings file: '/Users/bruno/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox'
[2014-02-27 10:07:39] Setting VM settings
[2014-02-27 10:07:39] Setting VM networking
[2014-02-27 10:07:39] boot2docker.iso not found.
[2014-02-27 10:07:40] Could not get lastest release name! Cannot download boot2docker.iso.
[2014-02-27 10:07:40] Setting VM disks
[2014-02-27 10:07:40] Creating 40000 Meg hard drive...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 82544767-df97-4757-af9d-bdee89e0fbb1
Converting from raw image file="format-flag.txt" to file="format-flag.vmdk"...
Creating dynamic image with size 5242880 bytes (5MB)...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VMDK'. UUID: 82544767-df97-4757-af9d-bdee89e0fbb1
VBoxManage: error: Could not find file for the medium '/Users/bruno/Downloads/./boot2docker.iso' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
VBoxManage: error: Invalid UUID or filename "./boot2docker.iso"
[2014-02-27 10:07:41] Done.
[2014-02-27 10:07:41] You can now type boot2docker up and wait for the VM to start.

This creates an empty VM :( so I downloaded the 0.6 boot2docker ISO and put it on the same folder, that works - but the VM crashes as seen above.

Please help?

@YungSang

This comment has been minimized.

Show comment
Hide comment
@YungSang

YungSang Feb 27, 2014

Contributor

Do you use the latest version of boot2docker script or Go version of boot2docker-cli?
It seems old, I guess.
brew one? You may need brew upgrade.

Contributor

YungSang commented Feb 27, 2014

Do you use the latest version of boot2docker script or Go version of boot2docker-cli?
It seems old, I guess.
brew one? You may need brew upgrade.

@sardaukar

This comment has been minimized.

Show comment
Hide comment
@sardaukar

sardaukar Feb 27, 2014

I updated to the latest homebrew versions of docker and boot2docker, and that fixes downloading the ISO. But I still get a kernel panic on vbox 4.3.8

sardaukar commented Feb 27, 2014

I updated to the latest homebrew versions of docker and boot2docker, and that fixes downloading the ISO. But I still get a kernel panic on vbox 4.3.8

@YungSang

This comment has been minimized.

Show comment
Hide comment
@YungSang

YungSang Feb 27, 2014

Contributor

Hmm. The same panic?
I use it on Mac OS 10.9.2 + vbox 4.3.8 without any problem.

Could you try the latest master boot2docker from this repo?
from README

$ curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > boot2docker
$ chmod +x boot2docker
Contributor

YungSang commented Feb 27, 2014

Hmm. The same panic?
I use it on Mac OS 10.9.2 + vbox 4.3.8 without any problem.

Could you try the latest master boot2docker from this repo?
from README

$ curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > boot2docker
$ chmod +x boot2docker
@sardaukar

This comment has been minimized.

Show comment
Hide comment
@sardaukar

sardaukar Feb 27, 2014

Different panic after using your mentioned version!

screenshot 2014-02-27 13 03 43

sardaukar commented Feb 27, 2014

Different panic after using your mentioned version!

screenshot 2014-02-27 13 03 43

@YungSang

This comment has been minimized.

Show comment
Hide comment
@YungSang

YungSang Feb 27, 2014

Contributor

The brew version or the latest master?

Contributor

YungSang commented Feb 27, 2014

The brew version or the latest master?

@sardaukar

This comment has been minimized.

Show comment
Hide comment
@sardaukar

sardaukar Feb 27, 2014

The master one

sardaukar commented Feb 27, 2014

The master one

@YungSang

This comment has been minimized.

Show comment
Hide comment
@YungSang

YungSang Feb 27, 2014

Contributor

I saw the same error at mitchellh/boot2docker-vagrant-box#25 .
But It's not a memory issue, because boot2docker configures 1GB as RAM.
Hmm. Sorry it seems I can not help you anymore.

Contributor

YungSang commented Feb 27, 2014

I saw the same error at mitchellh/boot2docker-vagrant-box#25 .
But It's not a memory issue, because boot2docker configures 1GB as RAM.
Hmm. Sorry it seems I can not help you anymore.

@sardaukar

This comment has been minimized.

Show comment
Hide comment
@sardaukar

sardaukar Feb 27, 2014

Thanks for trying!

sardaukar commented Feb 27, 2014

Thanks for trying!

@pandrew

This comment has been minimized.

Show comment
Hide comment
@pandrew

pandrew Feb 28, 2014

Contributor

Go the same panic here. Using the current master boot2docker, and virtualbox 4.3.8 r92456. Ram set to 4GB

Contributor

pandrew commented Feb 28, 2014

Go the same panic here. Using the current master boot2docker, and virtualbox 4.3.8 r92456. Ram set to 4GB

@mcoms

This comment has been minimized.

Show comment
Hide comment
@mcoms

mcoms Feb 28, 2014

Contributor

Same here with v0.6.0, previously fine, now panics after upgrading VirtualBox to v4.3.8 r92456. Other VMs are unaffected.

Only thing in the VM log that looks suspicious:

00:00:00.269553 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0233
00:00:00.272133 Guest Log: BIOS: Booting from CD-ROM...
00:00:00.551048 Guest Log: BIOS: KBD: unsupported int 16h function 03
00:00:00.551366 Guest Log: BIOS: AX=0305 BX=0000 CX=0000 DX=0000 
Contributor

mcoms commented Feb 28, 2014

Same here with v0.6.0, previously fine, now panics after upgrading VirtualBox to v4.3.8 r92456. Other VMs are unaffected.

Only thing in the VM log that looks suspicious:

00:00:00.269553 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0233
00:00:00.272133 Guest Log: BIOS: Booting from CD-ROM...
00:00:00.551048 Guest Log: BIOS: KBD: unsupported int 16h function 03
00:00:00.551366 Guest Log: BIOS: AX=0305 BX=0000 CX=0000 DX=0000 
@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Feb 28, 2014

Contributor

Indeed, KBD: unsupported int 16h function 03 yields more info in Google:

Can you try playing with these settings:

  • VT-x
  • Nested paging
  • ACPI
  • IOAPIC
  • Switch IDE controller to PIIX4
Contributor

steeve commented Feb 28, 2014

Indeed, KBD: unsupported int 16h function 03 yields more info in Google:

Can you try playing with these settings:

  • VT-x
  • Nested paging
  • ACPI
  • IOAPIC
  • Switch IDE controller to PIIX4
@cathper

This comment has been minimized.

Show comment
Hide comment
@cathper

cathper Mar 1, 2014

I can confirm to have the same behavior on boot2docker.iso v.0.6.0, v.0.5.4 and v0.5.3 using VirtualBox v. 4.3.8 r92456 (latest).

  • Unchecking Enable VT-x/AMD-v makes VirtualBox err: "Invalid settings detected".
  • Unchecking nested paging: Same behavior.
  • Unchecking Enable I/O ACPI makes VirtualBox err: "Invalid settings detected".
  • Only PIIX3 and and ICH9 is available; Using ICH9 gives same behavior.

cathper commented Mar 1, 2014

I can confirm to have the same behavior on boot2docker.iso v.0.6.0, v.0.5.4 and v0.5.3 using VirtualBox v. 4.3.8 r92456 (latest).

  • Unchecking Enable VT-x/AMD-v makes VirtualBox err: "Invalid settings detected".
  • Unchecking nested paging: Same behavior.
  • Unchecking Enable I/O ACPI makes VirtualBox err: "Invalid settings detected".
  • Only PIIX3 and and ICH9 is available; Using ICH9 gives same behavior.
@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Mar 1, 2014

Contributor

Jesus Christ VirtualBox
Thanks for testing though

Contributor

steeve commented Mar 1, 2014

Jesus Christ VirtualBox
Thanks for testing though

@jmonster

This comment has been minimized.

Show comment
Hide comment
@jmonster

jmonster Mar 1, 2014

I attempted booting the .iso file with vmware fusion (getting desperate!) and it kernel panics there, too.

Kernel panic - not syncing: No working init found. Try passing init= option to kernel.

This is a fresh install of Mac OS 10.9.2

jmonster commented Mar 1, 2014

I attempted booting the .iso file with vmware fusion (getting desperate!) and it kernel panics there, too.

Kernel panic - not syncing: No working init found. Try passing init= option to kernel.

This is a fresh install of Mac OS 10.9.2

@YungSang

This comment has been minimized.

Show comment
Hide comment
@YungSang

YungSang Mar 1, 2014

Contributor

@jmonster It might be the same as #255 .

Contributor

YungSang commented Mar 1, 2014

@jmonster It might be the same as #255 .

@jmonster

This comment has been minimized.

Show comment
Hide comment
@jmonster

jmonster Mar 1, 2014

  1. sure is, thank you :)
  2. I installed virtualbox 4.3.6 instead of .3.8 and boot2docker works as you might expect.

jmonster commented Mar 1, 2014

  1. sure is, thank you :)
  2. I installed virtualbox 4.3.6 instead of .3.8 and boot2docker works as you might expect.
@cathper

This comment has been minimized.

Show comment
Hide comment
@cathper

cathper Mar 1, 2014

The config said 1 GB mem for the vm, so that doesn't confirm this to be a duplicate of #255.

VirtualBox v.4.3.6, however, does work.

cathper commented Mar 1, 2014

The config said 1 GB mem for the vm, so that doesn't confirm this to be a duplicate of #255.

VirtualBox v.4.3.6, however, does work.

@mcoms

This comment has been minimized.

Show comment
Hide comment
@mcoms

mcoms Mar 1, 2014

Contributor

Thanks @cathper, also did this testing but forgot to write it up last night! Same results, including rebuilding the machine with a PIX4 IDE controller, and trying 2GB RAM.

Glad others are finding a solution by downgrading VirtualBox — will try this tonight :)

Contributor

mcoms commented Mar 1, 2014

Thanks @cathper, also did this testing but forgot to write it up last night! Same results, including rebuilding the machine with a PIX4 IDE controller, and trying 2GB RAM.

Glad others are finding a solution by downgrading VirtualBox — will try this tonight :)

@thebyrd

This comment has been minimized.

Show comment
Hide comment
@thebyrd

thebyrd Mar 4, 2014

I ran into the same issue, downgraded to 4.3.6 and everything worked

thebyrd commented Mar 4, 2014

I ran into the same issue, downgraded to 4.3.6 and everything worked

@rhunter

This comment has been minimized.

Show comment
Hide comment
@rhunter

rhunter Mar 6, 2014

I'm seeing the same thing (general protection fault, kernel panic) on my Mac OS X host with VirtualBox 4.3.8.

VirtualBox 4.3.6 boots Boot2Docker 0.6.0 just fine.
VirtualBox 4.3.8 can boot other images without triggering panics. (I tried CentOS, Ubuntu, CoreOS, even Core and TinyCore -- they all booted OK)

Changing from a SATA controller to an IDE controller changed the stack trace a little, but PID 1 still triggered a general protection fault at the same address with the same code.

I disassembled that code and found the instruction it's crashing on: wmsr (write machine-specific register). In particular, it's trying to write to register 391h, an Intel "Performance Control" register. The exact same register values discussed in a KVM question (which has a very nice discussion).

I'm no expert kernel hacker, but my best guess is that this code comes from perf_event_intel_uncore.c. I'm not sure why this seems specific to VirtualBox 4.3.8 and Boot2Docker. Is it host architecture perhaps? I'm on a Core i7.

The VirtualBox changelog between 4.3.6 and 4.3.8 mentions "more work on improving the emulation of certain MSR registers" and "fix for recent Linux kernels with software virtualization", which might be a good place to look next.

rhunter commented Mar 6, 2014

I'm seeing the same thing (general protection fault, kernel panic) on my Mac OS X host with VirtualBox 4.3.8.

VirtualBox 4.3.6 boots Boot2Docker 0.6.0 just fine.
VirtualBox 4.3.8 can boot other images without triggering panics. (I tried CentOS, Ubuntu, CoreOS, even Core and TinyCore -- they all booted OK)

Changing from a SATA controller to an IDE controller changed the stack trace a little, but PID 1 still triggered a general protection fault at the same address with the same code.

I disassembled that code and found the instruction it's crashing on: wmsr (write machine-specific register). In particular, it's trying to write to register 391h, an Intel "Performance Control" register. The exact same register values discussed in a KVM question (which has a very nice discussion).

I'm no expert kernel hacker, but my best guess is that this code comes from perf_event_intel_uncore.c. I'm not sure why this seems specific to VirtualBox 4.3.8 and Boot2Docker. Is it host architecture perhaps? I'm on a Core i7.

The VirtualBox changelog between 4.3.6 and 4.3.8 mentions "more work on improving the emulation of certain MSR registers" and "fix for recent Linux kernels with software virtualization", which might be a good place to look next.

@rhunter

This comment has been minimized.

Show comment
Hide comment
@rhunter

rhunter Mar 6, 2014

I'm still investigating, but it looks like the relevant code might be specific to Intel "Sandy Bridge" and "Ivy Bridge" CPUs, and only runs when not under a hypervisor.

rhunter commented Mar 6, 2014

I'm still investigating, but it looks like the relevant code might be specific to Intel "Sandy Bridge" and "Ivy Bridge" CPUs, and only runs when not under a hypervisor.

@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Mar 7, 2014

Contributor

#260 (comment) seems to suggest we're running a Kernel that's too recent?

Contributor

steeve commented Mar 7, 2014

#260 (comment) seems to suggest we're running a Kernel that's too recent?

@hackable

This comment has been minimized.

Show comment
Hide comment
@hackable

hackable Mar 8, 2014

Contributor

Here's a temporary fix for this issue.

hackable@e7a03b2

Contributor

hackable commented Mar 8, 2014

Here's a temporary fix for this issue.

hackable@e7a03b2

@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Mar 8, 2014

Contributor

For everyone, you can try the fix like this:

$ VBoxManage setextradata boot2docker-vm VBoxInternal/CPUM/EnableHVP 1
Contributor

steeve commented Mar 8, 2014

For everyone, you can try the fix like this:

$ VBoxManage setextradata boot2docker-vm VBoxInternal/CPUM/EnableHVP 1
@mcoms

This comment has been minimized.

Show comment
Hide comment
@mcoms

mcoms Mar 8, 2014

Contributor

Perfect, thanks @steeve :)

Contributor

mcoms commented Mar 8, 2014

Perfect, thanks @steeve :)

@smeijer

This comment has been minimized.

Show comment
Hide comment
@smeijer

smeijer Mar 14, 2014

Thanks @steeve, that fix actually works!

start -> run -> cmd
%programfiles%\oracle\VirtualBox>vboxmanage setextradata boot2docker VBoxInternal/CPUM/EnableHVP 1

smeijer commented Mar 14, 2014

Thanks @steeve, that fix actually works!

start -> run -> cmd
%programfiles%\oracle\VirtualBox>vboxmanage setextradata boot2docker VBoxInternal/CPUM/EnableHVP 1
@sardaukar

This comment has been minimized.

Show comment
Hide comment
@sardaukar

sardaukar Mar 28, 2014

Fixed in VirtualBox 4.3.10 r93012 (for MacOS X)

sardaukar commented Mar 28, 2014

Fixed in VirtualBox 4.3.10 r93012 (for MacOS X)

@sardaukar sardaukar closed this Mar 28, 2014

@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Mar 28, 2014

Contributor

Awesome. I'll do a release of the installer too today.

Contributor

steeve commented Mar 28, 2014

Awesome. I'll do a release of the installer too today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment