Opened 8 years ago
Last modified 8 years ago
#16329 new defect
Corruption when accessing files via Shared Folders
Reported by: | jlm | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox 5.1.12 |
Keywords: | shared folder corruption error | Cc: | |
Guest type: | Linux | Host type: | Linux |
Description
I am seeing intermittent file corruption when checking a borgbackup repository via a Shared Folder
Host is Ubuntu x64 16.04 using Virtualbox 5.1.12 Guest is Ubuntu Mint x64 16.10
Here is the output of 5 sequential runs of the same command to verify the repository, you can see that some detect errors and others don't. The errors that are detected are different between runs as well.
jlmcgraw@mate1604:~$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Segment entry checksum mismatch [segment 273, offset 8] Index object count mismatch. 117954 != 117952 Completed repository check, errors found. jlmcgraw@mate1604:~$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Segment entry checksum mismatch [segment 155, offset 2726665] Index object count mismatch. 117954 != 117951 Completed repository check, errors found. jlmcgraw@mate1604:~$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backup
I'm unable to recreate the errors when checking the repository from the host machine.
I've also noticed occasional errors in files hosted on the shared folder in other applications as well. E.g. unzipping a file, errors about duplicity archive errors etc etc so the problem isn't just limited to borg
I will run memory diagnostics again tonight just to be sure, I've run them before and found no errors.
Attachments (1)
Change History (8)
by , 8 years ago
follow-up: 3 comment:1 by , 8 years ago
VirtualBox shared folders present a very simplified file system implementation, just enough to read/write files from/to the guest. Many applications can error when using shared folders, because they expect advanced features, like file locking or access controls, which don't exist for shared folders.
I would use a a true network share (SaMBa or NFS).
comment:3 by , 8 years ago
Replying to socratis:
VirtualBox shared folders present a very simplified file system implementation, just enough to read/write files from/to the guest. Many applications can error when using shared folders, because they expect advanced features, like file locking or access controls, which don't exist for shared folders.
I would use a a true network share (SaMBa or NFS).
In that case I would expect to either fail or not fail consistently. This seems to be an intermittent corruption issue affecting multiple applications on reads, something that is worth digging into.
There is no other process accessing these files at the same time and access control is not an issue.
comment:4 by , 8 years ago
I've also been experiencing random guest VM lockups and some tickets (e.g #16107) suggested changing the Paravirtualization setting for the VM from "Default" to "Minimal".
Since I did this I've been unable to recreate the corruption when reading from the Shared Folder.
Does this suggest a more focused line of investigation to anyone?
follow-up: 7 comment:5 by , 8 years ago
This might be related to file corruption: https://www.virtualbox.org/ticket/9276
comment:6 by , 8 years ago
Unfortunately the Shared Folder read corruption just popped back up, so that problem isn't solved
I'm testing this by repeatedly verifying a borg backup repository and its associated CRCs/hashes etc through a shared folder, though I've seen problems in other applications too
(Runs with no output indicate no errors were found)
jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups: jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Segment entry checksum mismatch [segment 694, offset 8] Index object count mismatch. 118270 != 118268 Completed repository check, errors found. jlmcgraw@mate1604:~/Documents$ borgbackup check /media/sf_Shared_Folder/borg_vm_backups/ Enter passphrase for key /media/sf_Shared_Folder/borg_vm_backups:
comment:7 by , 8 years ago
Replying to adeschenes:
This might be related to file corruption: https://www.virtualbox.org/ticket/9276
I don't believe my issue is related to this ticket because the read errors don't always occur and when they do they are not in the same place (see the various outputs I've listed)
When I test this same archive from the host machine I do not get any errors
Virtualbox log file