VirtualBox

Opened 7 years ago

Last modified 7 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)

VBox.log (188.8 KB ) - added by jlm 7 years ago.
Virtualbox log file

Download all attachments as: .zip

Change History (8)

by jlm, 7 years ago

Attachment: VBox.log added

Virtualbox log file

comment:1 by Socratis, 7 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:2 by jlm, 7 years ago

I ran memtest86 for ~12 hours and it found no memory errors

in reply to:  1 comment:3 by jlm, 7 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 jlm, 7 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?

comment:5 by adeschenes, 7 years ago

This might be related to file corruption: https://www.virtualbox.org/ticket/9276

comment:6 by jlm, 7 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:

in reply to:  5 comment:7 by jlm, 7 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

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use