From owner-freebsd-emulation@freebsd.org Tue Aug 23 08:34:50 2016 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7B7FBC1085 for ; Tue, 23 Aug 2016 08:34:50 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id CF3531A13 for ; Tue, 23 Aug 2016 08:34:50 +0000 (UTC) (envelope-from janm@transactionware.com) Received: by mailman.ysv.freebsd.org (Postfix) id CB285BC1081; Tue, 23 Aug 2016 08:34:50 +0000 (UTC) Delivered-To: emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CACEBBC107F for ; Tue, 23 Aug 2016 08:34:50 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from mail3.transactionware.com (mail.transactionware.com [203.14.245.7]) by mx1.freebsd.org (Postfix) with SMTP id 447C91A12 for ; Tue, 23 Aug 2016 08:34:49 +0000 (UTC) (envelope-from janm@transactionware.com) Received: (qmail 56487 invoked by uid 907); 23 Aug 2016 08:34:45 -0000 Received: from Unknown (HELO jmmacpro.tmst.com.au) (203.14.245.130) (smtp-auth username janm, mechanism plain) by mail3.transactionware.com (qpsmtpd/0.84) with (ECDHE-RSA-AES256-SHA encrypted) ESMTPSA; Tue, 23 Aug 2016 18:34:45 +1000 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Odd behavior with virtualbox-ose-4.3.38 From: Jan Mikkelsen In-Reply-To: Date: Tue, 23 Aug 2016 18:34:45 +1000 Cc: "freebsd-emulation@freebsd.org" Message-Id: References: <2418C811-3C6E-4837-B6A5-51DB4C425EB4@transactionware.com> <59E9F6CE-0F2B-40E1-B78D-AF9DFBCED280@transactionware.com> To: Kevin Oberman X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 08:34:51 -0000 > On 23 Aug 2016, at 14:37, Kevin Oberman wrote: >=20 > On Mon, Aug 22, 2016 at 4:30 PM, Kevin Oberman > wrote: > On Mon, Aug 22, 2016 at 12:54 PM, Jan Mikkelsen = > wrote: > [ =E2=80=A6 ] > Yes, the problem could be in many places. However, if you=E2=80=99ve = gone to FreeBSD 11, you have more aio than you think. =46rom UPDATING: > 20160301: > The AIO subsystem is now a standard part of the kernel. The > VFS_AIO kernel option and aio.ko kernel module have been = removed. > Due to stability concerns, asynchronous I/O requests are only > permitted on sockets and raw disks by default. To enable > asynchronous I/O requests on all file types, set the > vfs.aio.enable_unsafe sysctl to a non-zero value. >=20 > BINGO! >=20 > Thank you so much, Jan! This does explain a great deal of what I was = seeing and why.=20 >=20 > Now the question... how can I disable it? I'm guessing that = "kern.features.aio=3D0" in /boot/loader.conf might do the trick, but the = man page does not mention this at all. Also, I guess it is time to open = a bug report on this. FWIW, the problem does seem to be linked to disk = activity. I had the system locked up and had to kill the process. When I = rebooted, the system told me that a disk check was needed, but I had it = lock up several time (3, I think) before it made it through the check = without locking up again. Once that was complete, the system started and = ran normally again. This also now fits rather well with an aio issue. >=20 > Not too sure how to go about collecting more information for the = PR,but I'll open it with what I have. >=20 > Thanks again, Jan! > -- > Kevin Oberman, Retired Network Engineer >=20 > FYI, there is a PR on this. = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D168298 = >=20 > I have updated the ticket with what I have seen, especially that it is = not ZFS specific. I have also made the adjustment in sysctls as shown in = the ticket (comment 3) and will see how things works. Glad it was useful. Looking at the link to the 2012 email in the PR, I = see that I responded back then. At the time my workaround was to turn on = hostbuffercache in Virtualbox; obviously not enough now. The sysctls = will probably achieve something similar =E2=80=94 make it less likely = that aio calls will fail with EAGAIN. Just had a quick look at the Virtualbox source =E2=80=94 there is a = FreeBSD specific AIO implementation. It could easily have a bug or = trigger a FreeBSD bug. No one has found it because it doesn=E2=80=99t = run on other platforms and on FreeBSD everyone has been turning off AIO = for Virtualbox for years. Regards, Jan.=