From owner-freebsd-stable@FreeBSD.ORG Fri May 25 05:31:55 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48770106564A for ; Fri, 25 May 2012 05:31:55 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from mail3.transactionware.com (mail3.transactionware.com [202.68.173.211]) by mx1.freebsd.org (Postfix) with SMTP id D6B598FC0C for ; Fri, 25 May 2012 05:31:54 +0000 (UTC) Received: (qmail 52486 invoked by uid 907); 25 May 2012 05:25:11 -0000 Received: from Unknown (HELO jmmacpro.tmst.com.au) (202.68.173.218) (smtp-auth username janm, mechanism plain) by mail3.transactionware.com (qpsmtpd/0.84) with (AES128-SHA encrypted) ESMTPSA; Fri, 25 May 2012 15:25:11 +1000 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Jan Mikkelsen In-Reply-To: Date: Fri, 25 May 2012 15:25:09 +1000 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Pete French X-Mailer: Apple Mail (2.1278) Cc: freebsd-stable@freebsd.org Subject: Re: VirtualBox, AIO and zvol's - a cautionary tale X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2012 05:31:55 -0000 Hi, On 23/05/2012, at 11:11 PM, Pete French wrote: > Am posting this to stable not really as a question, but more in case = anyone > else hits the same problem. Last patch tuesday one of my virtual = Windows > machines running under VirtualBox started crashing. By which I mean > that VirtualBox would quit. This had been running tsably for a long > tine, so it puzzled me. >=20 > First thought was it was sme patch from patch-tuesday. But rolling = back > to an earlier version of the disc showed it wasn't - the crashes were > occurring before the patch had been applied. >=20 > I'll skip the hours of puzzlement which followed - it turrned out that > the indirect cause was that a few weeks ago I had installed Samba > onto the same server. In doing so I had enabled AIO, as this improves > Samba performance. >=20 > What I didn't realise is that if VirtualBox finds AIO loaded it = proceeds > to use it. So by doing that I had switched on AIO inside my virtual > machines as well. The disc I use for my virtual machines are all zvols = (it > performs better, and it seems that VirtualBox has a problem using AIO > to access zvols. >=20 > But this didn;t show up for weeks because in the normal scheme of = things > my virtual machines dont acccess the local dirve very much. It was = only > when they started downloading patches that the crash happened. >=20 > Solution is simple - disable AIO. All then goes back to being nice > and stable again. But it did take a while to find. I have seen similar behaviour, but I did not disable AIO to solve it. = Instead, in the VirtualBox VM, I made sure that the storage controller = was created with the "--hostiocache on" option. Without that, the = virtual machines were unreliable on ZFS with the same behaviour you saw. Do you have the hostiocache enabled or disabled in your VM? Does it make = a difference? Regards, Jan.