Corrupted data on shared folders!

Discussions related to using VirtualBox on Windows hosts.
Post Reply
dreadnaut
Posts: 3
Joined: 14. Apr 2009, 14:10
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux

Corrupted data on shared folders!

Post by dreadnaut »

On a Windows XP host, I use a linux guest as local web server, where the /var/www directory is a shared folder (mounted with gid/uid to be accessible by apache). I handle version control with Mercurial.

All has been working fine, until I stumbled upon a bug in version 2.1.4 and 2.2.0 - data on the shared directory is corrupted, while read or written. I can reproduce this consistently, and I have found a minimal* text file that can trigger the bug. ( * if I split the file in two, both the parts will be read correctly )

Code: Select all

fran@inside:/var/www/test$ rm -f .hg
fran@inside:/var/www/test$ hg init
fran@inside:/var/www/test$ hg add minfail
fran@inside:/var/www/test$ hg commit -m "Boom"
fran@inside:/var/www/test$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
 minfail@0: broken revlog! (index data/minfail.i unknown format 25920)
warning: orphan revlog 'data/minfail.i'
1 files, 1 changesets, 0 total revisions
1 warnings encountered!
1 integrity errors encountered!
(first damaged changeset appears to be 0)
fran@inside:/var/www/test$
The problem is not present if I run mercurial on the host machine, or I copy the files on the virtual machine hard drive --which makes me think that Mercurial works fine, but VirtualBox has trouble writing on the shared folder.

The minfail file is just text, more or less 8kB.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Corrupted data on shared folders!

Post by Sasquatch »

The Forums isn't meant for bug reports. We have the Bugtracker for that. Your forum account isn't valid there, so create a new one.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
geekfreak
Posts: 15
Joined: 16. May 2008, 22:03

Re: Corrupted data on shared folders!

Post by geekfreak »

I have the same issue, with Ubuntu 8.10 host and 9.04 guest.

Seems like I get pages server in 16KB chunks, jquery @118KB takes 7 reloads, to get the whole file, quite bizarre, but each refresh shows on the firebug net tab as getting bigger by ~16KB until the file is loaded, i see a 206 Partial content header each time.

it looks like a weird file level buffer problem between apache and the mounted remote folder.

Any suggestions? it may just be a mount option on the folder but my unix fu doesn't extend that far.
rool
Posts: 1
Joined: 28. May 2009, 20:53
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Gentoo, Ubuntu, Windows 7, OpenSuse

Re: Corrupted data on shared folders!

Post by rool »

Follow the advise from http://forums.virtualbox.org/viewtopic. ... 940&p=6680.

Basicly, add the following to your apache config:

Code: Select all

<Directory "/path-to-shared-directory">
   EnableSendfile Off
</Directory>
Post Reply