VirtualBox

Ticket #18926 (closed defect: fixed)

Opened 10 months ago

Last modified 7 months ago

Problem loading vboxsf.ko after upgrade to 6.0.12

Reported by: alealeale Owned by: fbatschu
Component: shared folders Version: VirtualBox 6.0.12
Keywords: noop_backing_dev_info Cc:
Guest type: Linux Host type: all

Description

$ uname -r
4.1.12-124.31.1.el6uek.x86_64

$ cat /etc/oracle-release
Oracle Linux Server release 6.10

After upgrading from 6.0.10 to 6.0.12 (+Guest Additions), shared folders are not available (mounted) anymore.

Trying to manually loading the module I'm getting (in /var/log/message):
vboxsf: Unknown symbol noop_backing_dev_info (err 0)

Just for fun, I tried rebuilding VBoxGuestAdditions after applying the following patch and rebuilding VBoxGuestAdditions, and now I'm able to load the module and mount my shared folders.

--- vboxguest-6.0.12/vboxsf/vfsmod.c.orig	2019-09-03 11:48:44.000000000 +0200
+++ vboxguest-6.0.12/vboxsf/vfsmod.c	2019-09-12 13:23:51.083557673 +0200
@@ -434,9 +434,11 @@
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && LINUX_VERSION_CODE <= KERNEL_VERSION(4, 12, 0)
     bdi_destroy(&pSuperInfo->bdi);    /* includes bdi_unregister() */
+/*
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
     sb->s_bdi = &noop_backing_dev_info;
 # endif
+*/
 #endif
 }

I know that shouldn't be the way to fix the problem...maybe the commented IF should be verified against 4.1.12-124.31.1.el6uek src(?).

Please let me know if you need any test in order to fix the problem.

Change History

comment:1 Changed 10 months ago by fbatschu

This regression has been introduced with Changeset 131736 in trunk and with Changeset 132480 in the 6.0 branch which made it into 6.0.12.

the change introducing this was: #9172: “Shared folder performance tuning” (Xtracker bug)

Workaround: do NOT upgrade the guest additions from 8.0.10 to 6.0.12 when running affected linux guest, fall back to 6.0.10 guest additions.

Version 1, edited 10 months ago by fbatschu (previous) (next) (diff)

comment:2 Changed 10 months ago by fbatschu

  • Owner set to fbatschu
  • Status changed from new to accepted

comment:3 Changed 10 months ago by fbatschu

  • Host type changed from Windows to all

comment:4 Changed 8 months ago by fbatschu

This is reproducable right away on Virtualbox 8.0.14 using a guest VM running:

$ uname -r
4.1.12-124.32.3.el6uek.x86_64
$ cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="6.10"

The inital installation of the guest additions fails when dealing with the vboxsf module:

[root@ol6 VBox_GAs_6.0.14]# sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
4.1.12-124.32.3.el6uek.x86_64.
VirtualBox Guest Additions: modprobe vboxsf failed
Building the VirtualBox Guest Additions kernel modules.  This may take a whil
e.
To build modules for other installed kernels, run
  /sbin/rcvboxadd quicksetup <version>
or
  /sbin/rcvboxadd quicksetup all
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.

[root@ol6 VBox_GAs_6.0.14]# cat /var/log/vboxadd-install.log 
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel
4.1.12-124.32.3.el6uek.x86_64.
VirtualBox Guest Additions: modprobe vboxsf failed
 
[root@ol6 VBox_GAs_6.0.14]# cat /var/log/vboxadd-setup.log
Installing X.Org Server 1.17 modules
You may need to restart the Window System (or just restart the guest system)
to enable the Guest Additions.

We get the hint why the vboxsf module fails to even load:

[root@ol6 VBox_GAs_6.0.14]# dmesg|grep vbox
[  630.712393] vboxguest: module verification failed: signature and/or requir
ed key missing - tainting kernel
[  630.723390] vboxguest: misc device minor 57, IRQ 20, I/O port d040, MMIO a
t 00000000f4400000 (size 0x400000)
[  630.723392] vboxguest: Successfully loaded version 6.0.14 (interface 0x000
10004)
[  630.729641] vboxsf: Unknown symbol noop_backing_dev_info (err 0)
[  632.194785] vboxsf: Unknown symbol noop_backing_dev_info (err 0)
[  633.213289] vboxsf: Unknown symbol noop_backing_dev_info (err 0)

What has been loaded is only:

[fbatschu@ol6 ~]$ lsmod|grep vbox
vboxguest             368640  1

and after reboot we get the errors during boot up:

[fbatschu@ol6 Desktop]$ dmesg|grep vbox
[ 1085.133730] vboxguest: module verification failed: signature and/or requir
ed key missing - tainting kernel
[ 1085.141877] vboxguest: misc device minor 58, IRQ 20, I/O port d040, MMIO a
t 00000000f4400000 (size 0x400000)
[ 1085.141880] vboxguest: Successfully loaded version 6.0.14 (interface 0x000
10004)
[ 1124.646600] vboxsf: Unknown symbol noop_backing_dev_info (err 0)
[ 1125.683323] vboxsf: Unknown symbol noop_backing_dev_info (err 0)
 
