Re: Panic when loading vboxdrv module

2016-07-26 Thread Jung-uk Kim
On 07/25/16 03:27 PM, Jung-uk Kim wrote:
> On 07/25/16 03:13 PM, Randy Westlund wrote:
>> I'm running 12-CURRENT r303286 and virtualbox-ose-kmod-5.0.26.  I just
>> rebuilt the module, so I know they're in sync.  When I boot with
>> vboxdrv_load="YES" in /etc/loader.conf, I get this panic during boot:
>>
>>> panic: mutex Giant owned at /usr/src/sys/kern/kern_sync.c:406
>>> cpuid = 0
>>> KDB: stack backtrace:
>>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b
>>> vpanic() at vpanic+0x182
>>> panic() at panic+0x43
>>> __mtx_assert() at __mtx_assert+0xd1
>>> mi_switch() at mi_switch+0x7b
>>> sleepq_switch() at sleepq_switch+0x7e
>>> sleepq_timedwait() at sleepq_timedwait+0x43
>>> rtR0SemEventWait() at rtR0SemEventWait+0x267
>>> supdrvGipCreate() at supdrvGipCreate+0x7f6
>>> supdrvInitDexExt() at supdrvInitDexExt+0x18f
>>> VBoxDrvFreeBSDModuleEvent() at VBoxDrvFreeBSDModuleEvent+0x49
>>> module_register_init() at module_register_init+0xb0
>>> mi_startup() at mi_startup+0x118
>>> btext() at btext+0x2c
>>> KDB: enter: panic
>>> [ thread pid 0 tid 10 ]
>>> Stopped at  kdb_enter+0x3b: movq$0,kdb_why
>>
>> I'm not sure whether this is a problem with the base system or the port,
>> but this happens every time I boot with the module enabled.
> 
> emulators/virtualbox-ose-kmod is causing the trouble and this problem is
> well known.  To work around it, remove WITNESS option from kernel
> configuration for now.

Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
understand you have a panic with aio(4) but that's a separate issue.

Jung-uk Kim
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Panic when loading vboxdrv module

2016-07-26 Thread Randy Westlund
On Tue, Jul 26, 2016 at 09:22:47AM -0700, John Baldwin wrote:
> On Monday, July 25, 2016 11:08:15 PM Randy Westlund wrote:
> > On Mon, Jul 25, 2016 at 07:43:32PM -0400, Jung-uk Kim wrote:
> > > Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
> > > understand you have a panic with aio(4) but that's a separate issue.
> > > 
> > > Jung-uk Kim
> > 
> > Should I create a new PR for virtualbox and aio, or is this already
> > known?
> 
> Please.  cc me on it since I've hacked on aio in 11/HEAD.
> 
> -- 
> John Baldwin

Done. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211390


signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-26 Thread John Baldwin
On Monday, July 25, 2016 11:08:15 PM Randy Westlund wrote:
> On Mon, Jul 25, 2016 at 07:43:32PM -0400, Jung-uk Kim wrote:
> > Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
> > understand you have a panic with aio(4) but that's a separate issue.
> > 
> > Jung-uk Kim
> 
> Should I create a new PR for virtualbox and aio, or is this already
> known?

Please.  cc me on it since I've hacked on aio in 11/HEAD.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Panic when loading vboxdrv module

2016-07-25 Thread Randy Westlund
On Mon, Jul 25, 2016 at 07:43:32PM -0400, Jung-uk Kim wrote:
> Oops, I meant INVARIANTS.  Anyway, it should be fixed in r419083.  I
> understand you have a panic with aio(4) but that's a separate issue.
> 
> Jung-uk Kim

Should I create a new PR for virtualbox and aio, or is this already
known?


signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-25 Thread Randy Westlund
On Mon, Jul 25, 2016 at 04:09:58PM -0400, Jung-uk Kim wrote:
> If you feel adventurous, please drop the attached patch in
> *emulators/virtualbox-ose/files* directory, and rebuild
> *emulators/virtualbox-ose-kmod*.
> 
> JK
> 
> * Note the patch directory is emulators/virtualbox-ose/files, not
> emulators/virtualbox-ose-kmod/files.

