Bug 219276 - Trying to start a vm from VirtualBox results in a panic
Summary: Trying to start a vm from VirtualBox results in a panic
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: vbox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-14 14:16 UTC by Sevan Janiyan
Modified: 2017-07-16 02:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sevan Janiyan freebsd_committer 2017-05-14 14:16:04 UTC
Running virtualbox-ose 5.1.22 installing from binary packages on
FreeBSD 11.0-STABLE #0 r318134: Wed May 10 15:16:21 UTC 2017     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Attempting to start a vm causes the system to panic & reboot. vboxdrv.ko is loaded and the process is reproducible if further information is required.

#0  doadump (textdump=<value optimized out>) at pcpu.h:222
222 pcpu.h: No such file or directory.
 in pcpu.h

(kgdb) bt
#0  doadump (textdump=<value optimized out>) at pcpu.h:222
#1  0xffffffff80a66741 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a66c00 in vpanic (fmt=<value optimized out>, ap=<value optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:759
#3  0xffffffff80a66a33 in panic (fmt=<value optimized out>) at /usr/src/sys/kern/kern_shutdown.c:690
#4  0xffffffff80ed97f2 in trap_fatal (frame=0xfffffe02325434a0, eva=289)
    at /usr/src/sys/amd64/amd64/trap.c:801
#5  0xffffffff80ed9849 in trap_pfault (frame=0xfffffe02325434a0, usermode=0) at pcpu.h:222
#6  0xffffffff80ed9086 in trap (frame=0xfffffe02325434a0) at /usr/src/sys/amd64/amd64/trap.c:421
#7  0xffffffff80ebdf41 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:236
#8  0xffffffff824a7b20 in rtR0MemObjNativeMapUser () from /boot/modules/vboxdrv.ko
#9  0xffffffff824a68e5 in RTR0MemObjMapUserTag () from /boot/modules/vboxdrv.ko
#10 0xffffffff824866d1 in SUPR0GipMap () from /boot/modules/vboxdrv.ko
#11 0xffffffff82481d2d in supdrvIOCtlInnerUnrestricted () from /boot/modules/vboxdrv.ko
#12 0xffffffff8249016e in VBoxDrvFreeBSDIOCtl () from /boot/modules/vboxdrv.ko
#13 0xffffffff80936398 in devfs_ioctl_f (fp=0xfffff80006f7ea80, com=1, data=0x1, cred=0x1,
    td=0xfffff80006976000) at /usr/src/sys/fs/devfs/devfs_vnops.c:791
#14 0xffffffff80ac43a5 in kern_ioctl (td=<value optimized out>, fd=11, com=<value optimized out>,
    data=<value optimized out>) at file.h:323
#15 0xffffffff80ac40df in sys_ioctl (td=<value optimized out>, uap=0xfffffe0232543a30)
    at /usr/src/sys/kern/sys_generic.c:745
#16 0xffffffff80eda354 in amd64_syscall (td=0xfffff80006976000, traced=0) at subr_syscall.c:135
#17 0xffffffff80ebe22b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:396
#18 0x00000008012ba5ba in ?? ()
Comment 1 Christian Sturm 2017-06-11 11:23:09 UTC
I am experiencing the same problem when starting up vagrant on stable. Kernel is on on r319800.

#0  doadump (textdump=<value optimized out>) at pcpu.h:222
        in pcpu.h
(kgdb) #0  doadump (textdump=<value optimized out>) at pcpu.h:222
#1  0xffffffff80a4a721 in kern_reboot (howto=260)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a4abe0 in vpanic (fmt=<value optimized out>, 
    ap=<value optimized out>)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:759
#3  0xffffffff80a4aa13 in panic (fmt=<value optimized out>)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:690
#4  0xffffffff80edc552 in trap_fatal (frame=0xfffffe045d2184b0, eva=288)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/trap.c:801
#5  0xffffffff80edc5a9 in trap_pfault (frame=0xfffffe045d2184b0, usermode=0)
    at pcpu.h:222
