Re: [patch] VirtualBox-4.0.14 + FreeBSD/CURRENT + VIMAGE: crash on vm shutdown

2012-03-19 Thread Petro Rossini
On Tue, Mar 20, 2012 at 5:48 AM, Mikolaj Golub  wrote:
> Hi,
>
> Here is a patch that fixes the issue I have been observing recently: running
> on VIMAGE enabled kernel VirtualBox causes the kernel crash when vm is powered
> off:
> ..

Hi Mikolaj and others,

is it considered "safe" to run VIMAGE+VirtualBox on -STABLE?

I have one VirtualBox in my otherwise jail based infrastructure (to
run a Zimbra mail server under Ubuntu), and would like to move this
machine and the "standby" forward from FreeBSD-8 to -9, as well as
start to use VIMAGE here as I do on the other boxes.

Regards
Peter
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[patch] VirtualBox-4.0.14 + FreeBSD/CURRENT + VIMAGE: crash on vm shutdown

2012-03-19 Thread Mikolaj Golub
Hi,

Here is a patch that fixes the issue I have been observing recently: running
on VIMAGE enabled kernel VirtualBox causes the kernel crash when vm is powered
off:

ng_unref_node(8b156880,0,1,101,0,...) at ng_unref_node+0x74
ng_snd_item(8d060d40,0,8b0e18f0,0,0,...) at ng_snd_item+0x2a5
ng_send_fn(8b156880,0,8b0e18f0,0,0,...) at ng_send_fn+0x35
ng_rmnode_self(8b156880,89f840e0,8b0dbcc0,deec88cc,8b0d9ffa,...) at 
ng_rmnode_self+0x4a
vboxNetFltOsDeleteInstance(89f84010,89f84014,89f84010,deec88ec,8b0da0f4,...) at 
vboxNetFltOsDeleteInstance+0x63
vboxNetFltRelease(89f84010,0,0,0,89f84014,...) at vboxNetFltRelease+0x6a
vboxNetFltPortDisconnectAndRelease(89f84014,2710,87748bd4,87748bd4,deec8930,...)
 at vboxNetFltPortDisconnectAndRelease+0x64
_end(8b15ed10,89f84210,877456b0,0,deec8990,...) at 0x8cffe057
SUPR0ObjRelease(8b15ed10,89f4b810,deec89c8,deec89a0,0,...) at 
SUPR0ObjRelease+0x133
_end(8b15eb90,898a0e10,877456b0,0,89f4b810,...) at 0x8cffe4bb
supdrvCleanupSession(8162bac0,89f4b810,89f4b810,deec89f4,8160e52f,...) at 
supdrvCleanupSession+0xef
supdrvCloseSession(8162bac0,89f4b810,8ceecb18,deec8a18,8ceecaa0,...) at 
supdrvCloseSession+0x19
VBoxDrvFreeBSDClose(89ee6c00,3,2000,8adcc5c0,8adcc5c0,...) at 
VBoxDrvFreeBSDClose+0x2f
devfs_close(deec8a78,8ceecaa0,80400,80f8caac,133,...) at devfs_close+0x2ca
VOP_CLOSE_APV(81095960,deec8a78,80f8caac,133,2,...) at VOP_CLOSE_APV+0xda
vn_close(8ceecaa0,3,8b24b380,8adcc5c0,80f792e0,...) at vn_close+0x190
vn_closefile(89f8cd58,8adcc5c0,0,89f8cd58,0,...) at vn_closefile+0xe4
devfs_close_f(89f8cd58,8adcc5c0,0,0,89f8cd58,...) at devfs_close_f+0x35
_fdrop(89f8cd58,8adcc5c0,0,deec8b80,0,8adcc670,81273398,810a7620,89e50c2c,79d,80f7401d,deec8b90,80a2f81e,89e50c2c,8,80f7401d,79d,0,89f8cd58)
 at _fdrop+0x43
closef(89f8cd58,8adcc5c0,79d,79a,8adcc670,...) at closef+0x2b0
fdfree(8adcc5c0,0,80f74dc6,107,deec8c18,...) at fdfree+0x3ea
exit1(8adcc5c0,0,deec8d1c,80db7aee,8adcc5c0,...) at exit1+0x57a
sys_sys_exit(8adcc5c0,deec8cec,80fd0bf8,80f53607,8adbf5c0,...) at 
sys_sys_exit+0x1d
syscall(deec8d28) at syscall+0x2de
Xint0x80_syscall() at Xint0x80_syscall+0x21

-- 
Mikolaj Golub

--- VirtualBox-4.0.14_OSE/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c.orig	2012-03-18 00:21:42.0 +0200
+++ VirtualBox-4.0.14_OSE/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c	2012-03-18 00:22:18.0 +0200
@@ -651,13 +651,13 @@ bool vboxNetFltOsMaybeRediscovered(PVBOX
 ng_rmnode_self(pThis->u.s.node);
 pThis->u.s.node = NULL;
 }
+VBOXCURVNET_RESTORE();
 
 if (ifp0 != NULL)
 {
 vboxNetFltOsDeleteInstance(pThis);
 vboxNetFltOsInitInstance(pThis, NULL);
 }
-VBOXCURVNET_RESTORE();
 
 return !ASMAtomicUoReadBool(&pThis->fDisconnectedFromHost);
 }
@@ -671,8 +671,10 @@ void vboxNetFltOsDeleteInstance(PVBOXNET
 mtx_destroy(&pThis->u.s.inq.ifq_mtx);
 mtx_destroy(&pThis->u.s.outq.ifq_mtx);
 
+VBOXCURVNET_SET_FROM_UCRED();
 if (pThis->u.s.node != NULL)
 ng_rmnode_self(pThis->u.s.node);
+VBOXCURVNET_RESTORE();
 pThis->u.s.node = NULL;
 }
 
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Current problem reports assigned to freebsd-virtualization@FreeBSD.org

2012-03-19 Thread FreeBSD bugmaster
Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.


S Tracker  Resp.  Description

o kern/165252  virtualization[vimage] [pf] [panic] kernel panics with VIMAGE 
and PF
o kern/161094  virtualization[vimage] [pf] [panic] kernel panic with pf + 
VIMAGE wh
o kern/160541  virtualization[vimage][pf][patch] panic: userret: Returning on 
td 0x
o kern/160496  virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE
o kern/158686  virtualization[vimage] [tap] [patch] Add VIMAGE support to if_tap
a kern/152047  virtualization[vimage] [panic] TUN\TAP under jail with vimage 
crashe
o kern/148155  virtualization[vimage] [pf] Kernel panic with PF/IPFilter + 
VIMAGE k
a kern/147950  virtualization[vimage] [carp] VIMAGE + CARP = kernel crash
s kern/143808  virtualization[pf] pf does not work inside jail
a kern/141696  virtualization[rum] [vimage] [panic] rum(4)+ vimage = kernel 
panic

10 problems total.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"