From owner-freebsd-current@freebsd.org Wed Aug 8 20:25:26 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B107F1069E35 for ; Wed, 8 Aug 2018 20:25:26 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 33BD592315; Wed, 8 Aug 2018 20:25:25 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id C6FED101C7; Wed, 8 Aug 2018 23:25:17 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id 35ZEtRDcnh2n; Wed, 8 Aug 2018 23:25:13 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 23BC8101BD; Wed, 8 Aug 2018 23:25:13 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id C92C3422123; Wed, 8 Aug 2018 23:25:10 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id QEIoDDJi_DkF; Wed, 8 Aug 2018 23:25:07 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id 8501C422122; Wed, 8 Aug 2018 23:25:07 +0300 (MSK) Subject: Re: Vbox causing host crash/reboot on 12-current To: AN , freebsd-current@freebsd.org Cc: vbox@freebsd.org References: From: Vladimir Kond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x8hzyjIAAYCQqX 2tluX2FzvcJUaEZDo3pt93IpHzvf924A1nvxP4n9NyfTu4GBZ+07sBJEploKugmAVIzXD1m6 zr1xeo6LF5Adz1b0WP2cU88gv66FiuZp9Cj6DTGdIta6hQqAtrBxINVd5XR99eXrZ0+YSiIi 7ywa3dDti8NXwkZkn4pGPDkCjb34PL1kdoD/yOCpp9yAdflF8T8KObjWuivnAMOYfmGGN30n nhh8Ub9n2DVw7wARAQABwsB8BBgBCgAmFiEEkwnJqomIwH/siVElg2u+IHApX3UFAlkI9Y8C GwwFCQWjmoAACgkQg2u+IHApX3XzJggAs8Hiu/YeLfmZYp/57eaK/BrtW5TeLrKd5x4knFkY dxWOJ7ZJIIr7fhUH9OZKyAMYPzJaWuxhAuDIZiH39MZFnAhx6LnycCIQMY6CP4gJ8Y2ssvf7 eNcFRqL1xvEmAELMC5HtpnLp914xlYkBoqcU2rH7X0Qza4GvafQHHVrjc+DqqKbF6YjPsEew Fp4mqvvIxi71UiWy95q0x8tC3Cbm5hUCl2i5nl0iaWNNMkuh6is+jLJZ9W5CfEPcp+W2Vekd UTm4zN0+uaR7br3Lr3GbBJPlLHrH1haK6nJmyfVzf1MbK8wqIHiH1wWmIxC96QHKCEzRDjdf IVYGqb/YykLjBw== Message-ID: Date: Wed, 8 Aug 2018 23:24:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------1619DBF8188E1D81847240A9" Content-Language: en-US X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2018 20:25:27 -0000 This is a multi-part message in MIME format. --------------1619DBF8188E1D81847240A9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi I am sure that crashes was caused by SMAP as I am faced with them too. I have made following patch to fix panic (attached) Apply it to portstree and rebuild emulators/virtualbox-ose-kmod P.S. It is POC so no arch/SMAP autodetection On 8/7/18 6:14 PM, AN wrote: > Update: > > I found the revision: > https://svnweb.freebsd.org/base?view=revision&revision=336876 > > Use SMAP on amd64. > > Could this possibly cause VBox to crash and reboot the system? Is > there a sysctl to disable? > > Thanks > > On Tue, Aug 7, 2018 at 10:46 AM, AN wrote: >> I recently started having severe instability on a workstation with >> VirtualBox. I'm not sure if it was caused by the recent large ports >> update, or a recent commit that affected SMAP. I can't seem to find >> that revision, would someone please post it and also the workaround to >> disable it, I would like to try it after work and see if disabling it >> allows VBox to work. Is anyone else seeing this effect with Vbox? >> >> What I'm seeing is that as soon as a VM is started it reboots the >> host, totally reproducible every time. I tried to rebuild VBox and >> kmod, and also some qt5 ports but still not working. Any help is >> appreciated, thanks for reading. >> >> Regards > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --------------1619DBF8188E1D81847240A9 Content-Type: text/x-patch; name="vbox-smap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vbox-smap.patch" Index: emulators/virtualbox-ose/files/patch-smap =================================================================== --- emulators/virtualbox-ose/files/patch-smap (nonexistent) +++ emulators/virtualbox-ose/files/patch-smap (working copy) @@ -0,0 +1,36 @@ +--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2018-08-08 22:32:59.741196000 +0300 ++++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c 2018-08-08 22:52:49.842726000 +0300 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include "../SUPDrvInternal.h" + #include +@@ -310,6 +311,9 @@ static int VBoxDrvFreeBSDIOCtl(struct cd + { + PSUPDRVSESSION pSession; + devfs_get_cdevpriv((void **)&pSession); ++ int rc; ++ ++ stac(); + + /* + * Deal with the fast ioctl path first. +@@ -318,9 +322,13 @@ static int VBoxDrvFreeBSDIOCtl(struct cd + || ulCmd == SUP_IOCTL_FAST_DO_HM_RUN + || ulCmd == SUP_IOCTL_FAST_DO_NOP) + && pSession->fUnrestricted == true) +- return supdrvIOCtlFast(ulCmd, *(uint32_t *)pvData, &g_VBoxDrvFreeBSDDevExt, pSession); ++ rc = supdrvIOCtlFast(ulCmd, *(uint32_t *)pvData, &g_VBoxDrvFreeBSDDevExt, pSession); ++ else ++ rc = VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd); + +- return VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd); ++ clac(); ++ ++ return rc; + } + + Property changes on: emulators/virtualbox-ose/files/patch-smap ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property --------------1619DBF8188E1D81847240A9--