Solved VirtualBox 5.2.22 causes kernel panic with bridged adapter

Recently I updated a system to FreeBSD 12.0-RELEASE and rebuilt everything via ports. After the final reboot the system started to reboot endlessly. This was caused by emulators/virtualbox-ose-nox11. I found that the crash is not caused by the kernel module loaded via /boot/loader.conf or vboxnet, but by starting a virtual machine with bridged adapter. If I change the VM adapter type to NAT everything runs fine (but useless in my case). I'm not sure how relevant is the bug reports PR 230460. My problem seems similar to PR 220003

Some details for the host system:
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
CPU: Intel E5-2623 v4
virtualbox-ose-nox11-5.2.22_2 (installed from PORTS)

The same system worked fine with FreeBSD 11.2-RELEASE and virtualbox-ose-nox11-5.2.12_1

I'll appreciate any quick workaround!
 
Strange but seems I found a solution - compiling emulators/virtualbox-ose-kmod with VIMAGE support on solved the problem. The rebuild of all ports inherited the old value - VIMAGE off. I see it was turned on by default on 24 Oct 2017. I guess if this option is mandatory (at least for the bridged networking) there should be some scary warning during ports build.
 
I suspect you needed that option because VIMAGE is enabled by default on the GENERIC kernel of 12.0. Previous FreeBSD versions already had the option but it needed to be explicitly enabled.

You have to regularly review your selected port options, sometimes options get added or removed, or have their default setting changed. So it's a good idea to regularly re-do them. If you re-do the config you can easily tell which options have been changed or added, they'll show a '+' next to their selector.
 
Nice catch! I was in the same situation because I'm building virtualbox (and nvidia-driver) from source after the ABI changes in 11.2 screwed those two packages up. I would think that kernel panics are the worst that could happen to an OS, thus this issue should be kicked up the "chain of command".
 
No. The worst to happen is silently writing to bad pointers, messing up data in flight to disc or mapped into some process, depending on moon phase and proximity to the next ginger cat (in other words, completely random. See 'heisenbug'). At least with a panic you know shit happened and don't get a PR from your IRS agent when your tax report makes no sense at all.
 
I was in the same situation because I'm building virtualbox (and nvidia-driver) from source after the ABI changes in 11.2 screwed those two packages up.
This was "fixed" when 11.1 was dropped, packages have since been built for 11.2 so that issue was resolved along with it.
 
I know reviewing options during ports build is important but I should honestly admit that sometimes I just hit <enter>. After major OS update I'm using ports_mgmt/portmaster and it shows every config that might have changed options. Some ports or options are marked as BROKEN, some issue warning but I've noticed nothing about emulators/virtualbox-ose-nox11.
It's strange that not using an option enabled in Kernel causes panic but we have seen much stranger things, haven't we?
I guess not turning VIMAGE option on must stop building of the port but I'm not feeling mighty enough to make any change in the ports tree.
 
Back
Top