#6  0xffffffff80edbde6 in trap (frame=0xfffffe045d2184b0)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/trap.c:421
#7  0xffffffff80ec1fe1 in calltrap ()
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/exception.S:236
#8  0xffffffff8235f7dc in rtR0MemObjNativeMapUser ()
   from /boot/modules/vboxdrv.ko
#9  0xffffffff8235e50c in RTR0MemObjMapUserTag ()
   from /boot/modules/vboxdrv.ko
#10 0xffffffff8233e63d in SUPR0GipMap () from /boot/modules/vboxdrv.ko
#11 0xffffffff82339a6e in supdrvIOCtlInnerUnrestricted ()
   from /boot/modules/vboxdrv.ko
#12 0xffffffff82347d63 in VBoxDrvFreeBSDIOCtl () from /boot/modules/vboxdrv.ko
#13 0xffffffff809166f8 in devfs_ioctl_f (fp=0xfffff8019df06000, com=0, 
    data=0x1, cred=0x0, td=0xfffff8019dd3c560)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/fs/devfs/devfs_vnops.c:791
#14 0xffffffff80aa8bb5 in kern_ioctl (td=<value optimized out>, fd=7, 
    com=<value optimized out>, data=<value optimized out>) at file.h:323
#15 0xffffffff80aa88ef in sys_ioctl (td=<value optimized out>, 
    uap=0xfffffe045d218a30)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/sys_generic.c:745
#16 0xffffffff80edd0b4 in amd64_syscall (td=0xfffff8019dd3c560, traced=0)
    at subr_syscall.c:135
#17 0xffffffff80ec22cb in Xfast_syscall ()
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/exception.S:396
#18 0x00000008012c5bfa in ?? ()
Comment 2 Christian Sturm 2017-06-11 12:09:33 UTC
To give a bit more information:

* Rebuilding the kernel module/port does not help
* This is independent of having the VIMAGE option enabled

Below there is a more complete output. The custom kernel just has VIMAGE enabled enabled, but is otherwise really close to GENERIC.

This was created with the DEBUG option on emulators/virtualbox-ose-kmod turned on.

Dump header from device: /dev/da0s1b
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 1031561216
  Blocksize: 512
  Dumptime: Sun Jun 11 13:43:20 2017
  Hostname: cabal.local
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 11.1-BETA1 #32 r319800: Sat Jun 10 22:31:31 CEST 2017
    reezer@cabal.local:/usr/obj/usr/local/poudriere/jails/11amd64-stable/usr/src/sys/CABALKERNEL
  Panic String: page fault
  Dump Parity: 2316114280
  Bounds: 7
  Dump Status: good

