Odd behavior with virtualbox-ose-4.3.38

Jan Mikkelsen janm at transactionware.com
Tue Aug 23 08:34:51 UTC 2016


> On 23 Aug 2016, at 14:37, Kevin Oberman <rkoberman at gmail.com> wrote:
> 
> On Mon, Aug 22, 2016 at 4:30 PM, Kevin Oberman <rkoberman at gmail.com <mailto:rkoberman at gmail.com>> wrote:
> On Mon, Aug 22, 2016 at 12:54 PM, Jan Mikkelsen <janm at transactionware.com <mailto:janm at transactionware.com>> wrote:
> [ … ]
> Yes, the problem could be in many places. However, if you’ve gone to FreeBSD 11, you have more aio than you think.  From 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.

> 
> BINGO!
> 
> Thank you so much, Jan! This does explain a great deal of what I was seeing and why. 
> 
> Now the question... how can I disable it? I'm guessing that "kern.features.aio=0" 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.
> 
> Not too sure how to go about collecting more information for the PR,but I'll open it with what I have.
> 
> Thanks again, Jan!
> --
> Kevin Oberman, Retired Network Engineer
> 
> FYI, there is a PR on this. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168298 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168298>
> 
> 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 — make it less likely that aio calls will fail with EAGAIN.

Just had a quick look at the Virtualbox source — 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’t run on other platforms and on FreeBSD everyone has been turning off AIO for Virtualbox for years.

Regards,

Jan.


More information about the freebsd-emulation mailing list