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

'svnadmin load' doesn't detect premature end of dump stream

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-01-19 00:33:53 CET

While experimenting for issue #2441, "'svnadmin load' malformed dumpfile errors
are intolerably vague", I discovered the following more serious problem.

When the dump stream being read by 'svnadmin load' ends prematurely, in several
cases no error is detected. The following script demonstrates this:

# Make a non-empty repository and dump it as "dump1"
rm -rf repos1 wc1
svnadmin create repos1
mkdir wc1
echo "Blah" > wc1/file1
mkdir wc1/dir1
svn import -m "" wc1 file://`pwd`/repos1
svnadmin dump repos1 > dump1

# Try to load a various fractions of "dump1" into a new repository
for SIZE in $(seq 100 50 $(filesize dump1)); do
   rm -rf repos2
   svnadmin create repos2
   echo
   echo "Trying to load the first $SIZE bytes..."
   head -c $SIZE dump1 |
   svnadmin load repos2 2>&1 >/dev/null &&
   svnadmin verify repos2
done

This outputs the following:

> Trying to load the first 100 bytes...
> * Verified revision 0.
>
> Trying to load the first 150 bytes...
> svnadmin: Premature end of content data in dumpstream
>
> Trying to load the first 200 bytes...
> * Verified revision 0.
>
> Trying to load the first 250 bytes...
> svnadmin: Incomplete or unterminated property block
>
> Trying to load the first 300 bytes...
> svnadmin: Premature end of content data in dumpstream
>
> Trying to load the first 350 bytes...
> svnadmin: Premature end of content data in dumpstream
>
> Trying to load the first 400 bytes...
> * Verified revision 0.
> * Verified revision 1.
>
> Trying to load the first 450 bytes...
> svnadmin: Incomplete or unterminated property block
>
> Trying to load the first 500 bytes...
> * Verified revision 0.
> * Verified revision 1.
>
> Trying to load the first 550 bytes...
> svnadmin: Incomplete or unterminated property block
>
> Trying to load the first 600 bytes...
> svnadmin: Incomplete or unterminated property block
>
> Trying to load the first 650 bytes...
> svnadmin: Premature end of content data in dumpstream

I think this is a cause for concern.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 19 02:46:51 2006

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