Backtrace:
Reading symbols from /boot/kernel/coretemp.ko...Reading symbols from /usr/lib/debug//boot/kernel/coretemp.ko.debug...done.
done.
Loaded symbols for /boot/kernel/coretemp.ko
Reading symbols from /boot/kernel/cuse.ko...Reading symbols from /usr/lib/debug//boot/kernel/cuse.ko.debug...done.
done.
Loaded symbols for /boot/kernel/cuse.ko
Reading symbols from /boot/kernel/aesni.ko...Reading symbols from /usr/lib/debug//boot/kernel/aesni.ko.debug...done.
done.
Loaded symbols for /boot/kernel/aesni.ko
Reading symbols from /boot/kernel/tmpfs.ko...Reading symbols from /usr/lib/debug//boot/kernel/tmpfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/tmpfs.ko
Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from /usr/lib/debug//boot/kernel/linprocfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/linprocfs.ko
Reading symbols from /boot/kernel/linux_common.ko...Reading symbols from /usr/lib/debug//boot/kernel/linux_common.ko.debug...done.
done.
Loaded symbols for /boot/kernel/linux_common.ko
Reading symbols from /boot/kernel/i915kms.ko...Reading symbols from /usr/lib/debug//boot/kernel/i915kms.ko.debug...done.
done.
Loaded symbols for /boot/kernel/i915kms.ko
Reading symbols from /boot/kernel/drm2.ko...Reading symbols from /usr/lib/debug//boot/kernel/drm2.ko.debug...done.
done.
Loaded symbols for /boot/kernel/drm2.ko
Reading symbols from /boot/kernel/iicbus.ko...Reading symbols from /usr/lib/debug//boot/kernel/iicbus.ko.debug...done.
done.
Loaded symbols for /boot/kernel/iicbus.ko
Reading symbols from /boot/kernel/iic.ko...Reading symbols from /usr/lib/debug//boot/kernel/iic.ko.debug...done.
done.
Loaded symbols for /boot/kernel/iic.ko
Reading symbols from /boot/kernel/iicbb.ko...Reading symbols from /usr/lib/debug//boot/kernel/iicbb.ko.debug...done.
done.
Loaded symbols for /boot/kernel/iicbb.ko
Reading symbols from /boot/kernel/acpi_video.ko...Reading symbols from /usr/lib/debug//boot/kernel/acpi_video.ko.debug...done.
done.
Loaded symbols for /boot/kernel/acpi_video.ko
Reading symbols from /boot/modules/vboxdrv.ko.debug...done.
Loaded symbols for /boot/modules/vboxdrv.ko.debug
Reading symbols from /boot/kernel/linux.ko...Reading symbols from /usr/lib/debug//boot/kernel/linux.ko.debug...done.
done.
Loaded symbols for /boot/kernel/linux.ko
Reading symbols from /boot/kernel/linux64.ko...Reading symbols from /usr/lib/debug//boot/kernel/linux64.ko.debug...done.
done.
Loaded symbols for /boot/kernel/linux64.ko
Reading symbols from /boot/kernel/ums.ko...Reading symbols from /usr/lib/debug//boot/kernel/ums.ko.debug...done.
done.
Loaded symbols for /boot/kernel/ums.ko
Reading symbols from /boot/kernel/ng_ubt.ko...Reading symbols from /usr/lib/debug//boot/kernel/ng_ubt.ko.debug...done.
done.
Loaded symbols for /boot/kernel/ng_ubt.ko
Reading symbols from /boot/kernel/netgraph.ko...Reading symbols from /usr/lib/debug//boot/kernel/netgraph.ko.debug...done.
done.
Loaded symbols for /boot/kernel/netgraph.ko
Reading symbols from /boot/kernel/ng_hci.ko...Reading symbols from /usr/lib/debug//boot/kernel/ng_hci.ko.debug...done.
done.
Loaded symbols for /boot/kernel/ng_hci.ko
Reading symbols from /boot/kernel/ng_bluetooth.ko...Reading symbols from /usr/lib/debug//boot/kernel/ng_bluetooth.ko.debug...done.
done.
Loaded symbols for /boot/kernel/ng_bluetooth.ko
Reading symbols from /boot/kernel/fdescfs.ko...Reading symbols from /usr/lib/debug//boot/kernel/fdescfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/fdescfs.ko
Reading symbols from /boot/kernel/cpuctl.ko...Reading symbols from /usr/lib/debug//boot/kernel/cpuctl.ko.debug...done.
done.
Loaded symbols for /boot/kernel/cpuctl.ko
#0  doadump (textdump=<value optimized out>) at pcpu.h:222
	in pcpu.h
(kgdb) #0  doadump (textdump=<value optimized out>) at pcpu.h:222
#1  0xffffffff80a4a721 in kern_reboot (howto=260)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:366
#2  0xffffffff80a4abe0 in vpanic (fmt=<value optimized out>, 
    ap=<value optimized out>)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:759
