Subversion’s “read length line” error

When I did something stupid as a kid my parents would occasionally say words to the effect of “We’re not angry with you, just disappointed”. That’s how I feel right now with Subversion after finding out about this repository corruption issue which seems to have been lurking around for a while.

Finding such a bug in any system you rely on as heavily as a source control system is always going to hurt, and more so if you find about about it first hand. I’ve been unable to repair the repository in question, and although it’s not much of an issue as it was a recently created code branch so we can quite happily drop the history and start again – the bigger issue is doubting your source control system. It’s not a nice feeling.

If you’re still reading at this point, then you might like to ask…

What is the “read length line” error?

This particular error manifests itself because of a particular kind of corruption that has occurred in the repository. Malcolm Rowe provided a great analysis and description of the problem here: http://svn.haxx.se/dev/archive-2006-02/0473.shtml. To put it in a nutshell, the crux of the issue is that two handles are eventually opened to the transaction by mod_dav_svn, and one of them is freed later which ends up writing the remaining portion of it’s cache. The end result is that the representation is now malformed, and this extra data has invalidated a number of the offset specified later in the file. The “read length line” error is a result of the the backend trying to read from the wrong offset.

 

And then, your next questions might be…

What can you do about it?

At the moment, not much. The root cause of the problem is very elusive, making it extremely difficult to track, and more difficult to produce. If for some reason, you’ve come up with a reproduction recipe though, please emaildev@subversion.tigris.org, as we’d very interested in having such a recipe. However, I feel it’s mostly an issue with configuration, load, and some decision process that Apache2 makes when deciding to fork a new process to handle a request, coupled with some other error, making this a very difficult bug to reproduce.

 

What is the Subversion team doing about it?

The team is aware the problem exists, and is eager to get it resolved. There are on-going discussions of how to fix this issue, but without knowing where the problem actually resides it’s difficult to fix this issue properly. We may just end up masking the problem if we aren’t careful. That said, there are discussions right now about limiting the write handle to a transaction to just one process. That comes with some tradeoffs, mainly in terms of commit speed, as we may not have the option to pipeline the commit operation.

So it’s a nasty issue, and if you got here by googling because you’ve got a corrupt repository then you’ll probably want to try these links and hope they see you right:

Link: fsfsverify - jszakmeister’s techblog
Link: Repairing A Corrupt FSFS Repository

I’d really love to see this one fixed. For now I’m going to be splitting a few groups of code into their own repositories in order to minimise the loss if this ever happens again, as well as making a few minor revisions to the repository dumping/exporting/backup nightly processes

Oh, and crossing my fingers.

Tags:

 Print | Posted on Thursday, August 05, 2010 11:39 PM |



Feedback

Gravatar

# re: Subversion’s “read length line” error

If you wouldn't mind providing some information about the the actual error you received, and the version of SVN you were running, I'd appreciate it. I try to keep a sense of whom this is affecting, and to do date, most everyone who has had a problem has been because the revision was created with an older version of SVN. If you're seeing the issue with a newer version of SVN, I'd really like to know that.

Also, it sounds like you've started from scratch again, but I've had a great deal of success in repairing broken revisions. If you run across the problem again, shoot me an email. I'll be happy to take a look at the issue (within reason, I do have a day job).

Thanks!

8/19/2010 10:24 PM | John Szakmeister

Gravatar

# re: Subversion’s “read length line” error

Hi John,

Thanks for your comment - I'll flick you an email and give you a bit more detail.

I did pick up from your site that you've had some good luck helping people out in your own time. As you say, I've started from scratch now but I'm still keen to submit whatever info I can if it helps pinpoint the bug (and having the repository repaired for historical purposes would still be very handy indeed).


Cheers,

Ross

8/19/2010 10:41 PM | Ross Hawkins


Post Comment

Title  
Name  
Email
Website / Url
 

Your comment

   
Ensure the word in this box says 'orange':
 
Please add 6 and 1 and type the answer here:





Due to excessive comment spam, all comments are now being moderated. If you're a comment spammer then you're wasting your time here. Your comments will not be published - ever.


About me

My name is Ross Hawkins and I'm a developer, consultant, business owner and writer based in Auckland, New Zealand (pictured below!). My current work revolves around ASP.NET, C#, jQuery, Ajax, SQL Server, and a mix of other Microsoft development technologies.

