[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN Error:"Database Disk image is malformed"

From: Konstantin Kolinko <knst.kolinko_at_gmail.com>
Date: Mon, 9 Nov 2009 10:34:05 +0300

2009/11/9 Phil Cairns <phil_at_pagaros.com.au>:
>> 2009/10/23 Sakshi Kaul <Sakshi.Kaul_at_kpitcummins.com>
>> >
>> > Hi,
>> >
>> > We are using SVN for Configuration Management and one of our project team is facing an issue while committing to SVN.
>> >
>> > Issue: DATABASE DISK IMAGE MALFORMED
>
> [snip]
>
>> I have done some search on what other SQLite users do in such a
>> case (not Subversion users, but those, who use the SQLite database directly).
>
> [snip]
>
>> Thus the only way is to create a new subversion repository and restore
>> it from your backups.
>>
>> Even if you do not have backups, I think that the current repository
>> is still readable. You can try to create a copy of it, using svnadmin
>> dump + load, or svnsync. See the SVN Book for details.
>
> I, too, have this problem, and I've been able to restore the repository to a correct state by dumping and reloading. However, this is getting painful as I'm only getting a couple of commits before the error arises again. It only started when I decided to upgrade to 1.6 of svn. Up until that point, I was running with 1.4 on my QNAP NAS.
>
> I figured that the problem may have been with the NAS (running svnserve -d), so I moved the server process from the NAS to my Windows development machine (using VisualSVN Server), and pointing that at the repository on the NAS (using a UNC path to the repository).
>
> I see this problem whether I'm using VisualSVN from within Visual Studio, TortoiseSVN from the Explorer, or svn directly from a Cygwin command line.
>
> It looks like this:
> $ svn ci ftpbackup/syncremote.py
> Sending        ftpbackup/syncremote.py
> Transmitting file data .svn: Commit failed (details follow):
> svn: database disk image is malformed
> svn: Your commit message was left in a temporary file:
> svn:    '/cygdrive/d/Projects05/MVP2/ftpbackup/svn-commit.tmp'
>
> I'd have to regard this as a server problem, not a client problem.
>
> I guess the next thing to do is to try and keep the repository on my windows machine and make backups to the NAS, but I'm not keen on this. I'm going research git over the next couple of days, and if the problem persists, see if it's worth switching.
>
> Regards,
> Phil.
>

1. I suggest reading the following MySQL document:
"6.0 How To Corrupt Your Database Files"
http://www.sqlite.org/lockingv3.html#how_to_corrupt

I found it following the links from the FAQ entry I mentioned earlier.

The main point I see there is that fsync() should function properly.

As you are repeatedly seeing this issue, you may want to run the svn
testsuite on your platform, to make sure it functions properly. Cannot
help with that, though.

2. My understanding is that MySQL is used in 1.6 for a supplementary
task, that is implementing the "Sharing multiple common
representations" feature,
http://subversion.tigris.org/svn_1.6_releasenotes.html#filesystem-improvements

That DB is used only at write time. That is why the broken repository
is still readable. It was good to hear that you were actually able to
read (dump) the data.

I think that "sharing representations" feature can be disabled. Also,
maybe there is a way to recreate that MySQL database from a
repository. I have not done that, so do not know. With a quick look
through the SVNBook nightly, I did not find anything on this topic
there.

The things would be worse in 1.7, where a MySQL db will play a more
important role.

3. Regarding a repository on a NAS network storage, I would agree with
"not recommended", but, more specifically:
http://subversion.tigris.org/faq.html#nfs

I also remember seeing some tips (a blog entry?) on how to configure a
svn repository so that different subdirectories of it are on different
file systems. I cannot find that very recipe now, but at least here
are some links
http://svn.haxx.se/dev/archive-2008-01/0150.shtml
http://www.orcaware.com/svn/wiki/Server_performance_tuning_for_Linux_and_Unix
http://subversion.tigris.org/svn_1.5_releasenotes.html#fsfs-isolate-immutable

Best regards,
Konstantin Kolinko

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2415693

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-11-09 08:34:57 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.