Bug 253934

Summary: /emulators/virtualbox-ose-additions shared folders crash 13.0-BETA
Product: Ports & Packages Reporter: Jacob Meadows <jardows>
Component: Individual Port(s)Assignee: Virtualbox Team (Nobody) <vbox>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: freebsd, grahamperrin, groenveld, jlduran, madpilot
Priority: --- Flags: bugzilla: maintainer-feedback? (vbox)
Version: Latest   
Hardware: Any   
OS: Any   

Description Jacob Meadows 2021-03-01 13:48:13 UTC
I have a FreeBSD-13.0-BETA3 virtualbox VM on a Windows 10 host. Every time I try to mount a shared folder, the virtual machine reboots. The VirtualBox host is version 6.1.16 r140961. I have installed emulators/virtualbox-ose-additions from packages and have compiled it from ports, with no success. I also have a 12.2-RELEASE VM on the same host that mounts the shared folder without issues with the same configuration and using the same steps.

On this VM, I manually load /boot/modules/vboxvfs.ko, then run mount_vboxvfs -w, at which point it reboots.

This has been consistent behavior since 13.0-ALPHA, and is still present in 13.0-BETA4.  I have not seen any other reports of this happening.
Comment 1 Jacob Meadows 2021-03-08 14:41:59 UTC
I just tested with 13.0-RC1, and am having the same issue
Comment 2 Helge Oldach 2021-03-10 06:38:07 UTC
Confirmed with 6.1.18 host.

Actually yesterday's update of emulators/virtualbox-ose-additions to 6.1.18 makes it even worse: system crash upon "service vboxservice start".

This is stable/13-n244826-c4dbe899aa0 marginally beyond RC1.
Comment 3 groenveld 2021-03-11 18:47:06 UTC
This looks like 244962


Index: files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
--- files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c     (revision 568115)
+++ files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c     (working copy)
@@ -1,6 +1,6 @@
 --- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig    2021-01-07 15:34:22 UTC
 +++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
-@@ -14,228 +14,1347 @@
+@@ -14,228 +14,1351 @@
   * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
   * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
@@ -160,6 +160,10 @@
 +      .vop_write      = vboxfs_write,
 +      .vop_bmap       = VOP_EOPNOTSUPP
++#if __FreeBSD_version > 1300000
++ VFS_VOP_VECTOR_REGISTER(vboxfs_vnodeops);
 -static int vboxvfs_access(struct vop_access_args *ap)
 +static uint64_t
Comment 4 Helge Oldach 2021-03-12 06:50:46 UTC
(In reply to groenveld from comment #3)
Thanks! Indeed that fixes the case for me.
Comment 5 Jacob Meadows 2021-03-15 13:25:31 UTC
I'll have opportunity to test this patch this week.  I'll report back my findings.
Comment 6 Helge Oldach 2021-04-22 12:43:28 UTC
Fixed by PR 255208 which is a late duplicate.
Comment 7 Guido Falsi freebsd_committer 2021-04-22 13:05:11 UTC
Fixed by ports 8a311de0cb804d as reported in bug #255208

I was not aware of this previous submission, sorry.