> --- src/VBox/HostDrivers/Support/SUPDrvInternal.h.orig2016-07-18 
> 11:56:19 UTC
> +++ src/VBox/HostDrivers/Support/SUPDrvInternal.h
> @@ -235,7 +235,7 @@
>  # define SUPDRV_WITHOUT_MSR_PROBER
>  #endif
>  
> -#if 1
> +#if 0
>  /** @def SUPDRV_USE_TSC_DELTA_THREAD
>   * Use a dedicated kernel thread to service TSC-delta measurement requests.
>   * @todo Test on servers with many CPUs and sockets. */

With the patch, vboxdrv loads successfully.  But when I start a VM, I
get the following panic (after rebuilding virtualbox-ose as well):

> vboxdrv: 82973020 VMMR0.r0
> vboxdrv: 82a92020 VBoxDDR0.r0
> vboxdrv: 82aaf020 VBoxDD2R0.r0
> panic: _mtx_lock_sleep: recursed on non-recursive mutex aiomtx @ 
> /usr/src/sys/kern/vfs_aio.c:996
> 
> cpuid = 1
> KBD: stack backtrace:
> db_trace_wrapper() at db_trace_wrapper+0x2b
> vpanic() at vpanic+0x182
> kassert_panic() at kassert_panic+0x126
> __mtx_lock_sleep() at __mtx_lock_sleep+0x228
> __mtx_lock_flags() at __mtx_lock_flags+0x10d
> aio_queue() at aio_queue+0x9d6
> amd64_syscall() at amd64_syscall+0x2db
> Xfast_syscall() at Xfast_syscall+0xfb
> --- syscall (465, FreeBSD ELF64, sys_aio_fsync), rip = 0x80119fa0a, rsp = 
> 0x7fffdf2abc98, rbp = 0x7fffdf2abcd0 ---
> KDB: enter: panic
> [ thread pid 14588 tid 101813 ]
> Stopped at  kdb_enter+0x3b: movq$0,kdb_why





signature.asc
Description: PGP signature


Re: Panic when loading vboxdrv module

2016-07-25 Thread Jung-uk Kim
On 07/25/16 03:13 PM, Randy Westlund wrote:
> I'm running 12-CURRENT r303286 and virtualbox-ose-kmod-5.0.26.  I just
> rebuilt the module, so I know they're in sync.  When I boot with
> vboxdrv_load="YES" in /etc/loader.conf, I get this panic during boot:
> 
>> panic: mutex Giant owned at /usr/src/sys/kern/kern_sync.c:406
>> cpuid = 0
>> KDB: stack backtrace:
>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b
>> vpanic() at vpanic+0x182
>> panic() at panic+0x43
>> __mtx_assert() at __mtx_assert+0xd1
>> mi_switch() at mi_switch+0x7b
>> sleepq_switch() at sleepq_switch+0x7e
>> sleepq_timedwait() at sleepq_timedwait+0x43
>> rtR0SemEventWait() at rtR0SemEventWait+0x267
>> supdrvGipCreate() at supdrvGipCreate+0x7f6
>> supdrvInitDexExt() at supdrvInitDexExt+0x18f
>> VBoxDrvFreeBSDModuleEvent() at VBoxDrvFreeBSDModuleEvent+0x49
>> module_register_init() at module_register_init+0xb0
>> mi_startup() at mi_startup+0x118
>> btext() at btext+0x2c
>> KDB: enter: panic
>> [ thread pid 0 tid 10 ]
>> Stopped at  kdb_enter+0x3b: movq$0,kdb_why
> 
> I'm not sure whether this is a problem with the base system or the port,
> but this happens every time I boot with the module enabled.

emulators/virtualbox-ose-kmod is causing the trouble and this problem is
well known.  To work around it, remove WITNESS option from kernel
configuration for now.

Jung-uk Kim



signature.asc
Description: OpenPGP digital signature