#3  0xffffffff80a4aa13 in panic (fmt=<value optimized out>)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/kern_shutdown.c:690
#4  0xffffffff80edc552 in trap_fatal (frame=0xfffffe045ccaa4b0, eva=288)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/trap.c:801
#5  0xffffffff80edc5a9 in trap_pfault (frame=0xfffffe045ccaa4b0, usermode=0)
    at pcpu.h:222
#6  0xffffffff80edbde6 in trap (frame=0xfffffe045ccaa4b0)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/trap.c:421
#7  0xffffffff80ec1fe1 in calltrap ()
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/exception.S:236
#8  0xffffffff8235f7dc in RTStrFormatV (pfnOutput=0x1, 
    pvArgOutput=<value optimized out>, pfnFormat=<value optimized out>, 
    pvArgFormat=0x1b00130000000c, pszFormat=0xffffffff8235f7dc "L\213  \001", 
    InArgs=<value optimized out>)
    at /wrkdirs/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-5.1.22/out/freebsd.amd64/debug/bin/src/vboxdrv/common/string/strformat.c:807
#9  0xffffffff8235e50c in RTThreadIsMain (hThread=<value optimized out>)
    at /wrkdirs/usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-5.1.22/out/freebsd.amd64/debug/bin/src/vboxdrv/common/misc/thread.c:1008
#10 0xffffffff8233e63d in SUPR0PageProtect (pSession=0xffffffffffffffff, 
    pvR3=18446735278049392744, pvR0=0xfffffe045ccaa888, offSub=2161459539, 
    cbSub=3326581908, fProt=1) at SUPDrv.c:3578
#11 0xffffffff82339a6e in supdrvIOCtlInnerUnrestricted (
    uIOCtl=18446603336221196287, pDevExt=0xffffffff, 
    pSession=0xfffffe045ccaa870, pReqHdr=0xfffff80019ccf810) at SUPDrv.c:2235
#12 0xffffffff82347d63 in supdrvTscDeltaVerify () at SUPDrvGip.c:3549
#13 0xffffffff809166f8 in devfs_ioctl_f (fp=0xfffff8003271c8c0, 
    com=3224393364, data=0xfffffe045ccaa870, cred=0xfffff801097c9100, 
    td=0xfffff80019095000)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/fs/devfs/devfs_vnops.c:791
#14 0xffffffff80aa8bb5 in kern_ioctl (td=<value optimized out>, fd=7, 
    com=<value optimized out>, data=<value optimized out>) at file.h:323
#15 0xffffffff80aa88ef in sys_ioctl (td=<value optimized out>, 
    uap=0xfffffe045ccaaa30)
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/kern/sys_generic.c:745
#16 0xffffffff80edd0b4 in amd64_syscall (td=0xfffff80019095000, traced=0)
    at subr_syscall.c:135
#17 0xffffffff80ec22cb in Xfast_syscall ()
    at /usr/local/poudriere/jails/11amd64-stable/usr/src/sys/amd64/amd64/exception.S:396
#18 0x00000008012c5bfa in ?? ()
Current language:  auto; currently minimal
(kgdb)
Comment 3 Christian Sturm 2017-06-27 19:36:10 UTC
Can you still reproduce this with an up to date system? I can't anymore.

Running 11.1-BETA3
virtualbox-ose-5.1.22_1
virtualbox-ose-kmod-5.1.22
Comment 4 Sevan Janiyan freebsd_committer 2017-07-13 18:49:20 UTC
(In reply to Christian Sturm from comment #3)
I've just moved to 11.1-RC2 & unable to start virtual machines so can't confirm if there is regression into a new problem but for now machine isn't panicking. Instead I receive:

RTR3InitEx failed with rc=-8 (rc=-8)

Please try reinstalling VirtualBox.

where: supR3HardenedMainInitRuntime what: 4 VERR_NO_MEMORY (-8) - Memory allocation failed.
Comment 5 Sevan Janiyan freebsd_committer 2017-07-16 02:25:05 UTC
With virtualbox-ose-5.1.22_2 on FreeBSD 11.1-RC3 I can start a vm without crashing my machine.