I also have about 15 years of experience with IBM Lotus Notes/Domino and associated technologies. While Notes/Domino is no longer my primary focus I still like to dabble and keep my skills up to date.

I own and run 2 businesses - Hawkins Consulting Services, and Ignition Development.

Bethells Beach, located in sunny West Auckland, New Zealand




Subscribe

Subscribe to this feed


Search




Popular Content

Troubleshooting WebResource.axd

The .NET 2.0 framework changed the way clientside JavaScript is delivered to the browser. Previously, ASP.NET 1.1 used the aspnet_client directory whereas now 2.0 uses WebResource.axd.

Published on October 8, 2006

jQuery Wildcard Selectors - some simple examples

I wrote about jQuery wildcard selector syntax briefly back in 2009, and since then that post has received a lot of views – way more than a post that brief should ever have seen..

Published on October 14, 2011

Microsoft AJAX Extensions: Sys.Debug is null or not an object

One of the breaking changes which was made with the 1.0 release of the Microsoft Ajax Extensions was the renaming of the 'Debug' class to 'Sys.Debug' for reasons of compatiability with other frameworks. Breaking changes like this can often be a source of frustration..

Published on May 22, 2007

Simple ASP.NET Character Counter

A textbox character counter is a pretty simple piece of functionality, and there's a lot of different ways to apply one to your application. The following method is nice and simple, and can be done using only clientside JavaScript if required, or combined with server side code in order to create a more dynamic effect

Published on December 4, 2006

Simple ASP.NET Character Counter - with Master Page Support

A quick update to my previous character counter article adding some changes for those using it with Master Pages.

Published on February 7th, 2009

Adding Tooltips to Gridview Headers

As the title says, this is a very simple but dynamic way of achieving tooltip text on a header column. It's not overly flash, but it's lightweight and quick to implement.

Published on April 15, 2007

SQL Server Web Report Viewer Issues on Windows 2008 Server/IIS7

A fix for another AXD related issue, this time with the SQL Server Web Report Viewer Control which was being served up via IIS7 on a Windows 2008 server.

Published on June 2, 2007
Updated on April 10, 2008





Archives

May, 2012 (1)
April, 2012 (4)
March, 2012 (2)
February, 2012 (4)
January, 2012 (3)
December, 2011 (3)
November, 2011 (8)
October, 2011 (9)
September, 2011 (8)
August, 2011 (5)
July, 2011 (4)
June, 2011 (7)
May, 2011 (5)
April, 2011 (3)
March, 2011 (8)
February, 2011 (4)
January, 2011 (3)
December, 2010 (8)
November, 2010 (5)
October, 2010 (6)
September, 2010 (7)
August, 2010 (11)
July, 2010 (12)
June, 2010 (8)
May, 2010 (8)
April, 2010 (4)
March, 2010 (8)
February, 2010 (6)
January, 2010 (12)
December, 2009 (13)
November, 2009 (11)
October, 2009 (12)
September, 2009 (12)
August, 2009 (2)
July, 2009 (7)
June, 2009 (12)
May, 2009 (9)
April, 2009 (9)
March, 2009 (9)
February, 2009 (8)
January, 2009 (7)
December, 2008 (6)
November, 2008 (7)
October, 2008 (9)
September, 2008 (12)
August, 2008 (9)
July, 2008 (6)
June, 2008 (24)
May, 2008 (13)
April, 2008 (16)
March, 2008 (8)
February, 2008 (10)
January, 2008 (1)
December, 2007 (14)
November, 2007 (11)
October, 2007 (11)
September, 2007 (13)
August, 2007 (11)
July, 2007 (5)
June, 2007 (15)
May, 2007 (11)
April, 2007 (9)
March, 2007 (9)
February, 2007 (10)
January, 2007 (8)
December, 2006 (18)
November, 2006 (11)
October, 2006 (14)
September, 2006 (9)
August, 2006 (10)
July, 2006 (4)
June, 2006 (4)
May, 2006 (6)
April, 2006 (3)
February, 2006 (6)
January, 2006 (10)
September, 2005 (2)
August, 2005 (4)

Post Categories

ASP.NET
AJAX
Amusing
NZ
NZ Trains
Notes/Domino
Visual Studio
Web Development
Miscellaneous
Me
Rugby
C#
SQL