Page 1 of 1

Corrupted data on shared folders!

Posted: 21. Apr 2009, 21:48
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.

Re: Corrupted data on shared folders!

Posted: 21. Apr 2009, 23:05
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.

Re: Corrupted data on shared folders!

Posted: 12. May 2009, 01:06
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.

Re: Corrupted data on shared folders!

Posted: 28. May 2009, 20:56
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>