# VirtualBox Guest Gentoo Kernel Panic

## richard.scott

Hi,

I have a gentoo box running as a guest in a 64bit Windows7 / Virtual Box system and I keep getting this kernel panic:

```
Dec 21 00:49:07 [kernel] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010

Dec 21 00:49:07 [kernel] IP: [<ffffffff8023255d>] dup_mm+0x20d/0x3f0

Dec 21 00:49:07 [kernel] PGD 0

Dec 21 00:49:07 [kernel] CPU 1

Dec 21 00:49:07 [kernel] Modules linked in: ipv6 ppdev i2c_piix4 parport_pc battery ac thermal button processor thermal_sys nfs lockd sunrpc raid10 raid456 async_memcpy async_xor xor async_tx raid1 raid0 dm_bbr dm_snapshot dm_crypt dm_mirror dm_region_hash dm_log dm_mod scsi_wait_scan sbp2 ohci1394 ieee1394 sl811_hcd usbhid ohci_hcd uhci_hcd usb_storage ehci_hcd usbcore aic94xx libsas lpfc qla2xxx megaraid_sas megaraid_mbox megaraid_mm megaraid aacraid sx8 DAC960 cciss 3w_9xxx 3w_xxxx mptsas scsi_transport_sas mptfc scsi_transport_fc scsi_tgt mptspi mptscsih mptbase atp870u dc395x qla1280 imm parport dmx3191d sym53c8xx gdth advansys initio BusLogic arcmsr aic7xxx aic79xx scsi_transport_spi sg pata_pcmcia pcmcia pcmcia_core

Dec 21 00:49:07 [kernel] Pid: 5991, comm: sh Not tainted 2.6.29-hardened #1 VirtualBox

Dec 21 00:49:07 [kernel] RIP: 0010:[<ffffffff8023255d>]  [<ffffffff8023255d>] dup_mm+0x20d/0x3f0

Dec 21 00:49:07 [kernel] RSP: 0018:ffff8800338cfdb0  EFLAGS: 00010282

Dec 21 00:49:07 [kernel] RAX: 0000000000000000 RBX: ffff88003fbff6b8 RCX: 0000000000000000

Dec 21 00:49:07 [kernel] RDX: ffff880039c57d80 RSI: ffff8800339de6b8 RDI: ffff88003fbff6b8

Dec 21 00:49:07 [kernel] RBP: ffff8800338cfe10 R08: ffff88003383f9a8 R09: 000000000000000e

Dec 21 00:49:07 [kernel] R10: 0000000000000000 R11: 00000000000000ae R12: ffff88003fb86f40

Dec 21 00:49:07 [kernel] R13: ffff88003eb53140 R14: ffff8800339de608 R15: ffff88003dd56ea8

Dec 21 00:49:07 [kernel] FS:  00002acd115656f0(0000) GS:ffff88003f878a40(0000) knlGS:0000000000000000

Dec 21 00:49:07 [kernel] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b

Dec 21 00:49:07 [kernel] CR2: 0000000000000010 CR3: 0000000039e48000 CR4: 00000000000006e0

Dec 21 00:49:07 [kernel] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000

Dec 21 00:49:07 [kernel] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400

Dec 21 00:49:07 [kernel] Process sh (pid: 5991, threadinfo ffff8800338ce000, task ffff88003f9d6740)

Dec 21 00:49:07 [kernel]  ffff8800338cfe10 ffff88003dd556e8 ffff88003dabae78 ffff88003dabae80

Dec 21 00:49:07 [kernel] RIP  [<ffffffff8023255d>] dup_mm+0x20d/0x3f0

Dec 21 00:49:07 [kernel]  RSP <ffff8800338cfdb0>

Dec 21 00:49:07 [kernel] ---[ end trace 6f6f92d43f659d9f ]---
```

Anyone know where I should start to try and find the cause?

Thanks,

Rich

----------

## gentoo_ram

That's a lot of modules in that list.  Way more than what hardware is being emulated.  Maybe that has something to do with it.  I have 32-bit and 64-bit Gentoo running under VirtualBox guests under Windows and Linux with no issues.

Maybe try paring back the drivers in the kernel.  Here are the modules I have loaded on my virtual machine on 2.6.32-gentoo:

```
Module                  Size  Used by

vboxvfs                27772  0 

ipv6                  252701  16 

nfs                   272947  2 

lockd                  64023  1 nfs

nfs_acl                 2215  1 nfs

auth_rpcgss            37595  1 nfs

sunrpc                178522  13 nfs,lockd,nfs_acl,auth_rpcgss

dm_mod                 58632  0 

virtio_net             11571  0 

virtio_pci              5735  0 

virtio_ring             3410  1 virtio_pci

ohci_hcd               21556  0 

snd_intel8x0           26370  0 

snd_ac97_codec        107072  1 snd_intel8x0

ac97_bus                1030  1 snd_ac97_codec

snd_pcm                68008  2 snd_intel8x0,snd_ac97_codec

snd_timer              17046  1 snd_pcm

ehci_hcd               34569  0 

floppy                 54075  0 

usbcore               128735  3 ohci_hcd,ehci_hcd

pcnet32                30337  0 

sr_mod                 13402  0 

sg                     23669  0 

snd                    49059  4 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               5071  1 snd

cdrom                  33831  1 sr_mod

snd_page_alloc          6689  2 snd_intel8x0,snd_pcm

psmouse                39045  0 

vboxguest             120318  2 vboxvfs

virtio                  3381  2 virtio_net,virtio_pci

mii                     3522  1 pcnet32

evdev                   8328  3 
```

I have AHCI compiled in as the boot drive is emulated as SATA.  The virtio stuff is only for 2.6.32 and VB 3.1.0 or 3.1.2.  If you have older releases, the virtio stuff isn't available.

----------

