Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#46871 - [virtualbox-guest-utils] Virtualbox guest shared folders file cache problem

Attached to Project: Community Packages
Opened by Tom B (TomB) - Sunday, 25 October 2015, 18:55 GMT
Last edited by Sébastien Luttringer (seblu) - Friday, 18 December 2015, 18:51 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

See steps to reproduce below for detailed description, however it seems to be Arch Specific, Ubuntu is not affected which means it's a packaging/configuration issue rather than a Virtualbox or Kernel problem specifically.


Steps to reproduce:

Set up VirtualBox with a 64 bit Arch Guest (Haven't tried 32 but assume it would be the same). The host doesn't matter, I have replicated the issue on both an Arch Linux host and a Windows 7 host.

Firstly set up the shared folder for the VM then:

1) GUEST: mount a shared directory: mount -t vboxsf share_name /media/share

2) GUEST: cat /media/share/existing.file <-- Works perfectly, displays the contents of the file from HOST

3) HOST: Write new.file into the shared folder:

4) GUEST: cat /media/share/new.file <-- Works perfectly, displays contents of newly created file

5) GUEST: stat /media/share/non-existing.file <-- As expected displays "no such file or directory"

6) HOST: Write non-existing.file to the shared directory

7) GUEST: cat /media/share/non-existing.file <-- THIS SHOULD WORK NOW AS THE FILE EXISTS BUT INSTEAD SHOWS "No such file or directory"

When typing ls /media-share it shows the file with ??? for permissions, dates, etc.

If the file is written on the host BEFORE trying to access it on the guest it works as expected. If the guest tries to read the file prior to it's existence, the fact it doesn't exist is cached and the guest cannot see the file after it's been created.

This is the same for both windows and linux hosts with an arch guest.

Running echo 3 > /proc/sys/vm/drop_caches to clear the file cache seems to fix it insofar as it will make currently inaccessible files accessible. Any new files affected won't be fixed until the command is run again.

As far as I can tell it's an issue with the file cache. I've tried recompiling the guest's kernel with various options for CONFIG_FSCACHE (arch defaults to =m and the module is not loaded on the guest)

Is there a fix for this? Although I could run drop_caches command in a cron to periodically reset the cache, this is clearly a workaround rather than a fix. I would like a better solution ideally.

This task depends upon

Closed by  Sébastien Luttringer (seblu)
Friday, 18 December 2015, 18:51 GMT
Reason for closing:  Works for me
Comment by Bruno Santos (bms) - Sunday, 25 October 2015, 20:42 GMT
See  FS#45748 

I actually reported a series of problems with later virtualbox modules (since v5.*) that include
* shared folder issues
* multiple screens not working
* faulty USB 3.0 support

However, it was flagged as duplicate of the one I just mentioned (which only mentions multiple screens issues) and closed.
I think it's now best to close this one as well: there's plenty of discussion there already as to what temporary solutions we have and what's working or not.

Hope it helps

Loading...