[fbatschu@ol6 Desktop]$ dmesg|grep automount
[ 1124.665359] 08:58:48.357813 automount Error: vbsvcAutomounterMountIt: Fail
ed to mount 'Downloads' on '/media/sf_Downloads': No such device (-1,19)
[ 1125.702172] 08:58:49.394829 automount Error: vbsvcAutomounterMountIt: Fail
ed to mount 'Downloads' on '/media/sf_Downloads': No such device (-1,19)
Last edited 8 months ago by fbatschu (previous) (diff)

comment:5 Changed 8 months ago by fbatschu

the Linux kernel symbol is used in Virtualbox:

C symbol: noop_backing_dev_info

  File     Function              Line
0 vfsmod.c vbsf_done_backing_dev 438 sb->s_bdi = &noop_backing_dev_info;

trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

 431  * Undoes what vbsf_init_backing_dev did.
 432  */
 433 static void vbsf_done_backing_dev(struct super_block *sb, struct vbsf_super_info *pSuperInfo)
 434 {
 435 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && LINUX_VERSION_CODE <= KERNEL_VERSION(4, 12, 0)
 436     bdi_destroy(&pSuperInfo->bdi);    /* includes bdi_unregister() */
 437 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
 438     sb->s_bdi = &noop_backing_dev_info;
 439 # endif
 440 #endif
 441 }

The symbol still exists and is exported in the 5.4 kernel:

 https://elixir.bootlin.com/linux/v5.4-rc6/source/mm/backing-dev.c

struct backing_dev_info noop_backing_dev_info = {
	.name		= "noop",
	.capabilities	= BDI_CAP_NO_ACCT_AND_WRITEBACK,
};
EXPORT_SYMBOL_GPL(noop_backing_dev_info);

it also exists and is exported in the 4.10 kernel:

 https://elixir.bootlin.com/linux/v4.10/source/mm/backing-dev.c

it also exists and is exported in the kernel versions: 4.9 to 4.2

 https://elixir.bootlin.com/linux/v4.9/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.8/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.7/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.6/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.5/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.4/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.3/source/mm/backing-dev.c
 https://elixir.bootlin.com/linux/v4.2/source/mm/backing-dev.c

it is exists but is _not_ exported in the kernel versions: 4.1 and 4.0:

 https://elixir.bootlin.com/linux/v4.1/source/mm/backing-dev.c

static atomic_long_t bdi_seq = ATOMIC_LONG_INIT(0);

struct backing_dev_info noop_backing_dev_info = {
	.name		= "noop",
	.capabilities	= BDI_CAP_NO_ACCT_AND_WRITEBACK,
};

 https://elixir.bootlin.com/linux/v4.0/source/mm/backing-dev.c

It does exist and is exported in all the 3.X kernel versions: 3.19 to 3.0

 https://elixir.bootlin.com/linux/v3.19/source/mm/backing-dev.c

struct backing_dev_info noop_backing_dev_info = {
	.name		= "noop",
	.capabilities	= BDI_CAP_NO_ACCT_AND_WRITEBACK,
};
EXPORT_SYMBOL_GPL(noop_backing_dev_info);

it does exist and is exported in the 2.6.39 to 2.6.34 kernel versions and is missing in the <= 2.6.33 kernels

 https://elixir.bootlin.com/linux/v2.6.39/source/mm/backing-dev.c

The use of noop_backing_dev_info has been introduced with the following changeset:

https://www.virtualbox.org/changeset/79472/vbox

Message:
    linux/vboxsf: Fixed writable mmap on 2.6.34 thru 4.9, needed to set s_bdi in the superblock. bugref:9172

Text string: sb->s_bdi

  File     Line
0 vfsmod.c 370 bdi = sb->s_bdi;
1 vfsmod.c 422 sb->s_bdi = bdi;
2 vfsmod.c 438 sb->s_bdi = &noop_backing_dev_info;

355 static int vbsf_init_backing_dev(struct super_block *sb, struct vbsf_super_info *pSuperInfo)

 367 #  if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
 368     rc = super_setup_bdi_name(sb, "vboxsf-%llu", (unsigned long long)idSeqMine);
 369     if (!rc)
 370         bdi = sb->s_bdi;
 371     else
 372         return rc;
 373 #  else
 374     bdi = &pSuperInfo->bdi;
 375 #  endif
[...]
 412 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
 413     rc = bdi_init(&pSuperInfo->bdi);
 414 #  if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 415     if (!rc)
 416         rc = bdi_register(&pSuperInfo->bdi, NULL, "vboxsf-%llu", (unsigned long long)idSeqMine);
 417 #  endif /* >= 2.6.26 */
 418 # endif  /* 4.11.0 > version >= 2.6.24 */

comment:6 Changed 8 months ago by fbatschu

this has been fixed in trunk with the following 2 changeset: r134976 & r134981

Backports to 6.x and 5.2 are in progress. Corresponding updates will follow.

Last edited 8 months ago by fbatschu (previous) (diff)

comment:7 Changed 8 months ago by fbatschu

This has been backported to the 6.x branch as changeset r134991

comment:8 Changed 8 months ago by fbatschu

the bug does not apply to the 5.2 branch.

comment:9 Changed 8 months ago by fbatschu

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use